제출 #896228

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
8962282024-01-01 03:36:15Muhammad_Aneeq던전 (IOI21_dungeons)C++17
11 / 100
7097 ms26928 KiB
#include <vector>
#include "dungeons.h"
using namespace std;
int const N=4e5+10;
int wi[N],lo[N],po[N],st[N];
int nn;
void init(int n, vector<int> s, vector<int> p, vector<int> w, vector<int> l)
{
nn=n;
for (int i=0;i<n;i++)
{
wi[i]=w[i];
lo[i]=l[i];
st[i]=s[i];
po[i]=p[i];
}
}
long long simulate(int i, int z)
{
long long ans=z;
bool w=0;
while (i!=nn)
{
if (z>=st[i])
{
z+=st[i];
i=wi[i];
}
else
{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

dungeons.cpp: In function 'long long int simulate(int, int)':
dungeons.cpp:20:12: warning: unused variable 'ans' [-Wunused-variable]
   20 |  long long ans=z;
      |            ^~~
dungeons.cpp:21:7: warning: unused variable 'w' [-Wunused-variable]
   21 |  bool w=0;
      |       ^
#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...