joioji.cpp:1:31: warning: extra tokens at end of #include directive
1 | #include <bits/stdc++.h>using namespace std;int main() { int n; cin >> n; string poem; cin >> poem; unordered_map<int, int> counter; int max_length = 0; counter[0] = -1; int diff = 0; for (int i = 0; i < n; i++) { if (poem[i] == 'J') { diff++; } else if (poem[i] == 'O') { diff--; } if (counter.find(diff) != counter.end()) { max_length = max(max_length, i - counter[diff]); } else { counter[diff] = i; } } cout << max_length << endl; return 0;}
| ^~~~~~~~~
joioji.cpp:1:10: fatal error: bits/stdc++.h>usin: No such file or directory
1 | #include <bits/stdc++.h>using namespace std;int main() { int n; cin >> n; string poem; cin >> poem; unordered_map<int, int> counter; int max_length = 0; counter[0] = -1; int diff = 0; for (int i = 0; i < n; i++) { if (poem[i] == 'J') { diff++; } else if (poem[i] == 'O') { diff--; } if (counter.find(diff) != counter.end()) { max_length = max(max_length, i - counter[diff]); } else { counter[diff] = i; } } cout << max_length << endl; return 0;}
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.