제출 #1308002

#제출 시각아이디문제언어결과실행 시간메모리
1308002dimitris71Art Exhibition (JOI18_art)C11
컴파일 에러
0 ms0 KiB
#include <cstdio> #include <algorithm> #include <vector> #include <utility> using namespace std; vector < pair < long long, int > > X; int main() { int N; long long res = 0, best = 1e18, sum = 0; scanf("%d", &N); X.resize(N); for (int i=0; i<N; i++) { long long a; int b; scanf("%lld%d", &a, &b); X[i] = make_pair(a, b); } sort(X.begin(), X.end()); for (int i=0; i<N; i++) { best = min(best, sum - X[i].first); sum += X[i].second; res = max(res, sum - X[i].first - best); } printf("%lld\n", res); }

컴파일 시 표준 에러 (stderr) 메시지

art.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.