제출 #741628

#제출 시각아이디문제언어결과실행 시간메모리
741628MODDI팀들 (IOI15_teams)C++14
컴파일 에러
0 ms0 KiB
#include "teams.h" #include "grader.cpp" #include <bits/stdc++.h> #define ll long long #define mp make_pair #define pb push_back #define pii pair<int,int> using namespace std; vector<pii> arr; bool comp(pii& a, pii& b){ if(a.first < b.first) return true; else if(a.first > b.first) return false; else{ if(b.first < a.first) return false; return true; } } void init(int N, int A[], int B[]) { for(int i = 0; i < N; i++){ arr.pb(mp(A[i], B[i])); } sort(arr.begin(), arr.end(), comp); } int can(int M, int K[]) { vector<int> teams; for(int i = 0; i < M; i++) teams.pb(K[i]); sort(teams.begin(), teams.end()); int j = 0; for(int i = 0; i < teams.size(); j++){ int in = 0; while(in < teams[i]){ if(arr[j].second < teams[i]){ j++; if(j == arr.size()) return 0; } else if(arr[j].first <= teams[i]){ in++; j++; if(j == arr.size() && in < teams[i]) return 0; } else if(arr[j].first > teams[i]){ return 0; } } } return 1; }

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

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