Submission #704085

#TimeUsernameProblemLanguageResultExecution timeMemory
704085ForestedKoala Game (APIO17_koala)C++17
4 / 100
4 ms320 KiB
#include <bits/stdc++.h> using namespace std; using i32 = int; using i64 = long long; template <typename T> using Vec = vector<T>; #define OVERRIDE4(a, b, c, d, ...) d #define REP2(i, n) for (i32 i = 0; i < (i32)(n); ++i) #define REP3(i, m, n) for (i32 i = (i32)(m); i < (i32)(n); ++i) #define REP(...) OVERRIDE4(__VA_ARGS__, REP3, REP2)(__VA_ARGS__) #define PER2(i, n) for (i32 i = (i32)(n) - 1; i >= 0; --i) #define PER3(i, m, n) for (i32 i = (i32)(n) - 1; i >= (i32)(m); --i) #define PER(...) OVERRIDE4(__VA_ARGS__, PER3, PER2)(__VA_ARGS__) #define ALL(x) begin(x), end(x) constexpr i32 INF = 1001001001; constexpr i64 INF64 = 3003003003003003003LL; template <typename T> bool chmin(T &x, const T &y) { if (x > y) { x = y; return true; } else { return false; } } template <typename T> bool chmax(T &x, const T &y) { if (x < y) { x = y; return true; } else { return false; } } #include "koala.h" int minValue(int n, int w) { int b[101], r[101]; REP(i, n) { b[i] = 0; } b[0] = 1; playRound(b, r); i32 idx = -1; REP(i, n) { if (r[i] == 0) { idx = i; } } if (idx != -1) { return idx; } b[0] = 0; b[1] = 1; playRound(b, r); REP(i, n) { if (r[i] == 0) { idx = i; } } return idx; } int maxValue(int N, int 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) { // 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. } }
#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...