# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
29350 | 2017-07-19T03:27:24 Z | suhgyuho_william | Party (POI11_imp) | C++14 | 1666 ms | 37224 KB |
#include <bits/stdc++.h> #include <unistd.h> #define pii pair<int,int> #define pll pair<lld,lld> #define pb push_back #define next nextt #define left leftt #define right rightt #define lld long long #define Inf 1000000000 #define Mod 1000000007 #define Linf 1000000000000000000LL #define get gett int N,M; int a[3002][3002]; bool check[3002]; int main(){ scanf("%d %d",&N,&M); for(int i=1; i<=M; i++){ int x,y; scanf("%d %d",&x,&y); a[x][y] = a[y][x] = 1; } memset(check,1,sizeof(check)); for(int i=1; i<=N; i++){ if(!check[i]) continue; for(int j=1; j<=N; j++){ if(!check[j]) continue; if(a[i][j] == 0 && i != j){ check[i] = check[j] = false; break; } } } int cnt = 0; for(int i=1; i<=N; i++) if(check[i]){ printf("%d ",i); cnt++; if(cnt == N/3) return 0; } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 37224 KB | Output is correct |
2 | Correct | 0 ms | 37224 KB | Output is correct |
3 | Correct | 0 ms | 37224 KB | Output is correct |
4 | Correct | 0 ms | 37224 KB | Output is correct |
5 | Correct | 0 ms | 37224 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 37224 KB | Output is correct |
2 | Correct | 23 ms | 37224 KB | Output is correct |
3 | Correct | 23 ms | 37224 KB | Output is correct |
4 | Correct | 26 ms | 37224 KB | Output is correct |
5 | Correct | 33 ms | 37224 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 23 ms | 37224 KB | Output is correct |
2 | Correct | 163 ms | 37224 KB | Output is correct |
3 | Correct | 139 ms | 37224 KB | Output is correct |
4 | Correct | 136 ms | 37224 KB | Output is correct |
5 | Correct | 139 ms | 37224 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 43 ms | 37224 KB | Output is correct |
2 | Correct | 256 ms | 37224 KB | Output is correct |
3 | Correct | 319 ms | 37224 KB | Output is correct |
4 | Correct | 393 ms | 37224 KB | Output is correct |
5 | Correct | 419 ms | 37224 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 109 ms | 37224 KB | Output is correct |
2 | Correct | 533 ms | 37224 KB | Output is correct |
3 | Correct | 536 ms | 37224 KB | Output is correct |
4 | Correct | 603 ms | 37224 KB | Output is correct |
5 | Correct | 426 ms | 37224 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 313 ms | 37224 KB | Output is correct |
2 | Correct | 726 ms | 37224 KB | Output is correct |
3 | Correct | 659 ms | 37224 KB | Output is correct |
4 | Correct | 596 ms | 37224 KB | Output is correct |
5 | Correct | 659 ms | 37224 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 569 ms | 37224 KB | Output is correct |
2 | Correct | 973 ms | 37224 KB | Output is correct |
3 | Correct | 903 ms | 37224 KB | Output is correct |
4 | Correct | 883 ms | 37224 KB | Output is correct |
5 | Correct | 936 ms | 37224 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 736 ms | 37224 KB | Output is correct |
2 | Correct | 976 ms | 37224 KB | Output is correct |
3 | Correct | 996 ms | 37224 KB | Output is correct |
4 | Correct | 939 ms | 37224 KB | Output is correct |
5 | Correct | 1026 ms | 37224 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 943 ms | 37224 KB | Output is correct |
2 | Correct | 1349 ms | 37224 KB | Output is correct |
3 | Correct | 1343 ms | 37224 KB | Output is correct |
4 | Correct | 1313 ms | 37224 KB | Output is correct |
5 | Correct | 1333 ms | 37224 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1166 ms | 37224 KB | Output is correct |
2 | Correct | 1459 ms | 37224 KB | Output is correct |
3 | Correct | 1463 ms | 37224 KB | Output is correct |
4 | Correct | 1626 ms | 37224 KB | Output is correct |
5 | Correct | 1616 ms | 37224 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1489 ms | 37224 KB | Output is correct |
2 | Correct | 1649 ms | 37224 KB | Output is correct |
3 | Correct | 1666 ms | 37224 KB | Output is correct |
4 | Correct | 1543 ms | 37224 KB | Output is correct |
5 | Correct | 1386 ms | 37224 KB | Output is correct |