제출 #789569

#제출 시각아이디문제언어결과실행 시간메모리
789569Mouad_ouj던전 (IOI21_dungeons)C++17
11 / 100
7069 ms26788 KiB
#include<bits/stdc++.h> #include "dungeons.h" using namespace std; int ans=0,nn; vector<int> se,le,pe,we; void init(int n,vector<int> s,vector<int> p,vector<int> w,vector<int> l) { se.resize(n); le.resize(n); pe.resize(n); we.resize(n); nn=n; se=s; le=l; we=w; pe=p; } long long self(int x,int z) { if(x==nn) return z; if(z>=se[x]) return self(we[x],z+se[x]); if(z<se[x]) return self(le[x],z+pe[x]); return 0ll; } long long simulate(int x, int z) { return self(x,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...