data/0.12-dev/gen_pms/killhuge.cpp
raw| 1 | #include <iostream> |
| 2 | #include <string> |
| 3 | #include <strstream> |
| 4 | #include <vector> |
| 5 | |
| 6 | int main() |
| 7 | { |
| 8 | int killed = 0; |
| 9 | |
| 10 | char buf[64000]; |
| 11 | while(cin.getline(buf, 64000)) |
| 12 | { |
| 13 | int size = 0; |
| 14 | for(int i = 0;buf[i] != '\0';++i) |
| 15 | { |
| 16 | if (buf[i] == ' ') |
| 17 | size++; |
| 18 | } |
| 19 | |
| 20 | if (size < 500) |
| 21 | { |
| 22 | cout << buf << '\n'; |
| 23 | } |
| 24 | else |
| 25 | { |
| 26 | ++killed; |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | cerr << "killed: " << killed << endl; |
| 31 | return 0; |
| 32 | } |