Submission #707115

#TimeUsernameProblemLanguageResultExecution timeMemory
707115600MihneaKoala Game (APIO17_koala)C++17
4 / 100
4 ms336 KiB
#include "koala.h" #include <cmath> #include <functional> #include <fstream> #include <iostream> #include <vector> #include <algorithm> #include <string> #include <set> #include <map> #include <list> #include <time.h> #include <math.h> #include <random> #include <deque> #include <queue> #include <unordered_map> #include <unordered_set> #include <iomanip> #include <cassert> #include <bitset> #include <sstream> #include <chrono> #include <cstring> #include <numeric> using namespace std; const int NMAX = 1000 + 7; int b[NMAX]; int r[NMAX]; bool wn[NMAX]; int minValue(int n, int w) { assert(n < NMAX); assert(w < NMAX); // TODO: Implement Subtask 1 solution here. // You may leave this function unmodified if you are not attempting this // subtask. // cout << "salutare!\n"; assert(n == w); assert(n % 2 == 0); for (int i = 0; i < n; i++) { b[i] = 0; } b[3] = 1; playRound(b, r); int cnt_lose = 0; for (int i = 0; i < n; i++) { wn[i] = (r[i] > b[i]); cnt_lose += (wn[i] == 0); } assert(cnt_lose == 1); for (int i = 0; i < n; i++) { if (wn[i] == 0) { return i; } } assert(0); } int maxValue(int n, int w) { assert(n < NMAX); assert(w < NMAX); // 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) { assert(n < NMAX); assert(w < NMAX); // 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) { assert(n < NMAX); assert(w < NMAX); 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...