# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
474650 | sean617 | 우호 조약 체결 (JOI14_friends) | C++98 | 124 ms | 13832 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <cstdio>
#include <vector>
#include <queue>
#define N 100005
using namespace std;
typedef long long ll;
ll n, m, ans, bu[N], v[N], m1[N*2], m2[N*2], s[N];
vector<int> a[N];
queue<int> qu;
ll f(ll p) {
if (bu[p] == p) return p;
else return bu[p] = f(bu[p]);;
}
void pu(int p) {
if (v[p]) return;
v[p] = 1;
qu.push(p);
}
int main()
{
ll i, j, t, t1, t2, x1, x2;
ios::sync_with_stdio(0);
cin.tie(0);
cin >> n >> m;
for (i = 0; i < m; i++) {
cin >> t1 >> t2;
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |