제출 #423302

#제출 시각아이디문제언어결과실행 시간메모리
423302Ozy팀들 (IOI15_teams)C++17
0 / 100
4094 ms13604 KiB
#include "teams.h" #include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for (int i = (a); i <= (b); i++) #define repa(i,a,b) for (int i = (a); i >= (b); i--) #define lli long long int #define debugsl(a) cout << #a << " = " << a << ", " #define debug(a) cout << #a << " = " << a << endl #define u first #define d second vector <pair<lli, lli> > orden; lli falt,act; void init(int N, int A[], int B[]) { rep(i,0,N-1) orden.push_back({B[i],A[i]}); sort(orden.begin(), orden.end()); } int can(int M, int K[]) { sort(K,K+M); act = 0; falt = K[act]; for (auto nino : orden) { if (nino.d <= K[act] && nino.u >= K[act]) { falt--; if(falt == 0){ act++; if (act == M) return 1; else falt = K[act]; } } } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...