제출 #933604

#제출 시각아이디문제언어결과실행 시간메모리
933604vjudge1Speedrun (RMI21_speedrun)C++14
0 / 100
1 ms740 KiB
#include <bits/stdc++.h> #include <speedrun.h> using namespace std; void assignHints (int subtask , int N, int A[], int B[]) { setHintLen(N-1); vector<vector<int>>adj(N); for (int i = 0; i < N; i++) { adj[A[i]].push_back(B[i]); adj[B[i]].push_back(A[i]); } for (int i = 0; i < N; i++) { if (adj[A[i]].size() == 1) setHint(i, 0, 0); else continue; } } void speedrun(int subtask , int N, int start ) { bool yo = getHint(0); int jefe; if (yo) { for (int i = 0; i < N; i++) { if (i == start) continue; if (!goTo(i)) continue; jefe = i; break; } } for (int i = 0; i < N; i++) { if (i == jefe) continue; goTo(i); goTo(jefe); } }

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

speedrun.cpp: In function 'void speedrun(int, int, int)':
speedrun.cpp:39:7: warning: 'jefe' may be used uninitialized in this function [-Wmaybe-uninitialized]
   39 |   goTo(jefe);
      |   ~~~~^~~~~~
#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...