# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1036714 | model_code | Bring Down the Grading Server (CEOI23_gradingserver) | C++17 | 790 ms | 23020 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;
ll S;
struct State{
ll a1, d1, a2, d2;
bool operator==(const State& other) const {return a1==other.a1 && a2 == other.a2 && d1 == other.d1 && d2 == other.d2;}
};
State sab(State state){
return {state.a2, max(0ll, state.d2 - 1), state.a1, state.d1};
}
State att(State state){
return {state.a2 - (state.a1 - S*state.d2), state.d2, state.a1, state.d1};
}
vector<vector<vector<int>>> dp;
bool half_sab_win(State state){
ll sab_cnt = state.d2 / 2;
state.a1 -= sab_cnt * (state.a2 - S*state.d1);
state.d2 -= sab_cnt;
state = att(state);
state.a1 -= state.d2 * (state.a2 - S*state.d1);
state.d2 = 0;
state = att(state);
ll alpha1 = state.a1 - S*state.d2;
# | 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... |