Task: | Korn |
Sender: | zxc |
Submission time: | 2016-08-04 15:41:02 +0300 |
Language: | C++ |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | RUNTIME ERROR | 0 |
test | verdict | time | |
---|---|---|---|
#1 | RUNTIME ERROR | 0.06 s | details |
#2 | RUNTIME ERROR | 0.06 s | details |
#3 | RUNTIME ERROR | 0.06 s | details |
#4 | RUNTIME ERROR | 0.06 s | details |
#5 | RUNTIME ERROR | 0.06 s | details |
#6 | RUNTIME ERROR | 0.05 s | details |
#7 | RUNTIME ERROR | 0.05 s | details |
#8 | RUNTIME ERROR | 0.06 s | details |
#9 | RUNTIME ERROR | 0.05 s | details |
#10 | RUNTIME ERROR | 0.05 s | details |
#11 | RUNTIME ERROR | 0.06 s | details |
#12 | RUNTIME ERROR | 0.06 s | details |
#13 | RUNTIME ERROR | 0.06 s | details |
#14 | RUNTIME ERROR | 0.06 s | details |
#15 | RUNTIME ERROR | 0.06 s | details |
#16 | RUNTIME ERROR | 0.05 s | details |
#17 | RUNTIME ERROR | 0.06 s | details |
#18 | RUNTIME ERROR | 0.07 s | details |
#19 | RUNTIME ERROR | 0.05 s | details |
#20 | RUNTIME ERROR | 0.06 s | details |
#21 | RUNTIME ERROR | 0.06 s | details |
#22 | RUNTIME ERROR | 0.06 s | details |
#23 | RUNTIME ERROR | 0.07 s | details |
#24 | RUNTIME ERROR | 0.05 s | details |
#25 | RUNTIME ERROR | 0.05 s | details |
#26 | RUNTIME ERROR | 0.06 s | details |
#27 | RUNTIME ERROR | 0.06 s | details |
#28 | RUNTIME ERROR | 0.06 s | details |
#29 | RUNTIME ERROR | 0.06 s | details |
#30 | RUNTIME ERROR | 0.06 s | details |
#31 | RUNTIME ERROR | 0.05 s | details |
#32 | RUNTIME ERROR | 0.06 s | details |
#33 | RUNTIME ERROR | 0.06 s | details |
#34 | RUNTIME ERROR | 0.06 s | details |
#35 | RUNTIME ERROR | 0.06 s | details |
#36 | RUNTIME ERROR | 0.05 s | details |
#37 | RUNTIME ERROR | 0.06 s | details |
#38 | RUNTIME ERROR | 0.06 s | details |
#39 | RUNTIME ERROR | 0.06 s | details |
#40 | RUNTIME ERROR | 0.06 s | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:11:5: warning: 'm' may be used uninitialized in this function [-Wmaybe-uninitialized] for(int i = 0; i < m; ++i) { ^ input/code.cpp:18:5: warning: 'n' may be used uninitialized in this function [-Wmaybe-uninitialized] for(int i = 1; i <= n; ++i) { ^
Code
#include <iostream> #include <set> #include <vector> using namespace std; const int MN = 5e5+100; vector<int> v[MN]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n,m; for(int i = 0; i < m; ++i) { int a,b; cin>>a>>b; v[a].push_back(b); v[b].push_back(a); } int ma = 0; for(int i = 1; i <= n; ++i) { ma = max(ma, (int)v[i].size()); if(v[i].size() % 2 != 0) { cout<<0<<endl; return 0; } } int maCnt = 0; for(int i = 1; i <= n; ++i) { if((int)v[i].size() == ma) ++maCnt; if(v[i].size() % 2 != 0) { cout<<0<<endl; return 0; } } if(maCnt > 2) { cout<<0<<endl; return 0; } return -1; }
Test details
Test 1
Verdict: RUNTIME ERROR
input |
---|
6 8 3 5 5 1 3 4 4 1 ... |
correct output |
---|
2 1 3 |
user output |
---|
(empty) |
Test 2
Verdict: RUNTIME ERROR
input |
---|
3 3 1 2 2 3 3 1 |
correct output |
---|
3 1 2 3 |
user output |
---|
(empty) |
Test 3
Verdict: RUNTIME ERROR
input |
---|
3 2 1 3 2 3 |
correct output |
---|
0 |
user output |
---|
(empty) |
Test 4
Verdict: RUNTIME ERROR
input |
---|
5 7 1 3 4 2 1 2 1 4 ... |
correct output |
---|
2 1 2 |
user output |
---|
(empty) |
Test 5
Verdict: RUNTIME ERROR
input |
---|
5 5 5 3 1 5 2 1 4 2 ... |
correct output |
---|
5 1 2 3 4 5 |
user output |
---|
(empty) |
Test 6
Verdict: RUNTIME ERROR
input |
---|
5 6 4 1 5 3 1 5 4 3 ... |
correct output |
---|
0 |
user output |
---|
(empty) |
Test 7
Verdict: RUNTIME ERROR
input |
---|
10 14 2 3 5 2 4 3 6 3 ... |
correct output |
---|
1 3 |
user output |
---|
(empty) |
Test 8
Verdict: RUNTIME ERROR
input |
---|
10 10 4 5 2 9 8 1 7 10 ... |
correct output |
---|
10 1 2 3 4 5 6 7 8 9 10 |
user output |
---|
(empty) |
Test 9
Verdict: RUNTIME ERROR
input |
---|
10 16 1 6 9 8 9 3 5 1 ... |
correct output |
---|
2 1 9 |
user output |
---|
(empty) |
Test 10
Verdict: RUNTIME ERROR
input |
---|
100 168 53 8 35 44 98 64 28 85 ... |
correct output |
---|
1 62 |
user output |
---|
(empty) |
Test 11
Verdict: RUNTIME ERROR
input |
---|
100 100 53 69 80 33 31 19 61 45 ... |
correct output |
---|
100 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
(empty) |
Test 12
Verdict: RUNTIME ERROR
input |
---|
100 196 44 85 68 86 86 55 44 56 ... |
correct output |
---|
2 44 86 |
user output |
---|
(empty) |
Test 13
Verdict: RUNTIME ERROR
input |
---|
1000 1636 85 954 434 807 657 942 363 998 ... |
correct output |
---|
1 942 |
user output |
---|
(empty) |
Test 14
Verdict: RUNTIME ERROR
input |
---|
1000 1000 154 824 455 878 521 429 806 795 ... |
correct output |
---|
1000 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
(empty) |
Test 15
Verdict: RUNTIME ERROR
input |
---|
1000 1996 346 472 472 632 472 737 666 742 ... |
correct output |
---|
2 472 666 |
user output |
---|
(empty) |
Test 16
Verdict: RUNTIME ERROR
input |
---|
10000 16544 8723 5854 6694 5854 5813 9842 7775 450 ... |
correct output |
---|
1 5854 |
user output |
---|
(empty) |
Test 17
Verdict: RUNTIME ERROR
input |
---|
10000 10000 6328 1933 3215 2119 133 597 5752 355 ... |
correct output |
---|
10000 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
(empty) |
Test 18
Verdict: RUNTIME ERROR
input |
---|
10000 19996 3251 3276 7746 2914 7968 3276 4133 3276 ... |
correct output |
---|
2 3276 7746 |
user output |
---|
(empty) |
Test 19
Verdict: RUNTIME ERROR
input |
---|
100000 166466 48709 66850 19284 9360 70023 41035 10202 54726 ... |
correct output |
---|
1 26348 |
user output |
---|
(empty) |
Test 20
Verdict: RUNTIME ERROR
input |
---|
100000 100000 13837 61303 89733 92564 27261 66328 53389 4963 ... |
correct output |
---|
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
(empty) |
Test 21
Verdict: RUNTIME ERROR
input |
---|
100000 199996 7841 69346 92805 7841 2391 7841 35715 86148 ... |
correct output |
---|
2 7841 86148 |
user output |
---|
(empty) |
Test 22
Verdict: RUNTIME ERROR
input |
---|
200000 333292 177495 59529 65976 27906 183521 63384 130253 63384 ... |
correct output |
---|
1 63384 |
user output |
---|
(empty) |
Test 23
Verdict: RUNTIME ERROR
input |
---|
200000 200000 172688 83121 94308 125397 121698 111684 122896 139134 ... |
correct output |
---|
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
user output |
---|
(empty) |
Test 24
Verdict: RUNTIME ERROR
input |
---|
200000 399996 195502 195302 97487 195502 31836 180762 31836 114578 ... |
correct output |
---|
2 31836 195502 |
user output |
---|
(empty) |
Test 25
Verdict: RUNTIME ERROR
input |
---|
199999 299997 133842 56831 161198 197552 52013 56831 113824 141089 ... |
correct output |
---|
1 56831 |
user output |
---|
(empty) |
Test 26
Verdict: RUNTIME ERROR
input |
---|
199966 266620 30805 74947 131498 74947 148055 45573 176247 144198 ... |
correct output |
---|
1 74947 |
user output |
---|
(empty) |
Test 27
Verdict: RUNTIME ERROR
input |
---|
199996 239994 194088 176928 84078 66003 155399 181267 109363 24037 ... |
correct output |
---|
1 109562 |
user output |
---|
(empty) |
Test 28
Verdict: RUNTIME ERROR
input |
---|
199991 219989 26995 182816 44231 104797 66799 189612 60325 120474 ... |
correct output |
---|
1 104797 |
user output |
---|
(empty) |
Test 29
Verdict: RUNTIME ERROR
input |
---|
199901 201899 183049 162042 30129 98024 109542 162807 165887 186046 ... |
correct output |
---|
1 174098 |
user output |
---|
(empty) |
Test 30
Verdict: RUNTIME ERROR
input |
---|
199001 199199 190576 15936 195289 88100 62330 151921 85433 28871 ... |
correct output |
---|
1 193563 |
user output |
---|
(empty) |
Test 31
Verdict: RUNTIME ERROR
input |
---|
190001 190019 146460 136366 152584 71295 18424 74288 160666 4293 ... |
correct output |
---|
1 27520 |
user output |
---|
(empty) |
Test 32
Verdict: RUNTIME ERROR
input |
---|
199999 200000 83463 54906 14939 155153 76174 149737 103606 118771 ... |
correct output |
---|
1 72170 |
user output |
---|
(empty) |
Test 33
Verdict: RUNTIME ERROR
input |
---|
199999 250000 123656 75970 102071 118565 107227 44491 45664 44905 ... |
correct output |
---|
1 123656 |
user output |
---|
(empty) |
Test 34
Verdict: RUNTIME ERROR
input |
---|
198999 232000 42059 44655 32973 54440 47844 127864 146216 69825 ... |
correct output |
---|
1 54440 |
user output |
---|
(empty) |
Test 35
Verdict: RUNTIME ERROR
input |
---|
200000 343236 6172 121380 73997 136680 36608 38156 197529 31059 ... |
correct output |
---|
0 |
user output |
---|
(empty) |
Test 36
Verdict: RUNTIME ERROR
input |
---|
200000 449162 22188 74069 131951 149472 119926 72522 95032 63026 ... |
correct output |
---|
0 |
user output |
---|
(empty) |
Test 37
Verdict: RUNTIME ERROR
input |
---|
200000 449162 55595 43502 66495 49607 133565 22459 94162 167595 ... |
correct output |
---|
0 |
user output |
---|
(empty) |
Test 38
Verdict: RUNTIME ERROR
input |
---|
100000 425091 50386 81052 89464 80178 93037 61330 22465 60956 ... |
correct output |
---|
0 |
user output |
---|
(empty) |
Test 39
Verdict: RUNTIME ERROR
input |
---|
100000 474998 59563 73951 69846 82117 79750 49503 65426 15307 ... |
correct output |
---|
0 |
user output |
---|
(empty) |
Test 40
Verdict: RUNTIME ERROR
input |
---|
3 2 1 2 3 1 |
correct output |
---|
0 |
user output |
---|
(empty) |