Submission #829765

#TimeUsernameProblemLanguageResultExecution timeMemory
829765GusterGoose27Koala Game (APIO17_koala)C++17
4 / 100
3 ms208 KiB
#include "koala.h" #include <bits/stdc++.h> using namespace std; const int MAXN = 105; bool pres[MAXN]; int n, w; vector<int> query(vector<int> &inp) { int *a = new int[n]; int *b = new int[n]; for (int i = 0; i < n; i++) a[i] = inp[i]; playRound(a, b); vector<int> out; for (int i = 0; i < n; i++) { if (b[i] > inp[i]) out.push_back(i); } delete[] a; delete[] b; return out; } vector<int> complement(vector<int> inp) { fill(pres, pres+n, 0); for (int v: inp) pres[v] = 1; vector<int> out; for (int i = 0; i < n; i++) if (!pres[i]) out.push_back(i); return out; } int minValue(int N, int W) { n = N; w = W; vector<int> vals(n, 0); vals[0] = 1; return complement(query(vals))[0]; } int maxValue(int N, int W) { n = N; w = W; // TODO: Implement Subtask 2 solution here. // You may leave this function unmodified if you are not attempting this // subtask. return 0; } int greaterValue(int N, int W) { n = N; w = W; // TODO: Implement Subtask 3 solution here. // You may leave this function unmodified if you are not attempting this // subtask. return 0; } void allValues(int N, int W, int *P) { n = N; w = W; if (W == 2*N) { // TODO: Implement Subtask 4 solution here. // You may leave this block unmodified if you are not attempting this // subtask. } else { // TODO: Implement Subtask 5 solution here. // You may leave this block unmodified if you are not attempting this // subtask. } }
#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...