Submission #1135384

#TimeUsernameProblemLanguageResultExecution timeMemory
1135384AutoratchLightning Rod (NOI18_lightningrod)C11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int n,x,y; stack<pair<int,int> > a; int readInt() { int x = 0; char ch = getchar_unlocked(); while (ch < '0' || ch > '9') ch = getchar_unlocked(); while (ch >= '0' && ch <= '9'){ x = (x << 3) + (x << 1) + ch - '0'; ch = getchar_unlocked(); } return x; } int main() { n = readInt(); for(int i = 0;i < n;i++) { x = readInt(),y = readInt(); while(!a.empty() and abs(a.top().first-x)<=y-a.top().second) a.pop(); if(a.empty() or abs(a.top().first-x)>a.top().second-y) a.push({x,y}); } printf("%d",(int)a.size()); }

Compilation message (stderr)

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