| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 412650 | A_D | 낙하산 고리들 (IOI12_rings) | C++14 | 403 ms | 50068 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int n;
const int N=1e6+100;
vector<int> g[N];
int mx=0;
int me[N];
int freq[7][7];
void Init(int N_) {
n = N_;
}
void Link(int a, int b){
if(mx>=5)return;
g[a].push_back(b);
g[b].push_back(a);
mx=max(mx,(int)g[a].size());
mx=max(mx,(int)g[b].size());
me[g[a].size()]++;
me[g[b].size()]++;
for(auto x:g[a]){
freq[g[a].size()][g[x].size()]++;
}
for(auto x:g[b]){
freq[g[b].size()][g[x].size()]++;
}
}
int CountCritical() {
if(mx>=5)return 0;
if(mx<=2)return n;
if(mx==4){
if(me[4]>1)return 0;
return freq[4][me[3]-1];
}
else{
return freq[3][me[3]-1];
}
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
