제출 #444066

#제출 시각아이디문제언어결과실행 시간메모리
444066leinad2던전 (IOI21_dungeons)C++17
0 / 100
1623 ms2097156 KiB
#include "dungeons.h" #include<bits/stdc++.h> using namespace std; int N; vector<int>S, P, W, L; void init(int n, vector<int>s, vector<int>p, vector<int>w, vector<int>l) { N=n;S=s;P=p;W=w;L=l; } long long simulate(int x, int z) { if(x==N)return z; if(z>=S[x])simulate(W[x], z+S[x]); else simulate(L[x], z+P[x]); }

컴파일 시 표준 에러 (stderr) 메시지

dungeons.cpp: In function 'long long int simulate(int, int)':
dungeons.cpp:15:1: warning: control reaches end of non-void function [-Wreturn-type]
   15 | }
      | ^
#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...