제출 #839362

#제출 시각아이디문제언어결과실행 시간메모리
8393627mody던전 (IOI21_dungeons)C++17
11 / 100
7088 ms32932 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].lossgo; } } 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...