fork download
  1. #include <fstream>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main ()
  7. {
  8. istream & file = cin;
  9.  
  10. int cur_score;
  11.  
  12. while (!file.eof())
  13. {
  14. file >> cur_score;
  15. cout << file.tellg() << endl;
  16. }
  17. }
  18.  
Success #stdin #stdout 0s 3100KB
stdin
1200 1000 980 890 760
stdout
4 9 13 17 -1