Submission #126539

#TimeUsernameProblemLanguageResultExecution timeMemory
126539dolphingarlicKoala Game (APIO17_koala)C++14
19 / 100
16 ms380 KiB
#include <bits/stdc++.h> #pragma GCC Optimize("O3") #define FOR(i, x, y) for (int i = x; i < y; i++) #define MOD 1000000007 typedef long long ll; using namespace std; #include "koala.h" int B[100], R[100]; int minValue(int N, int W) { fill(B, B + N, 0); fill(R, R + N, 0); B[0] = 1; playRound(B, R); if (R[0] < 2) return 0; else { FOR(i, 1, N) if (!R[i]) return i; } } int maxValue(int N, int W) { vector<int> v; FOR(i, 0, N) v.push_back(i); while (v.size() != 1) { int k = W / v.size(); fill(B, B + N, 0); for (int i : v) B[i] = k; playRound(B, R); v.clear(); FOR(i, 0, N) if (R[i] > k) v.push_back(i); } return v[0]; } int greaterValue(int N, int 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) { 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. } }

Compilation message (stderr)

koala.cpp:2:0: warning: ignoring #pragma GCC Optimize [-Wunknown-pragmas]
 #pragma GCC Optimize("O3")
 
koala.cpp: In function 'int minValue(int, int)':
koala.cpp:21:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#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...