# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1057575 | Trent | Dungeons Game (IOI21_dungeons) | C++17 | 7004 ms | 2007336 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 "dungeons.h"
#include "bits/stdc++.h"
using namespace std;
#define forR(i, x) for(int i = 0; i < (x); ++i)
#define REP(i, a, b) for(int i = (a); i < (b); ++i)
typedef long long ll;
typedef vector<int> vi;
int n;
vi s, p, w, l;
const int VLS = 30, ME = 7, MN = 4e5 + 10;
vi skp;
// thl becomes int
struct ch{int t; ll by; int thl;};
ch bjp[VLS][MN][ME];
const int INF = 1e8;
ll awin[MN];
int trunc(ll val, int lo, int hi) {
return (int) max((ll) lo, min((ll) hi, val));
}
void init(int n, std::vector<int> s, std::vector<int> p, std::vector<int> w, std::vector<int> l) {
::n=n;
::s=s, ::p=p, ::w=w, ::l=l;
skp.push_back(0);
REP(i, 1, VLS) skp.push_back(1 << (i-1));
forR(si, VLS) {
int val = skp[si];
forR(i, n) {
if(s[i] <= val) bjp[si][i][0] = {w[i], (ll) s[i], INF};
# | 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... |