| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 316553 | bigg | 항공 노선도 (JOI18_airline) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Alicelib.h"
#include<bits/stdc++.h>
using namespace std;
const int MAXN = 1010;
static vector<int> grafo[MAXN];
vector<pair<int, int> > vgrafo;
static int marc[1505][1505];
void Alice( int N, int M, int A[], int B[] ){
for(int i = 0; i < M; i++) {
grafo[A[i]].push_back(B[i]);
grafo[B[i]].push_back(A[i]);
vgrafo.push_back(make_pair(A[i], B[i]));
}
for(int i = 0; i < 10; i++){
for(int j = 0; j < N; j++){
if(j&(1<<i)){
vgrafo.push_back(make_pair(j, N + i));
}
}
vgrafo.push_back(make_pair(N + i, N + 10));
vgrafo.push_back(make_pair(N + i, N + 11));
if(i) vgrafo.push_back(make_pair(N+i, N + i -1));
}
vgrafo.push_back(make_pair(N + 1, N + 9));
vgrafo.push_back(make_pair(N + 3, N + 9));
for(int i = 0; i < N; i++){
vgrafo.push_back(make_pair(N + 11, i));
}
InitG(N + 12, vgrafo.size());
for(int i = 0; i < vgrafo.size(); i++){
MakeG(i, vgrafo[i].first, vgrafo[i].second);
}
}
#include "Alicelib.h"
#include<bits/stdc++.h>
using namespace std;
const int MAXN = 1010;
static vector<int> grafo[MAXN];
vector<pair<int, int> > vgrafo;
static int marc[1505][1505];
void Alice( int N, int M, int A[], int B[] ){
for(int i = 0; i < M; i++) {
grafo[A[i]].push_back(B[i]);
grafo[B[i]].push_back(A[i]);
vgrafo.push_back(make_pair(A[i], B[i]));
}
for(int i = 0; i < 10; i++){
for(int j = 0; j < N; j++){
if(j&(1<<i)){
vgrafo.push_back(make_pair(j, N + i));
}
}
vgrafo.push_back(make_pair(N + i, N + 10));
vgrafo.push_back(make_pair(N + i, N + 11));
if(i) vgrafo.push_back(make_pair(N+i, N + i -1));
}
vgrafo.push_back(make_pair(N + 1, N + 9));
vgrafo.push_back(make_pair(N + 3, N + 9));
for(int i = 0; i < N; i++){
vgrafo.push_back(make_pair(N + 11, i));
}
InitG(N + 12, vgrafo.size());
for(int i = 0; i < vgrafo.size(); i++){
MakeG(i, vgrafo[i].first, vgrafo[i].second);
}
}
