Submission #1027800

#TimeUsernameProblemLanguageResultExecution timeMemory
1027800edogawa_somethingDungeons Game (IOI21_dungeons)C++17
11 / 100
7060 ms35924 KiB
#include "dungeons.h" #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vii; typedef pair<ll,ll> pii; #define F first #define S second #define pb push_back #define all(v) v.begin(),v.end() const ll M=4e5+10; const ll inf=2e18; vector<pair<pii,int>>inc[M]; ll awin[M]; ll N; vector<int>lose,hero,win,enemy; void init(int n,vector<int>s,vector<int>p,vector<int>w,vector<int>l) { N=n; hero=s; enemy=p; win=w; lose=l; } long long simulate(int x, int z){ while(x<N){ if(z<hero[x]) z+=enemy[x],x=lose[x]; else z+=hero[x],x=win[x]; } return z; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...