제출 #561237

#제출 시각아이디문제언어결과실행 시간메모리
561237nghiass001즐거운 행로 (APIO20_fun)C++17
26 / 100
12 ms348 KiB
#include "fun.h" #define FOR(i,l,r) for(int i=(l); i<=(r); ++i) #define REP(i,l,r) for(int i=(l); i<(r); ++i) #define FORD(i,r,l) for(int i=(r); i>=(l); --i) #define REPD(i,r,l) for(int i=(r)-1; i>=(l); --i) using namespace std; const int maxN = 1e5 + 5; int n, isans[maxN]; vector<int> Ans; vector<int> sub12() { int u = 0; REP(i, 0, n) { int maxi = -1, unext = -1; REP(j, 0, n) if (!isans[j]) { int tmp = hoursRequired(u, j); if (tmp > maxi) maxi = tmp, unext = j; } u = unext; Ans.push_back(u); isans[u] = 1; } return Ans; } vector<int> createFunTour(int N, int Q) { n = N; if (n <= 500) return sub12(); int H = hoursRequired(0, N - 1); int A = attractionsBehind(0, N - 1); return vector<int>(N); }

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

fun.cpp: In function 'std::vector<int> createFunTour(int, int)':
fun.cpp:30:9: warning: unused variable 'H' [-Wunused-variable]
   30 |     int H = hoursRequired(0, N - 1);
      |         ^
fun.cpp:31:9: warning: unused variable 'A' [-Wunused-variable]
   31 |     int A = attractionsBehind(0, N - 1);
      |         ^
#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...