Submission #1322408

#TimeUsernameProblemLanguageResultExecution timeMemory
1322408JohanInfinite Race (EGOI24_infiniterace2)C11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;

signed main(){
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, q;
  cin >> n >> q;
  map < int , vector < int > > adj;
  while(q--){
    int x;
    cin >> x;
    adj[abs(x)].push_back(x);
  }
  int mx = 0;
  for(int i = 1; i <= n; i++){
    int cnt = 0;
    vector < int > v = adj[i];
    for(int i = 0; i < v.size(); i++){
      if(v[i] < 0){
        cnt = 0;
      }
      else {
        cnt++;
      }
      mx = max(mx, cnt);
    }
  }
  cout << max(mx - 1, 0) << endl;
}

Compilation message (stderr)

Main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.