| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1358177 | opeleklanos | Potemkin cycle (CEOI15_indcyc) | C++20 | 0 ms | 344 KiB |
#include <iostream>
#include <vector>
using namespace std;
vector<vector<bool>> adj;
vector<int> vis;
vector<int> s;
int main(void){
freopen("input.txt", "r", stdin);
int n, m; cin>>n>>m;
adj.assign(n, vector<bool>(n, 0));
vector<pair<int, int>> edges (m, pair<int, int> {0, 0});
for(int i = 0; i<m; i++){
int a, b; cin>>a>>b;
a--, b--;
edges[i] = {a, b};
adj[a][b] = 1;
adj[b][a] = 1;
}
for(auto e:edges){
int l = -1, r = -1;
for(int i = 0; i<n; i++){
if(i == e.first || i == e.second) continue;
if(adj[e.first][i] == 1 && adj[e.second][i] == 0) l = i;
else if(adj[e.first][i] == 0 && adj[e.second][i] == 1) r = i;
}
if(l != -1 && r != -1){
cout<<l+1<<' '<<e.first+1<<' '<<e.second+1<<' '<<r+1<<endl;
return 0;
}
}
cout<<"no"<<endl;
return 0;
}컴파일 시 표준 에러 (stderr) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
