제출 #135790

#제출 시각아이디문제언어결과실행 시간메모리
135790mirbek01로봇 (IOI13_robots)C++11
컴파일 에러
0 ms0 KiB
#include "robots.h" #include "grader.cpp" #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 2; int n, used[N]; vector <int> x, y, w, s; vector < pair <int, int> > v1, v2; bool check(int c){ memset(used, 0, sizeof(used)); int pt = -1, sz = (int)x.size(); set < pair <int, int> > st; for(int i = 0; i < sz; i ++){ while(pt + 1 < n && v1[pt + 1].first < x[i]){ pt ++; st.insert( {-s[ v1[pt].second ], v1[pt].second} ); } int cn = c; while(cn > 0 && !st.empty()){ cn --; int id = st.begin()->second; st.erase(st.begin()); used[id] = 1; } } stack <int> stk; sz = y.size(); pt = -1; for(int i = 0; i < sz; i ++){ while(pt + 1 < n && v2[pt + 1].first < y[i]){ pt ++; if(!used[ v2[pt].second ]) stk.push( v2[pt].second ); } int cn = c; while(cn > 0 && !stk.empty()){ used[ stk.top() ] = 1; stk.pop(); cn --; } } for(int i = 0; i < n; i ++) if(!used[i]) return 0; return 1; } int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]) { for(int i = 0; i < A; i ++) x.emplace_back(X[i]); for(int i = 0; i < B; i ++) y.emplace_back(Y[i]); n = T; for(int i = 0; i < T; i ++){ w.emplace_back(W[i]); s.emplace_back(S[i]); v1.emplace_back(W[i], i); v2.emplace_back(S[i], i); } sort(v1.begin(), v1.end()); sort(v2.begin(), v2.end()); sort(x.begin(), x.end()); sort(y.begin(), y.end()); int lo = 1, hi = T; if(!check(T)) return -1; while(lo <= hi){ int md = (lo + hi) >> 1; if(check(md)) hi = md - 1; else lo = md + 1; } return hi + 1; }

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

robots.cpp:2:10: fatal error: grader.cpp: No such file or directory
 #include "grader.cpp"
          ^~~~~~~~~~~~
compilation terminated.