Submission #839360

#TimeUsernameProblemLanguageResultExecution timeMemory
8393607modyDungeons Game (IOI21_dungeons)C++17
0 / 100
1 ms596 KiB
#include "dungeons.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; struct item{ ll strength=0; ll loss=0; ll wingo=0; ll lossgo=0; }; int finish; vector<item> arr; void init(int n, vector<int> s, vector<int> p, vector<int> w, vector<int> l) { arr.resize(n); finish=n; for(int i=0; i < n;i++){ arr[i]={s[i],p[i],w[i],l[i]}; } return; } long long simulate(int x, int z) { while(x!=finish){ if(z>=arr[x].strength){ z+=arr[x].strength; x=arr[x].wingo; } else{ z+=arr[x].loss; x=arr[x].loss; } } 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...