Submission #545952

#TimeUsernameProblemLanguageResultExecution timeMemory
545952MonarchuwuKoala Game (APIO17_koala)C++17
4 / 100
4 ms324 KiB
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
typedef long long ll;

const int N = 105;
int n, w;
int p[105];

int maxQueries = 3200, numQueries;

void playRound(int *B, int *R);

int tmp1[105], tmp2[105];
vector<int> get(vector<int> a) {
    copy(a.begin(), a.end(), tmp1);
    playRound(tmp1, tmp2);
    copy(tmp2, tmp2 + a.size(), a.begin());
    return a;
}

int minValue(int n, int w) {
    vector<int> a(n, 0);
    ++a[0];
    a = get(a);
    --a[0];
    for (int i = 0; i < n; ++i)
        if (a[i] <= 0) return i;
}

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.
    }
}

/**  /\_/\
 *  (= ._.)
 *  / >0  \>1
**/

Compilation message (stderr)

koala.cpp: In function 'int minValue(int, int)':
koala.cpp:24:23: warning: control reaches end of non-void function [-Wreturn-type]
   24 |     vector<int> a(n, 0);
      |                       ^
#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...