# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
837739 | Mohmad_Zaid | Dungeons Game (IOI21_dungeons) | C++17 | 0 ms | 0 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>
#define ll long long
#define pb push_back
using namespace std;
void init(int n, vector<int> s, vector<int> p, vector<int> w, vector<int> l) {
// vector<vector<int>>g_win(n,vector<int>()),g_lose(n,vector<int>());
// for(int i=0;i<n;i++){
// g_win[i].pb(w[i]);
// g_lose[i].pb(l[i]);
// }
while(x!=n){
if(z<s[x]){
z+=p[x];
x=l[x];
}else{
z+=s[x];
x=w[x];
}
}
// cout<<z<<endl;
return;
}
ll simulate(int x, int z) {
// vector<int>s={2,6,9},p={3,1,2},w={2,2,3},l={1,0,1};
// init(3,s,p,w,l,x,z);
return 0;
}
// int main(){
// int n=3,q=2;
// simulate(0,1);
// simulate(2,3);
// return 0;
// }