Submission #438623

#TimeUsernameProblemLanguageResultExecution timeMemory
438623Mil0SDungeons Game (IOI21_dungeons)C++17
11 / 100
7088 ms21288 KiB
#include<bits/stdc++.h> using namespace std; #define vi vector<int> int n1; vector<int> s1,p1,w1,l1; void init(int n,vi s,vi p,vi w, vi l){ n1=n; for(int i=0;i<n;i++){ s1.push_back(s[i]); } for(int i=0;i<n;i++){ p1.push_back(p[i]); } for(int i=0;i<n;i++){ w1.push_back(w[i]); } for(int i=0;i<n;i++){ l1.push_back(l[i]); } } long long simulate(int x,int z){ long long pom=z; while(x!=n1){ if(s1[x]<=pom){ pom+=s1[x]; x=w1[x]; } else{ pom+=p1[x]; x=l1[x]; } } return pom; }
#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...