제출 #526527

#제출 시각아이디문제언어결과실행 시간메모리
526527beksultan04즐거운 행로 (APIO20_fun)C++14
0 / 100
2082 ms2292 KiB
#include "fun.h" //#include "grader.cpp" #include <bits/stdc++.h> #define ret return #define fr first #define sc second #define pb push_back #define endi puts(""); #define NO puts("NO"); #define OK puts("OK"); using namespace std; const int INF = 1e5+12; bool asa,ll=0; int dis[1001][1001],n,used[1001]; vector <int> ans; void dfs(int x,int dl){ if (ll == 1)ret ; if (ans.size() == n){ ll = 1; ret ; } for (int i=0;i<n;++i){ if (x == i || used[i])continue; if (!dis[x][i]){ dis[x][i] = hoursRequired(x,i); dis[i][x] = dis[x][i]; } if (dl >= dis[x][i]){ used[i] = 1; ans.pb(i); dfs(i,dis[x][i]); if (ll == 1)ret ; ans.pop_back(); used[i] = 0; } } } vector<int> createFunTour(int N, int Q) { n = N; dfs(0,INF); ret ans; }

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

fun.cpp: In function 'void dfs(int, int)':
fun.cpp:20:20: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   20 |     if (ans.size() == n){
      |         ~~~~~~~~~~~^~~~
#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...