# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
567990 | minhcool | Koala Game (APIO17_koala) | C++17 | 11 ms | 360 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "koala.h"
#include<bits/stdc++.h>
using namespace std;
//#define int long long
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define foru(i, l, r) for(int i = l; i <= r; i++)
#define ford(i, r, l) for(int i = r; i >= l; i--)
typedef pair<int, int> ii;
typedef pair<ii, int> iii;
typedef pair<ii, ii> iiii;
//const int N = ;
const int oo = 1e18 + 7, mod = 1e9 + 7;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int rnd(int l, int r){
int temp = rng() % (r - l + 1);
temp = (temp + (r - l + 1)) % (r - l + 1);
return temp + l;
}
int minValue(int N, int W) {
int B[105], R[105];
for(int i = 0; i < N; i++) B[i] = 0;
B[0] = 1;
playRound(B, R);
//for(int i = 0; i < N; i++) cout << B[i] << " " << R[i] << "\n";
for(int i = 0; i < N; i++) if(R[i] <= B[i]) return i;
//return;
}
int maxValue(int N, int W) {
return 0;
}
vector<int> nums[16][105];
void prep(){
for(int i = 1; i <= 15; i++){
for(int j = 0; j < (1LL << i); j++){
vector<int> temp;
int sum = 0;
for(int k = 0; k < 15; k++){
if(j & (1LL << k)){
temp.pb(k + 1);
sum += k + 1;
}
}
if(!nums[i][sum].size()) nums[i][sum] = temp;
}
for(int j = 1; j <= (i * (i + 1)) / 2; j++) assert(nums[i][j].size());
}
}
int cnt = 0;
int greaterValue(int N, int W) {
cnt++;
if(cnt == 1) prep();
int B[105], R[105];
for(int i = 0; i < N; i++) B[i] = 0;
return 0;
}
void allValues(int N, int W, int *P) {
if(W == 2*N){
}
else{
}
//return 0;
}
/*
void process(){
}
signed main(){
ios_base::sync_with_stdio(0);
process();
}*/
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |