Submission #574855

#TimeUsernameProblemLanguageResultExecution timeMemory
574855FatihSolakLast supper (IOI12_supper)C++17
0 / 100
77 ms8812 KiB
#include "advisor.h" #include <bits/stdc++.h> using namespace std; void ComputeAdvice(int *c, int n, int k, int m){ vector<int> occ[n]; for(int i = n-1;i>=0;i--){ occ[c[i]].push_back(i); } for(int i = 0;i<k;i++){ WriteAdvice(occ[i].empty()); } for(int i = 0;i<n;i++){ occ[c[i]].pop_back(); WriteAdvice(occ[c[i]].empty()); } }
#include "assistant.h" #include <bits/stdc++.h> using namespace std; void Assist(unsigned char *a, int n, int k, int r) { return; set<int> s; int last = 0; bool now[n]; for(int i = 0;i<n;i++){ now[i] = 0; } for(int i = 0;i<k;i++){ if(a[last++] == 1){ s.insert(i); } now[i] = 1; } for (int i = 0; i < n; i++) { int req = GetRequest(); if(now[req] == 0){ now[*s.begin()] = 0; PutBack(*s.begin()); s.erase(s.begin()); now[req] = 1; } if(a[last++] == 1){ s.insert(req); } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...