# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
137479 | silxikys | Hacker (BOI15_hac) | C++14 | 706 ms | 111608 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;
using ll = long long;
const int maxn = 5e5+5;
const int INF = 2e9+9;
int n, v[maxn];
int dp[305][305][305]; //# plies
void amax(int& a, int b) {
a = max(a,b);
}
void amin(int& a, int b) {
a = min(a,b);
}
int f(int t, int i, int j) {
if (dp[t][i][j] >= 0) return dp[t][i][j];
int ir = (i+(t+1)/2) % n;
int jr = (j+t/2) % n;
//[i,ir], [j,jr]
if (j == ((ir+1) % n) && (i == ((jr+1) % n))) {
return dp[t][i][j] = 0;
}
if (t % 2 == 0) {
//i's turn
dp[t][i][j] = 0;
if ((ir+1)% n != j) {
# | 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... |