# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1054204 | gagik_2007 | Bring Down the Grading Server (CEOI23_gradingserver) | C++17 | 428 ms | 525904 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;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define ff first
#define ss second
ll ttt;
const ll INF=1e18;
const ll MOD=1e9+7;
const ll N=5007;
ll n,m,k;
int d[76][76][76][76][2]; // 1 if the current one loses, and 2 if wins
int cnt=0;
bool recurs(int ch, int fh, int cg, int fg, bool hert){
if(d[ch][fh][cg][fg][hert])return d[ch][fh][cg][fg][hert]==2;
cnt++;
if(hert){ // hackeri hertna
if(cg-max(ch-fg*k,0ll)<=0){
d[ch][fh][cg][fg][hert]=2;
return true;
}
if(ch>fg*k){
if(d[ch][fh][cg-ch+fg*k][fg][!hert]==1){
d[ch][fh][cg][fg][hert]=2;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |