foo.cc: In function 'int main()':
foo.cc:3:5: error: 'cin' was not declared in this scope
3 | cin >> T;
| ^~~
foo.cc:6:9: error: 'string' was not declared in this scope
6 | string S;
| ^~~~~~
foo.cc:7:21: error: 'S' was not declared in this scope
7 | cin >> N >> S;
| ^
foo.cc:8:19: error: 'count' was not declared in this scope
8 | int one = count(S.begin(), S.end(), '1');
| ^~~~~
foo.cc:10:9: error: 'cout' was not declared in this scope
10 | cout << max(one,zero) << endl;
| ^~~~
foo.cc:10:17: error: 'max' was not declared in this scope
10 | cout << max(one,zero) << endl;
| ^~~
foo.cc:10:34: error: 'endl' was not declared in this scope
10 | cout << max(one,zero) << endl;
| ^~~~