제출 #1082333

#제출 시각아이디문제언어결과실행 시간메모리
1082333Cyanberry던전 (IOI21_dungeons)C++17
11 / 100
7087 ms26676 KiB
#include "dungeons.h" #include <bits/stdc++.h> using namespace std; vector<int> strL, pity, winR, lossR; void init(int n, std::vector<int> s, std::vector<int> p, std::vector<int> w, std::vector<int> l) { strL = s; pity = p; winR = w; lossR = l; return; } long long simulate(int loc, int strIn) { long long str = strIn; while (loc != strL.size()) { if (str >= strL[loc]) { str += strL[loc]; loc = winR[loc]; } else { str += pity[loc]; loc = lossR[loc]; } } return str; }

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

dungeons.cpp: In function 'long long int simulate(int, int)':
dungeons.cpp:17:13: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |  while (loc != strL.size()) {
      |         ~~~~^~~~~~~~~~~~~~
#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...