제출 #127635

#제출 시각아이디문제언어결과실행 시간메모리
127635chubyxdxdSimurgh (IOI17_simurgh)C++11
0 / 100
2 ms376 KiB
#include "simurgh.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> ii; std::vector<int> find_roads(int n, std::vector<int> u, std::vector<int> v){ ll tam=u.size(); //initset(tam); map<ll,ii> mp; set<ll> se; for(ll i = 0; i<tam; i++){ //unionset(u[i],v[i]); mp[i]=ii(v[i],u[i]); } vector<int> r; for(ll i=0;i<(1<<tam);i++){ ll h=__builtin_popcount(i); se.clear(); r.clear(); if(h!=n-1){ continue; } else{ for(int j=0;j<tam;j++){ if(i&(1<<j)){ r.push_back(j); } } for(int j=0;j<n-1;j++){ se.insert(mp[r[j]].first); se.insert(mp[r[j]].second); } int k=se.size(); if(k==n-1){ int common=count_common_roads(r); if(common==n-1){ return r; } } } } //int common=count_common_roads(r); }

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

simurgh.cpp: In function 'std::vector<int> find_roads(int, std::vector<int>, std::vector<int>)':
simurgh.cpp:44:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#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...