# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
834633 | kingfran1907 | 조이터에서 친구를 만드는건 재밌어 (JOI20_joitter2) | C++14 | 9 ms | 19028 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define X first
#define Y second
using namespace std;
typedef long long llint;
const int maxn = 2e5+10;
int n, m;
int cale[maxn], siz[maxn];
llint sol = 0;
set< pair<int, int> > graph[maxn], graph2[maxn];
int fin(int x) {
if (x == cale[x]) return x;
return cale[x] = fin(cale[x]);
}
int get_size(int x) {
return graph[x].size() + graph2[x].size();
}
void remove(int x, set< pair<int, int> > &s, bool flag = false) {
auto iter = s.lower_bound({x, -1});
while (iter != s.end() && iter->X == x) {
//if (flag) printf("removing: %d %d (%d)\n", iter->X, iter->Y, siz[x]);
sol -= siz[x] * flag;
iter = s.erase(iter);
}
}
컴파일 시 표준 에러 (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... |