Task: | Online feud |
Sender: | aalto2024g_004 |
Submission time: | 2024-10-09 16:59:08 +0300 |
Language: | C++ (C++20) |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.00 s | details |
#2 | WRONG ANSWER | 0.00 s | details |
#3 | WRONG ANSWER | 0.00 s | details |
#4 | WRONG ANSWER | 0.00 s | details |
#5 | WRONG ANSWER | 0.00 s | details |
#6 | WRONG ANSWER | 0.00 s | details |
#7 | WRONG ANSWER | 0.00 s | details |
#8 | WRONG ANSWER | 0.00 s | details |
#9 | WRONG ANSWER | 0.00 s | details |
#10 | WRONG ANSWER | 0.00 s | details |
#11 | WRONG ANSWER | 0.00 s | details |
#12 | WRONG ANSWER | 0.00 s | details |
#13 | WRONG ANSWER | 0.00 s | details |
#14 | WRONG ANSWER | 0.00 s | details |
#15 | WRONG ANSWER | 0.00 s | details |
#16 | WRONG ANSWER | 0.00 s | details |
#17 | WRONG ANSWER | 0.00 s | details |
#18 | WRONG ANSWER | 0.01 s | details |
#19 | WRONG ANSWER | 0.00 s | details |
#20 | WRONG ANSWER | 0.00 s | details |
#21 | WRONG ANSWER | 0.00 s | details |
#22 | WRONG ANSWER | 0.00 s | details |
#23 | WRONG ANSWER | 0.00 s | details |
#24 | WRONG ANSWER | 0.00 s | details |
#25 | WRONG ANSWER | 0.00 s | details |
#26 | WRONG ANSWER | 0.00 s | details |
#27 | WRONG ANSWER | 0.00 s | details |
#28 | WRONG ANSWER | 0.00 s | details |
#29 | WRONG ANSWER | 0.00 s | details |
#30 | WRONG ANSWER | 0.00 s | details |
#31 | WRONG ANSWER | 0.00 s | details |
#32 | WRONG ANSWER | 0.00 s | details |
#33 | WRONG ANSWER | 0.00 s | details |
#34 | WRONG ANSWER | 0.00 s | details |
#35 | WRONG ANSWER | 0.00 s | details |
#36 | WRONG ANSWER | 0.00 s | details |
#37 | WRONG ANSWER | 0.00 s | details |
#38 | WRONG ANSWER | 0.00 s | details |
#39 | WRONG ANSWER | 0.00 s | details |
#40 | WRONG ANSWER | 0.00 s | details |
#41 | WRONG ANSWER | 0.00 s | details |
#42 | WRONG ANSWER | 0.00 s | details |
#43 | WRONG ANSWER | 0.00 s | details |
#44 | WRONG ANSWER | 0.00 s | details |
#45 | WRONG ANSWER | 0.00 s | details |
#46 | WRONG ANSWER | 0.00 s | details |
#47 | WRONG ANSWER | 0.00 s | details |
#48 | WRONG ANSWER | 0.00 s | details |
#49 | WRONG ANSWER | 0.00 s | details |
#50 | WRONG ANSWER | 0.00 s | details |
#51 | WRONG ANSWER | 0.00 s | details |
#52 | WRONG ANSWER | 0.01 s | details |
#53 | WRONG ANSWER | 0.01 s | details |
#54 | WRONG ANSWER | 0.01 s | details |
#55 | WRONG ANSWER | 0.01 s | details |
#56 | WRONG ANSWER | 0.01 s | details |
#57 | WRONG ANSWER | 0.01 s | details |
#58 | WRONG ANSWER | 0.01 s | details |
#59 | WRONG ANSWER | 0.00 s | details |
#60 | WRONG ANSWER | 0.01 s | details |
#61 | WRONG ANSWER | 0.00 s | details |
#62 | WRONG ANSWER | 0.21 s | details |
#63 | WRONG ANSWER | 0.21 s | details |
#64 | WRONG ANSWER | 0.19 s | details |
#65 | WRONG ANSWER | 0.21 s | details |
#66 | WRONG ANSWER | 0.38 s | details |
#67 | WRONG ANSWER | 0.13 s | details |
#68 | WRONG ANSWER | 0.36 s | details |
#69 | WRONG ANSWER | 0.11 s | details |
#70 | WRONG ANSWER | 0.25 s | details |
#71 | WRONG ANSWER | 0.09 s | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:15:19: warning: comparison of integer expressions of different signedness: 'int' and 'ull' {aka 'long long unsigned int'} [-Wsign-compare] 15 | for(int i=0; i<m; i++){ | ~^~ input/code.cpp:23:19: warning: comparison of integer expressions of different signedness: 'int' and 'ull' {aka 'long long unsigned int'} [-Wsign-compare] 23 | for(int i=1; i<=n; i++){ | ~^~~ input/code.cpp:45:19: warning: comparison of integer expressions of different signedness: 'int' and 'ull' {aka 'long long unsigned int'} [-Wsign-compare] 45 | for(int i=1; i<n; i++){ | ~^~
Code
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; ll d[100001]; bool processed[100001]; int main(){ ull n, m; cin >> n >> m; map<ll, vector<pair<ll, ll>>> adj; for(int i=0; i<m; i++){ ll a, b, w; cin >> a >> b >> w; adj[a].push_back({b,w}); // adj[a].push_back({b,w}); } priority_queue<pair<ll, ll>> q; for(int i=1; i<=n; i++){ d[i] = LLONG_MAX; } d[1] = 0; q.push({0,1}); while(!q.empty()){ int a = q.top().second; q.pop(); if (processed[a]) continue; processed[a] = true; for(auto u : adj[a]) { auto[b,w] = u; if (d[a]+w < d[b]) { d[b] = d[a]+w; q.push({-d[b],b}); } } } cout << "0"; for(int i=1; i<n; i++){ cout << " " << d[i+1]; } cout << endl; }
Test details
Test 1
Verdict: WRONG ANSWER
input |
---|
2 4 2 1 1 1 2 -1 1 2 1 1 2 -1 |
correct output |
---|
No |
user output |
---|
0 -1 |
Test 2
Verdict: WRONG ANSWER
input |
---|
2 4 1 2 -1 2 1 -1 1 2 -1 1 2 -1 |
correct output |
---|
Yes |
user output |
---|
0 -1 |
Test 3
Verdict: WRONG ANSWER
input |
---|
3 2 2 3 1 3 2 1 |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... |
Test 4
Verdict: WRONG ANSWER
input |
---|
3 4 3 1 -1 2 1 -1 2 1 -1 1 2 -1 |
correct output |
---|
Yes |
user output |
---|
0 -1 9223372036854775807 |
Test 5
Verdict: WRONG ANSWER
input |
---|
3 5 1 2 1 3 2 -1 3 2 1 3 2 1 ... |
correct output |
---|
No |
user output |
---|
0 1 9223372036854775807 |
Test 6
Verdict: WRONG ANSWER
input |
---|
4 3 4 1 -1 1 2 1 2 4 -1 |
correct output |
---|
Yes |
user output |
---|
0 1 9223372036854775807 0 |
Test 7
Verdict: WRONG ANSWER
input |
---|
4 8 3 4 1 1 3 -1 2 3 -1 1 2 1 ... |
correct output |
---|
Yes |
user output |
---|
0 1 -1 -1 |
Test 8
Verdict: WRONG ANSWER
input |
---|
4 8 3 2 -1 3 1 -1 1 2 1 1 2 1 ... |
correct output |
---|
Yes |
user output |
---|
0 -2 -1 0 |
Test 9
Verdict: WRONG ANSWER
input |
---|
4 7 3 4 1 3 2 -1 2 1 1 1 4 -1 ... |
correct output |
---|
No |
user output |
---|
0 0 1 -1 |
Test 10
Verdict: WRONG ANSWER
input |
---|
4 8 3 1 -1 1 2 1 4 3 1 1 2 -1 ... |
correct output |
---|
No |
user output |
---|
0 -1 1 0 |
Test 11
Verdict: WRONG ANSWER
input |
---|
4 7 1 3 -1 4 2 1 3 4 1 4 2 -1 ... |
correct output |
---|
No |
user output |
---|
0 -1 -1 0 |
Test 12
Verdict: WRONG ANSWER
input |
---|
5 7 4 5 -1 5 3 -1 3 4 -1 2 3 1 ... |
correct output |
---|
No |
user output |
---|
0 9223372036854775807 92233720... |
Test 13
Verdict: WRONG ANSWER
input |
---|
5 6 4 5 1 1 2 -1 1 2 1 2 1 1 ... |
correct output |
---|
No |
user output |
---|
0 -1 0 0 1 |
Test 14
Verdict: WRONG ANSWER
input |
---|
5 6 4 5 1 1 3 1 4 5 1 2 4 1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 1 922337... |
Test 15
Verdict: WRONG ANSWER
input |
---|
5 7 4 5 1 1 3 1 1 4 -1 1 4 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 -2 -1 0 |
Test 16
Verdict: WRONG ANSWER
input |
---|
5 10 3 1 -1 5 4 -1 4 3 1 1 5 1 ... |
correct output |
---|
No |
user output |
---|
0 9223372036854775807 0 0 1 |
Test 17
Verdict: WRONG ANSWER
input |
---|
5 4 4 5 -1 5 3 -1 3 5 -1 3 4 1 |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... |
Test 18
Verdict: WRONG ANSWER
input |
---|
5 10 1 5 -1 1 3 -1 3 4 -1 3 4 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 -1 -2 -3 |
Test 19
Verdict: WRONG ANSWER
input |
---|
5 3 5 2 -1 4 3 -1 2 4 -1 |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... |
Test 20
Verdict: WRONG ANSWER
input |
---|
5 9 5 4 -1 1 5 -1 3 5 -1 1 3 1 ... |
correct output |
---|
Yes |
user output |
---|
0 -2 1 -2 -3 |
Test 21
Verdict: WRONG ANSWER
input |
---|
5 3 1 3 -1 1 3 -1 3 4 1 |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 -1 0 922... |
Test 22
Verdict: WRONG ANSWER
input |
---|
10 14 8 9 -1 9 6 -1 5 7 -1 4 5 1 ... |
correct output |
---|
No |
user output |
---|
0 9223372036854775807 92233720... |
Test 23
Verdict: WRONG ANSWER
input |
---|
10 12 8 10 1 2 4 -1 2 3 1 4 2 1 ... |
correct output |
---|
No |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 24
Verdict: WRONG ANSWER
input |
---|
10 12 9 10 1 2 5 1 8 10 1 5 8 1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 25
Verdict: WRONG ANSWER
input |
---|
10 14 8 10 1 3 7 1 1 8 -1 1 8 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 26
Verdict: WRONG ANSWER
input |
---|
10 20 6 2 -1 9 8 -1 7 6 1 2 10 1 ... |
correct output |
---|
No |
user output |
---|
0 -1 9223372036854775807 92233... |
Test 27
Verdict: WRONG ANSWER
input |
---|
10 9 9 10 1 9 10 1 9 7 -1 3 10 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 1 922337... Truncated |
Test 28
Verdict: WRONG ANSWER
input |
---|
10 19 4 3 -1 2 10 -1 1 6 -1 5 6 1 ... |
correct output |
---|
No |
user output |
---|
0 -2 9223372036854775807 92233... Truncated |
Test 29
Verdict: WRONG ANSWER
input |
---|
10 7 10 4 -1 8 7 -1 4 8 -1 2 8 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 30
Verdict: WRONG ANSWER
input |
---|
10 19 10 8 -1 1 10 -1 5 10 -1 2 6 1 ... |
correct output |
---|
Yes |
user output |
---|
0 1 -2 9223372036854775807 1 2... |
Test 31
Verdict: WRONG ANSWER
input |
---|
10 6 3 6 -1 1 6 -1 6 7 1 1 7 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 32
Verdict: WRONG ANSWER
input |
---|
100 133 72 85 -1 86 55 -1 43 63 -1 39 44 1 ... |
correct output |
---|
No |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 33
Verdict: WRONG ANSWER
input |
---|
100 113 73 94 1 13 31 -1 15 24 1 40 19 1 ... |
correct output |
---|
No |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 34
Verdict: WRONG ANSWER
input |
---|
100 116 1 2 1 1 34 -1 71 1 -1 1 50 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 -4 9223372036854775807 -1 92... Truncated |
Test 35
Verdict: WRONG ANSWER
input |
---|
100 133 74 88 1 31 66 1 9 72 -1 4 73 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 -4 92233... Truncated |
Test 36
Verdict: WRONG ANSWER
input |
---|
100 196 55 18 -1 86 72 -1 70 60 1 15 98 1 ... |
correct output |
---|
No |
user output |
---|
0 -7 -3 9223372036854775807 -8... Truncated |
Test 37
Verdict: WRONG ANSWER
input |
---|
100 84 92 100 1 89 96 1 92 67 -1 26 100 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 38
Verdict: WRONG ANSWER
input |
---|
100 184 34 21 -1 7 5 1 11 99 -1 10 53 -1 ... |
correct output |
---|
No |
user output |
---|
0 -10 9223372036854775807 -1 -... Truncated |
Test 39
Verdict: WRONG ANSWER
input |
---|
100 62 100 34 -1 85 76 -1 39 79 -1 21 78 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 40
Verdict: WRONG ANSWER
input |
---|
100 182 98 84 -1 98 99 1 99 100 1 51 100 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 41
Verdict: WRONG ANSWER
input |
---|
100 52 25 51 -1 8 51 -1 57 68 1 5 70 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 42
Verdict: WRONG ANSWER
input |
---|
200 265 144 169 -1 172 109 -1 85 125 -1 77 88 1 ... |
correct output |
---|
No |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 43
Verdict: WRONG ANSWER
input |
---|
200 226 145 187 1 26 61 -1 30 48 1 80 38 1 ... |
correct output |
---|
No |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 44
Verdict: WRONG ANSWER
input |
---|
200 231 4 5 1 3 68 -1 142 2 -1 2 100 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 -9 -8 -7 -8 9223372036854775... Truncated |
Test 45
Verdict: WRONG ANSWER
input |
---|
200 266 149 176 1 62 133 1 18 144 -1 8 147 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 46
Verdict: WRONG ANSWER
input |
---|
200 391 110 35 -1 172 143 -1 140 120 1 29 196 1 ... |
correct output |
---|
No |
user output |
---|
0 9223372036854775807 -23 9223... Truncated |
Test 47
Verdict: WRONG ANSWER
input |
---|
200 167 184 199 1 177 192 1 184 134 -1 52 200 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 48
Verdict: WRONG ANSWER
input |
---|
200 368 67 42 -1 13 9 1 22 198 -1 20 106 -1 ... |
correct output |
---|
No |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 49
Verdict: WRONG ANSWER
input |
---|
200 123 200 68 -1 169 152 -1 78 159 -1 42 156 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 50
Verdict: WRONG ANSWER
input |
---|
200 363 196 168 -1 196 197 1 198 199 1 101 200 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 -10 9223372036854775807 9223... Truncated |
Test 51
Verdict: WRONG ANSWER
input |
---|
200 104 50 101 -1 15 102 -1 114 136 1 9 140 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 52
Verdict: WRONG ANSWER
input |
---|
1000 1324 716 845 -1 858 545 -1 424 624 -1 385 438 1 ... |
correct output |
---|
No |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 53
Verdict: WRONG ANSWER
input |
---|
1000 1126 721 933 1 129 303 -1 147 237 1 397 187 1 ... |
correct output |
---|
No |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 54
Verdict: WRONG ANSWER
input |
---|
1000 1154 23 24 1 11 338 -1 707 6 -1 8 499 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 -22 -36 -39 -34 -36 -36 -40 ... Truncated |
Test 55
Verdict: WRONG ANSWER
input |
---|
1000 1327 744 875 1 310 667 1 89 720 -1 37 736 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 56
Verdict: WRONG ANSWER
input |
---|
1000 1951 548 173 -1 856 715 -1 698 598 1 142 977 1 ... |
correct output |
---|
No |
user output |
---|
0 0 9223372036854775807 -47 -9... Truncated |
Test 57
Verdict: WRONG ANSWER
input |
---|
1000 833 917 994 1 882 955 1 917 667 -1 259 999 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 58
Verdict: WRONG ANSWER
input |
---|
1000 1840 332 210 -1 65 42 1 108 986 -1 100 530 -1 ... |
correct output |
---|
No |
user output |
---|
0 -55 -47 -48 -57 922337203685... Truncated |
Test 59
Verdict: WRONG ANSWER
input |
---|
1000 615 996 342 -1 848 762 -1 391 799 -1 210 783 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 60
Verdict: WRONG ANSWER
input |
---|
1000 1811 981 842 -1 982 983 1 992 996 1 506 996 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 61
Verdict: WRONG ANSWER
input |
---|
1000 516 249 505 -1 72 508 -1 570 677 1 43 699 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 62
Verdict: WRONG ANSWER
input |
---|
100000 132323 71521 84428 -1 85796 54490 -1 42367 62358 -1 38439 43760 1 ... |
correct output |
---|
No |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 63
Verdict: WRONG ANSWER
input |
---|
100000 112554 72034 93258 1 12813 30234 -1 14676 23610 1 39659 18627 1 ... |
correct output |
---|
No |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 64
Verdict: WRONG ANSWER
input |
---|
100000 115400 2456 2516 1 1090 33816 -1 70668 531 -1 777 49853 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 -3223 -3119 -2395 -3224 -283... Truncated |
Test 65
Verdict: WRONG ANSWER
input |
---|
100000 132621 74356 87456 1 30951 66681 1 8894 72001 -1 3645 73546 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 66
Verdict: WRONG ANSWER
input |
---|
100000 195056 54725 17270 -1 85564 71483 -1 69774 59757 1 14147 97629 1 ... |
correct output |
---|
No |
user output |
---|
0 -5875 -8766 9223372036854775... Truncated |
Test 67
Verdict: WRONG ANSWER
input |
---|
100000 83300 91776 99331 1 88235 95433 1 91652 66692 -1 25844 99882 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 68
Verdict: WRONG ANSWER
input |
---|
100000 183930 33199 20941 -1 6426 4170 1 10766 98505 -1 9948 52983 -1 ... |
correct output |
---|
No |
user output |
---|
0 9223372036854775807 -7250 -6... Truncated |
Test 69
Verdict: WRONG ANSWER
input |
---|
100000 61447 99521 34194 -1 84772 76278 -1 39085 79902 -1 20937 78344 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 70
Verdict: WRONG ANSWER
input |
---|
100000 181015 98043 84187 -1 98183 98204 1 99264 99561 1 50624 99598 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |
Test 71
Verdict: WRONG ANSWER
input |
---|
100000 51557 24883 50564 -1 7133 50852 -1 57039 67698 1 4219 69908 -1 ... |
correct output |
---|
Yes |
user output |
---|
0 9223372036854775807 92233720... Truncated |