# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1081462 | kes0716 | Archery (IOI09_archery) | C++17 | 293 ms | 14632 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 <bits/stdc++.h>
using namespace std;
const int MAXN = 200009;
int n, r, crit;
int a[2*MAXN];
struct State{
int pl, ze, mi;
State operator+(const State &s) const{
return (State){pl+s.pl, ze+s.ze, mi+s.mi};
}
} init[MAXN];
int simulate1(void){
vector<State> pot(5*n);
State pq = {0, 0, 0};
int i, j;
for(i=0; i<n; i++){
pot[i] = init[i];
}
for(i=n; i<5*n; i++)
pot[i] = {0, 0, 0};
int cnt = 0, last = -1;
int lwin = (init[0].pl ? 1 : (init[0].ze ? 0 : -1));
for(i=0; i<4*n; i++){
pq = pq + pot[i];
int oppb;
//printf("i=%d pq= +%d 0%d -%d\n", i, pq.pl, pq.ze, pq.mi);
if(pq.pl >= 2){
oppb = 1;
pot[i+n].pl++;
pq.pl--;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |