제출 #826614

#제출 시각아이디문제언어결과실행 시간메모리
826614Marco_Escandon기지국 (IOI20_stations)C++17
0 / 100
3034 ms2097152 KiB
#include <vector> #include <bits/stdc++.h> using namespace std; typedef long long ll; ll vis=0; vector<int> sol; vector<ll> cad[1001]; void dfs(ll node,ll p, ll p2) { if(p2%2==0) { sol[node]=vis; vis++; } for(auto i:cad[node]) { if(i!=p) { dfs(i,node,p2+1); } } if(p2%2==1) { sol[node]=vis; vis++; } } std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) { for(int i=0; i<u.size(); i++) { cad[u[i]].push_back(v[i]); cad[v[i]].push_back(u[i]); } sol.resize(n); dfs(0,-1,0); return sol; } int find_next_station(int s, int t, std::vector<int> c) { return 0; }

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

stations.cpp: In function 'std::vector<int> label(int, int, std::vector<int>, std::vector<int>)':
stations.cpp:30:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   30 |     for(int i=0; i<u.size(); i++)
      |                  ~^~~~~~~~~
#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...