제출 #834727

#제출 시각아이디문제언어결과실행 시간메모리
834727IS_Rushdi열쇠 (IOI21_keys)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; vector<int> find_reachable(vector<int> r, vector<int> u, vector<int> v, vector<int> c) { vector<int> ans(r.size(), 1); int n = r.size(); int m = u.size(); vector<vector<int>>a(n); vector<int>tmp(n); for(int i = 0; i < m; i++){ a[v[i]].push_back(u[i]); a[u[i]].push_back(v[i]); } int mn = 1e9; for(int i = 0; i < n; i++){ vector<bool>vis(n,0); queue<pair<int,bool>>q; q.push({i,0}); int c = 0; while(!q.empty()){ int node = q.front().first; bool can = q.front().second; if(vis[node]) continue; vis[node]=1; c++; if(r[node] == 0) can=1; if(can){ for(int to : a[node]){ q.push({to,can}); } } } tmp[i] = c; mn = min(mn,c); } for(int i = 0; i < n; i++){ if(tmp[i] == mn) ans[i] = 1; else ans[i] = 0; } return ans; } int main(){ }

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

/usr/bin/ld: /tmp/ccNCW7Kt.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccgGu3xt.o:keys.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status