제출 #592169

#제출 시각아이디문제언어결과실행 시간메모리
592169PiejanVDC기지국 (IOI20_stations)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "stations.h" using namespace std; vector<int>label(int n, int k, vector<int>u, vector<int>v) { vector<int>adj[n]; for(int i = 0 ; i < (int)u.size() ; i++) { adj[u[i]].push_back(v[i]); adj[v[i]].push_back(u[i]); } int start; for(int i = 0 ; i < n ; i++) { if((int)adj[i].size() == 1) start = i; } vector<int>l(n); vectro<bool>vis(n, 0); for(int i = 0 ; i < n ; i++) { vis[start] = 1; l[start] = i; for(auto z : adj[start]) if(!vis[z]) start = z; } return l; } int find_next_station(int s, int t, vector<int>c) { if(s < t) return c[1]; return c[0]; }

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

stations.cpp: In function 'std::vector<int> label(int, int, std::vector<int>, std::vector<int>)':
stations.cpp:22:5: error: 'vectro' was not declared in this scope
   22 |     vectro<bool>vis(n, 0);
      |     ^~~~~~
stations.cpp:22:12: error: expected primary-expression before 'bool'
   22 |     vectro<bool>vis(n, 0);
      |            ^~~~
stations.cpp:25:9: error: 'vis' was not declared in this scope
   25 |         vis[start] = 1;
      |         ^~~