제출 #663133

#제출 시각아이디문제언어결과실행 시간메모리
663133karrigan팀들 (IOI15_teams)C++14
0 / 100
3137 ms53528 KiB
#include<bits/stdc++.h> #include "teams.h" using namespace std; int a[500001]; int b[500001]; vector<int>use[500001]; int vis[500001]; bool cmp(int i,int j){ return b[i]<b[j]; } int n; void init(int N,int A[],int B[]){ n=N; for (int i=1;i<=n;i++){ a[i]=A[i-1]; b[i]=B[i-1]; } for (int i=1;i<=n;i++){ for (int j=1;j<=n;i++){ if (a[j]<=i&&b[j]>=i){ use[i].push_back(j); } } sort(use[i].begin(),use[i].end(),cmp); } } int can(int M,int K[]){ for (int i=1;i<=n;i++)vis[i]=0; sort(K,K+M); int m=M; for (int i=0;i<m;i++){ int cnt=0; for (auto v:use[K[i]]){ if (cnt==K[i])break; vis[v]=1; cnt++; } if (cnt<K[i])return 0; } return 1; } /*int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); srand(time(NULL)); //freopen("test.INP","r",stdin); //freopen(".OUT","w",stdout); }*/
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...