Submission #521259

# Submission time Handle Problem Language Result Execution time Memory
521259 2022-02-01T10:21:39 Z hohohaha Koala Game (APIO17_koala) C++14
4 / 100
6 ms 328 KB
#include "koala.h"
#include<bits/stdc++.h> 
#include "bits/stdc++.h"

using namespace std;

#define fori(i, a, b) for(int i = (int) (a); i <= (int) (b); ++i)
#define ford(i, a, b) for(int i = (int) (a); i >= (int) (b); --i)
#define forIT(it, begin, end) for(__typeof(end) it = (begin) + ((begin) > (end)); it != (end) - ((begin) > (end)); it += 1 - 2 * ((begin) > (end)))
#define b_e(x) begin(x), end(x)
#define sz(x) ((int)(x).size())
#define bitc __builtin_popcountll

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define rand rng
#define endl '\n'
#define sp ' '

#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
using namespace std; 
const int maxn = 205; 
int r[maxn], b[maxn]; 

int minValue(int n, int w) {
    fill(b, b + n, 1); 
    playRound(b, r); 
    fill(b, b + n, 0); 
//    fori(i, 0, n - 1) cout << r[i] << endl; 
    fori(i, 0, n - 1) { 
    	if(r[i]) { 
    		b[i] = 1; 
    		break; 
    	}
    }
    fill(r, r + n, 0); 
    playRound(b, r); 
//    fori(i, 0, n - 1) cout << r[i] << endl; 
    fori(i, 0, n - 1) { 
    	if(r[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.
    }
}

Compilation message

koala.cpp: In function 'int minValue(int, int)':
koala.cpp:41:1: warning: control reaches end of non-void function [-Wreturn-type]
   41 | }
      | ^
# Verdict Execution time Memory Grader output
1 Correct 6 ms 328 KB Output is correct
2 Correct 6 ms 292 KB Output is correct
3 Correct 6 ms 292 KB Output is correct
4 Correct 6 ms 288 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 200 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 200 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 200 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 200 KB Output isn't correct
2 Halted 0 ms 0 KB -