제출 #133806

#제출 시각아이디문제언어결과실행 시간메모리
133806Runtime_error_팀들 (IOI15_teams)C++14
34 / 100
4091 ms39916 KiB
#include "teams.h" #include <bits/stdc++.h> using namespace std; const int inf = 5e5+9; int n,team[inf]; vector<int> v[inf]; void init(int N, int A[], int B[]) { n = N; for(int i=0;i<n;i++) v[ A[i] ] .push_back( B[i] ); } int can(int M, int K[]) { for(int i=1;i<=n;i++) team[i] = 0; multiset<int> CurEnd; for(int i=0;i<M;i++) team[ K[i] ] +=K[i] ; for(int i=1;i<=n;i++){ while(!CurEnd.empty() && *CurEnd.begin()<i) CurEnd.erase(CurEnd.begin()); for(auto o:v[i]) CurEnd.insert(o); if(CurEnd.size() < team[i]) return 0; while(team[i]--) CurEnd.erase(CurEnd.begin()); } return 1; }

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

teams.cpp: In function 'int can(int, int*)':
teams.cpp:31:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if(CurEnd.size() < team[i])
            ~~~~~~~~~~~~~~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...