Submission #770455

#TimeUsernameProblemLanguageResultExecution timeMemory
770455mindiyakTeams (IOI15_teams)C++14
0 / 100
94 ms19100 KiB
#include "teams.h" #include <vector> #include <iostream> using namespace std; vector<int> arr(500001); void init(int N, int A[], int B[]) { arr.clear(); fill(arr.begin(), arr.end(), 0); for(int i = 0;i < N;i++){ for(int j = A[i];j <= B[j];j++){ arr[i] += 1; } } // for(int i = 0;i < 20;i++){ // cout << arr[i] << " "; // }cout << endl; } int can(int M, int K[]) { vector<int> temp = arr; for(int i=0;i<M;i++){ if(temp[K[i]] < K[i]){ return 0; } temp[K[i]] -= K[i]; } return 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...