Task: | Graph |
Sender: | vgtcross |
Submission time: | 2023-04-20 17:09:17 +0300 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 5 |
#2 | ACCEPTED | 12 |
#3 | ACCEPTED | 17 |
#4 | ACCEPTED | 24 |
#5 | ACCEPTED | 42 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#2 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#3 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#4 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#5 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#6 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#7 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#8 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#9 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#10 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#11 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#12 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#13 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#14 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#15 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#16 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#17 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#18 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#19 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#20 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#21 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#22 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#23 | ACCEPTED | 0.01 s | 1, 2, 3, 4, 5 | details |
#24 | ACCEPTED | 0.01 s | 2, 3, 4, 5 | details |
#25 | ACCEPTED | 0.01 s | 2, 3, 4, 5 | details |
#26 | ACCEPTED | 0.01 s | 2, 3, 4, 5 | details |
#27 | ACCEPTED | 0.01 s | 2, 3, 4, 5 | details |
#28 | ACCEPTED | 0.01 s | 2, 3, 4, 5 | details |
#29 | ACCEPTED | 0.01 s | 2, 3, 4, 5 | details |
#30 | ACCEPTED | 0.01 s | 2, 3, 4, 5 | details |
#31 | ACCEPTED | 0.01 s | 2, 3, 4, 5 | details |
#32 | ACCEPTED | 0.01 s | 2, 3, 4, 5 | details |
#33 | ACCEPTED | 0.01 s | 2, 3, 4, 5 | details |
#34 | ACCEPTED | 0.01 s | 2, 3, 4, 5 | details |
#35 | ACCEPTED | 0.01 s | 2, 3, 4, 5 | details |
#36 | ACCEPTED | 0.01 s | 2, 3, 4, 5 | details |
#37 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#38 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#39 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#40 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#41 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#42 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#43 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#44 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#45 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#46 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#47 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#48 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#49 | ACCEPTED | 0.01 s | 4, 5 | details |
#50 | ACCEPTED | 0.02 s | 4, 5 | details |
#51 | ACCEPTED | 0.02 s | 4, 5 | details |
#52 | ACCEPTED | 0.01 s | 4, 5 | details |
#53 | ACCEPTED | 0.01 s | 4, 5 | details |
#54 | ACCEPTED | 0.01 s | 4, 5 | details |
#55 | ACCEPTED | 0.01 s | 4, 5 | details |
#56 | ACCEPTED | 0.01 s | 4, 5 | details |
#57 | ACCEPTED | 0.01 s | 4, 5 | details |
#58 | ACCEPTED | 0.01 s | 4, 5 | details |
#59 | ACCEPTED | 0.01 s | 4, 5 | details |
#60 | ACCEPTED | 0.01 s | 4, 5 | details |
#61 | ACCEPTED | 0.01 s | 4, 5 | details |
#62 | ACCEPTED | 0.07 s | 4, 5 | details |
#63 | ACCEPTED | 0.07 s | 4, 5 | details |
#64 | ACCEPTED | 0.07 s | 4, 5 | details |
#65 | ACCEPTED | 0.07 s | 4, 5 | details |
#66 | ACCEPTED | 0.01 s | 4, 5 | details |
#67 | ACCEPTED | 0.11 s | 5 | details |
#68 | ACCEPTED | 0.10 s | 5 | details |
#69 | ACCEPTED | 0.09 s | 5 | details |
#70 | ACCEPTED | 0.13 s | 5 | details |
#71 | ACCEPTED | 0.10 s | 5 | details |
#72 | ACCEPTED | 0.12 s | 5 | details |
#73 | ACCEPTED | 0.11 s | 5 | details |
#74 | ACCEPTED | 0.08 s | 5 | details |
#75 | ACCEPTED | 0.03 s | 5 | details |
#76 | ACCEPTED | 0.02 s | 5 | details |
#77 | ACCEPTED | 0.03 s | 5 | details |
#78 | ACCEPTED | 0.05 s | 5 | details |
#79 | ACCEPTED | 0.10 s | 5 | details |
#80 | ACCEPTED | 0.09 s | 5 | details |
#81 | ACCEPTED | 0.06 s | 5 | details |
#82 | ACCEPTED | 0.13 s | 5 | details |
#83 | ACCEPTED | 0.17 s | 5 | details |
#84 | ACCEPTED | 0.17 s | 5 | details |
#85 | ACCEPTED | 0.11 s | 5 | details |
#86 | ACCEPTED | 0.11 s | 5 | details |
#87 | ACCEPTED | 0.07 s | 5 | details |
#88 | ACCEPTED | 0.16 s | 5 | details |
#89 | ACCEPTED | 0.10 s | 5 | details |
#90 | ACCEPTED | 0.12 s | 5 | details |
#91 | ACCEPTED | 0.11 s | 5 | details |
#92 | ACCEPTED | 0.06 s | 5 | details |
#93 | ACCEPTED | 0.05 s | 5 | details |
#94 | ACCEPTED | 0.07 s | 5 | details |
#95 | ACCEPTED | 0.05 s | 5 | details |
#96 | ACCEPTED | 0.19 s | 5 | details |
#97 | ACCEPTED | 0.05 s | 5 | details |
Compiler report
input/code.cpp: In function 'int dfs(int)': input/code.cpp:41:21: warning: unused variable 'col2' [-Wunused-variable] 41 | int col2 = 3 - col[u]; | ^~~~
Code
#include <bits/stdc++.h> #define debug(x) cout << #x << ": " << x << endl #define all(x) x.begin(), x.end() #define fi first #define se second using namespace std; using ll = long long; using pii = pair<int, int>; const int N = 100100; vector<pii> adj[N]; int col[N]; int val[N]; pii x; vector<int> vals; void reset(int u) { col[u] = -1; for (pii v: adj[u]) if (col[v.fi] >= 0) { reset(v.fi); } } int dfs(int u) { vals.push_back(val[u] * (2*col[u]-3)); for (pii v: adj[u]) { if (!col[v.fi]) { col[v.fi] = 3 - col[u]; val[v.fi] = 2*v.se - val[u]; int res = dfs(v.fi); if (res != 1) return res; } else { if (col[v.fi] != col[u] && val[v.fi] != 2*v.se - val[u]) { return -1; } else if (col[v.fi] == col[u]) { int val2 = 2*v.se - val[u]; int col2 = 3 - col[u]; x.fi = -val[v.fi]; x.fi += val2; x.fi /= 2; x.fi += val[v.fi]; x.se = v.fi; return 0; } } } return 1; } bool dfs2(int u) { for (pii v: adj[u]) { if (col[v.fi] == -1) { col[v.fi] = 1; val[v.fi] = 2*v.se - val[u]; int bad = dfs2(v.fi); if (bad) return 1; } else { if (val[v.fi] != 2*v.se - val[u]) { return 1; } } } return 0; } void solve() { int n, m; cin >> n >> m; for (int i = 0; i < m; ++i) { int u, v, c; cin >> u >> v >> c; u--;v--; adj[u].push_back({v, c}); adj[v].push_back({u, c}); } for (int i = 0; i < n; ++i) if (col[i] == 0) { col[i] = 1; val[i] = 0; vals.clear(); int res = dfs(i); if (res == -1) { cout << "NO\n"; return; } else if (res == 0) { reset(i); col[x.se] = 1; val[x.se] = x.fi; bool bad = dfs2(x.se); if (bad) { cout << "NO\n"; return; } } else { reset(i); sort(all(vals)); col[i] = 1; val[i] = vals[vals.size()/2]; dfs2(i); } } cout << "YES\n"; for (int i = 0; i < n; ++i) { cout << (long double)val[i] / 2.0 << ' '; } cout << '\n'; } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(9); solve(); return 0; }
Test details
Test 1
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
4 4 1 2 1 2 3 2 1 3 2 3 4 1 |
correct output |
---|
YES 0.5 0.5 1.5 -0.5 |
user output |
---|
YES 0.500000000 0.500000000 1.5000... |
Test 2
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
2 1 1 2 1 |
correct output |
---|
YES 1 0 |
user output |
---|
YES 1.000000000 0.000000000 |
Test 3
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
3 2 1 2 2 2 3 2 |
correct output |
---|
YES 0 2 0 |
user output |
---|
YES 0.000000000 2.000000000 0.0000... |
Test 4
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
3 4 1 2 2 2 2 1 2 1 1 1 2 2 |
correct output |
---|
NO |
user output |
---|
NO |
Test 5
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
5 2 1 2 1 5 3 2 |
correct output |
---|
YES 1 0 2 0 0 |
user output |
---|
YES 1.000000000 0.000000000 2.0000... |
Test 6
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
3 2 2 1 2 3 2 1 |
correct output |
---|
YES 1 1 0 |
user output |
---|
YES 1.000000000 1.000000000 0.0000... |
Test 7
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
3 3 1 2 1 1 3 1 3 2 1 |
correct output |
---|
YES 0.5 0.5 0.5 |
user output |
---|
YES 0.500000000 0.500000000 0.5000... |
Test 8
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
4 4 1 4 2 3 2 1 2 1 2 3 4 1 |
correct output |
---|
YES 2 0 1 0 |
user output |
---|
YES 2.000000000 0.000000000 1.0000... |
Test 9
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
4 4 1 4 2 1 2 1 3 4 1 3 2 1 |
correct output |
---|
NO |
user output |
---|
NO |
Test 10
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
4 5 1 4 2 3 2 1 2 1 2 3 4 1 ... |
correct output |
---|
YES 1.5 0.5 0.5 0.5 |
user output |
---|
YES 1.500000000 0.500000000 0.5000... |
Test 11
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
4 5 1 4 2 3 2 1 1 2 2 4 3 1 ... |
correct output |
---|
YES 1.5 0.5 0.5 0.5 |
user output |
---|
YES 1.500000000 0.500000000 0.5000... |
Test 12
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
4 4 4 2 2 4 3 1 1 3 2 1 2 1 |
correct output |
---|
NO |
user output |
---|
NO |
Test 13
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
5 14 2 1 1 3 2 1 4 3 1 1 4 1 ... |
correct output |
---|
YES 0.5 0.5 0.5 0.5 1.5 |
user output |
---|
YES 0.500000000 0.500000000 0.5000... |
Test 14
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
5 4 2 5 1 5 4 2 4 1 2 1 3 1 |
correct output |
---|
YES 1 0 0 1 1 |
user output |
---|
YES 1.000000000 0.000000000 0.0000... |
Test 15
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
5 4 2 4 1 5 4 2 4 1 2 4 3 1 |
correct output |
---|
YES 1 0 0 1 1 |
user output |
---|
YES 1.000000000 0.000000000 0.0000... |
Test 16
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
5 5 3 5 2 2 4 1 5 4 2 4 1 2 ... |
correct output |
---|
YES 1.5 0.5 0.5 0.5 1.5 |
user output |
---|
YES 1.500000000 0.500000000 0.5000... |
Test 17
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
1 0 |
correct output |
---|
YES 0 |
user output |
---|
YES 0.000000000 |
Test 18
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
1 1 1 1 1 |
correct output |
---|
YES 0.5 |
user output |
---|
YES 0.500000000 |
Test 19
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
3 14 1 1 2 1 1 2 2 2 1 2 3 2 ... |
correct output |
---|
YES 1 0.5 1.5 |
user output |
---|
YES 1.000000000 0.500000000 1.5000... |
Test 20
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
3 4 2 2 1 1 2 2 1 3 2 3 3 1 |
correct output |
---|
YES 1.5 0.5 0.5 |
user output |
---|
YES 1.500000000 0.500000000 0.5000... |
Test 21
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
2 2 1 2 2 2 1 2 |
correct output |
---|
YES 2 0 |
user output |
---|
YES 2.000000000 0.000000000 |
Test 22
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
2 2 1 2 2 2 1 1 |
correct output |
---|
NO |
user output |
---|
NO |
Test 23
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
3 14 1 1 2 1 1 2 2 2 1 2 3 1 ... |
correct output |
---|
NO |
user output |
---|
NO |
Test 24
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
100 99 10 91 1 10 86 2 86 81 2 10 62 1 ... |
correct output |
---|
YES 0 2 1 1 2 0 1 0 0 1 -1 -1 1 1 ... |
user output |
---|
YES 0.000000000 2.000000000 1.0000... Truncated |
Test 25
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
50 49 31 8 2 31 7 2 31 34 1 7 49 1 ... |
correct output |
---|
YES 2 1 -1 2 -1 2 1 1 2 1 1 2 -1 0... |
user output |
---|
YES 2.000000000 1.000000000 -1.000... Truncated |
Test 26
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
88 87 16 28 1 28 32 2 32 34 1 32 3 2 ... |
correct output |
---|
YES 3 1 1 -2 1 1 1 0 2 2 0 2 0 0 1... |
user output |
---|
YES 3.000000000 1.000000000 1.0000... Truncated |
Test 27
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
88 88 16 28 1 28 32 2 32 34 1 32 3 2 ... |
correct output |
---|
YES 2 2 0 -3 0 2 2 1 3 3 -1 3 -1 1... |
user output |
---|
YES 2.000000000 2.000000000 0.0000... Truncated |
Test 28
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
100 100 17 44 1 30 17 2 18 30 1 88 18 2 ... |
correct output |
---|
YES 2 0 0 2 0 0 2 1 1 3 0 2 -1 2 3... |
user output |
---|
YES 2.000000000 0.000000000 0.0000... Truncated |
Test 29
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
100 100 17 57 1 30 17 1 18 30 1 88 18 1 ... |
correct output |
---|
YES 3 1 0 2 1 1 2 0 0 2 1 2 0 1 2 ... |
user output |
---|
YES 3.000000000 1.000000000 0.0000... Truncated |
Test 30
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
100 100 17 57 1 30 17 2 18 30 1 88 18 2 ... |
correct output |
---|
NO |
user output |
---|
NO |
Test 31
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
77 77 33 31 2 68 66 1 10 8 2 24 22 2 ... |
correct output |
---|
YES 1.5 2 0.5 0 1.5 1 -0.5 1 2.5 1... |
user output |
---|
YES 1.500000000 2.000000000 0.5000... Truncated |
Test 32
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
77 77 77 77 1 76 76 1 75 75 1 74 2 2 ... |
correct output |
---|
YES 0.5 0.5 1 1.5 1 1 0.5 0.5 1.5 ... |
user output |
---|
YES 0.500000000 0.500000000 1.0000... Truncated |
Test 33
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
76 38 2 1 1 65 4 1 67 6 2 66 8 1 ... |
correct output |
---|
YES 1 0 2 1 1 2 2 1 1 1 0 2 2 2 2 ... |
user output |
---|
YES 1.000000000 0.000000000 2.0000... Truncated |
Test 34
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
100 113 82 73 1 65 22 1 58 24 1 4 52 1 ... |
correct output |
---|
YES 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.... |
user output |
---|
YES 0.500000000 0.500000000 0.5000... Truncated |
Test 35
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
77 77 33 31 2 68 66 1 10 8 2 24 22 1 ... |
correct output |
---|
YES 0.5 1 1.5 1 0.5 1 0.5 0 0.5 2 ... |
user output |
---|
YES 0.500000000 1.000000000 1.5000... Truncated |
Test 36
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
77 78 33 31 2 68 66 1 10 8 2 24 22 1 ... |
correct output |
---|
YES 1 0.5 1 1.5 1 0.5 0 0.5 1 1.5 ... |
user output |
---|
YES 1.000000000 0.500000000 1.0000... Truncated |
Test 37
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
211 210 129 163 1 129 193 1 129 65 1 163 142 2 ... |
correct output |
---|
YES 0 0 -1 1 -1 1 1 1 1 1 1 0 1 2 ... |
user output |
---|
YES 0.000000000 0.000000000 -1.000... Truncated |
Test 38
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
211 211 129 163 1 129 193 1 129 65 1 163 142 2 ... |
correct output |
---|
YES -0.5 0.5 -0.5 0.5 -0.5 1.5 0.5... |
user output |
---|
YES -0.500000000 0.500000000 -0.50... Truncated |
Test 39
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
547 546 15 139 2 139 397 1 15 327 1 15 510 1 ... |
correct output |
---|
YES 1 0 -1 2 1 1 1 0 2 0 1 1 2 1 1... |
user output |
---|
YES 1.000000000 0.000000000 -1.000... Truncated |
Test 40
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
935 935 923 195 1 388 923 1 439 388 2 101 439 1 ... |
correct output |
---|
YES 6 3 -1 -1 3 -2 -1 -4 1 2 -6 -6... |
user output |
---|
YES 6.000000000 3.000000000 -1.000... Truncated |
Test 41
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
935 935 621 758 2 758 394 1 24 758 1 543 24 1 ... |
correct output |
---|
NO |
user output |
---|
NO |
Test 42
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
935 935 923 195 1 388 923 1 439 388 2 101 439 1 ... |
correct output |
---|
YES 4 1 -4 3 6 -3 4 9 0 -2 -2 4 -3... |
user output |
---|
YES 4.000000000 1.000000000 -4.000... Truncated |
Test 43
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
999 996 10 58 2 101 80 2 101 812 1 106 178 1 ... |
correct output |
---|
YES 1 2 1 1 2 2 -2 1 1 3 0 2 1 -1 ... |
user output |
---|
YES 1.000000000 2.000000000 1.0000... Truncated |
Test 44
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
994 987 769 256 2 906 812 1 453 603 1 556 451 2 ... |
correct output |
---|
YES 2 2 -4 3 -1 -4 0 -1 0 -1 -2 -1... |
user output |
---|
YES 2.000000000 2.000000000 -4.000... Truncated |
Test 45
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
994 994 769 256 2 906 812 1 453 603 1 556 451 2 ... |
correct output |
---|
YES 3.5 4.5 -3.5 0.5 -3 -6.5 -11 -... |
user output |
---|
YES 3.500000000 4.500000000 -3.500... Truncated |
Test 46
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
500 491 87 78 2 78 434 1 434 26 1 26 98 1 ... |
correct output |
---|
YES 2 0 0 1 0 -1 0 1 0 0 0 0 0 1 2... |
user output |
---|
YES 2.000000000 0.000000000 0.0000... Truncated |
Test 47
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
994 994 769 256 2 906 812 1 453 603 1 556 451 2 ... |
correct output |
---|
YES 1.5 4.5 -3.5 0.5 -2.5 -6.5 -7.... |
user output |
---|
YES 1.500000000 4.500000000 -3.500... Truncated |
Test 48
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
994 994 769 256 2 906 812 1 453 603 1 556 451 2 ... |
correct output |
---|
YES -3.5 -0.5 -8.5 5.5 2.5 -1.5 -2... |
user output |
---|
YES -3.500000000 -0.500000000 -8.5... Truncated |
Test 49
Group: 4, 5
Verdict: ACCEPTED
input |
---|
10000 9999 5747 266 1 266 9872 1 5747 8144 1 9872 2774 2 ... |
correct output |
---|
YES 0 -1 1 0 1 1 3 0 2 3 3 3 -3 3 ... |
user output |
---|
YES 0.000000000 -1.000000000 1.000... Truncated |
Test 50
Group: 4, 5
Verdict: ACCEPTED
input |
---|
9973 9973 1477 3608 1 8395 1477 2 5665 8395 1 2668 5665 2 ... |
correct output |
---|
YES 8.5 22.5 -7.5 24.5 0.5 -8.5 -6... |
user output |
---|
YES 8.500000000 22.500000000 -7.50... Truncated |
Test 51
Group: 4, 5
Verdict: ACCEPTED
input |
---|
9973 9973 8395 1477 2 5665 8395 1 2668 5665 2 7601 2668 2 ... |
correct output |
---|
YES 5 7 1 9 8 9 16 1 16 -8 -13 -5 ... |
user output |
---|
YES 5.000000000 7.000000000 1.0000... Truncated |
Test 52
Group: 4, 5
Verdict: ACCEPTED
input |
---|
9973 9973 3608 4715 2 4715 2860 1 803 3645 1 3645 1477 2 ... |
correct output |
---|
NO |
user output |
---|
NO |
Test 53
Group: 4, 5
Verdict: ACCEPTED
input |
---|
1023 1022 872 171 1 171 588 2 588 510 2 171 189 1 ... |
correct output |
---|
YES 0 2 1 0 2 0 1 2 -1 2 1 0 -1 3 ... |
user output |
---|
YES 0.000000000 2.000000000 1.0000... Truncated |
Test 54
Group: 4, 5
Verdict: ACCEPTED
input |
---|
2371 2370 1991 1896 1 1991 655 2 1991 722 1 655 130 2 ... |
correct output |
---|
YES 5 0 1 3 -1 1 4 0 1 0 2 4 3 0 -... |
user output |
---|
YES 5.000000000 0.000000000 1.0000... Truncated |
Test 55
Group: 4, 5
Verdict: ACCEPTED
input |
---|
4997 4996 4963 352 2 4963 1455 2 1455 2819 1 4963 4962 2 ... |
correct output |
---|
YES 2 2 2 2 0 2 1 1 -1 0 1 2 1 0 -... |
user output |
---|
YES 2.000000000 2.000000000 2.0000... Truncated |
Test 56
Group: 4, 5
Verdict: ACCEPTED
input |
---|
9778 9777 4271 8223 1 8223 7058 1 8223 7079 1 4271 3842 1 ... |
correct output |
---|
YES -1 1 -1 1 1 2 3 0 1 1 -1 1 -1 ... |
user output |
---|
YES -1.000000000 1.000000000 -1.00... Truncated |
Test 57
Group: 4, 5
Verdict: ACCEPTED
input |
---|
9997 9225 5985 4701 2 4701 2238 2 2238 8981 2 4701 639 1 ... |
correct output |
---|
YES 3 2 0 1 0 2 0 1 3 2 -1 0 -1 1 ... |
user output |
---|
YES 3.000000000 2.000000000 0.0000... Truncated |
Test 58
Group: 4, 5
Verdict: ACCEPTED
input |
---|
9000 8997 23 909 1 909 297 2 297 125 2 125 856 2 ... |
correct output |
---|
YES 2 1 2 0 0 1 2 0 -1 1 2 -1 1 -1... |
user output |
---|
YES 2.000000000 1.000000000 2.0000... Truncated |
Test 59
Group: 4, 5
Verdict: ACCEPTED
input |
---|
9000 9000 23 909 1 909 297 2 297 125 2 125 856 2 ... |
correct output |
---|
YES 3 2 3 1 1 2 3 1 0 0 1 -2 2 -2 ... |
user output |
---|
YES 3.000000000 2.000000000 3.0000... Truncated |
Test 60
Group: 4, 5
Verdict: ACCEPTED
input |
---|
10000 9993 5747 266 1 266 9872 1 5747 8144 1 9872 2774 2 ... |
correct output |
---|
YES 1 -2 0 1 0 1 2 -1 2 2 3 2 -4 3... |
user output |
---|
YES 1.000000000 -2.000000000 0.000... Truncated |
Test 61
Group: 4, 5
Verdict: ACCEPTED
input |
---|
5000 5000 1537 2983 1 2983 1590 2 1590 1547 1 1547 4457 1 ... |
correct output |
---|
YES 3 0 -3 5 0 4 0 -1 3 -1 5 2 2 0... |
user output |
---|
YES 3.000000000 0.000000000 -3.000... Truncated |
Test 62
Group: 4, 5
Verdict: ACCEPTED
input |
---|
7779 200000 5647 4480 1 3952 7125 2 4078 2641 1 4841 2183 1 ... |
correct output |
---|
NO |
user output |
---|
NO |
Test 63
Group: 4, 5
Verdict: ACCEPTED
input |
---|
7779 200000 5647 4480 2 3952 7125 2 4078 2641 2 4841 2183 2 ... |
correct output |
---|
YES 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
user output |
---|
YES 1.000000000 1.000000000 1.0000... Truncated |
Test 64
Group: 4, 5
Verdict: ACCEPTED
input |
---|
7783 200000 5647 4480 2 3952 7125 2 4078 2641 2 4841 2183 2 ... |
correct output |
---|
NO |
user output |
---|
NO |
Test 65
Group: 4, 5
Verdict: ACCEPTED
input |
---|
7783 200000 5647 4480 2 3952 7125 2 4078 2641 2 4841 2183 2 ... |
correct output |
---|
YES 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
user output |
---|
YES 1.000000000 1.000000000 1.0000... Truncated |
Test 66
Group: 4, 5
Verdict: ACCEPTED
input |
---|
2000 1998 1673 1643 1 1643 1877 1 1643 1622 2 1643 1533 1 ... |
correct output |
---|
YES 2 1 1 2 1 2 0 -1 0 -1 1 -1 0 2... |
user output |
---|
YES 2.000000000 1.000000000 1.0000... Truncated |
Test 67
Group: 5
Verdict: ACCEPTED
input |
---|
100000 99999 1 2 2 2 3 1 3 4 2 4 5 2 ... |
correct output |
---|
YES -27 29 -28 30 -28 29 -27 29 -2... |
user output |
---|
YES -27.000000000 29.000000000 -28... Truncated |
Test 68
Group: 5
Verdict: ACCEPTED
input |
---|
100000 99999 1 2 1 2 3 1 3 4 1 4 5 1 ... |
correct output |
---|
YES 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ... |
user output |
---|
YES 1.000000000 0.000000000 1.0000... Truncated |
Test 69
Group: 5
Verdict: ACCEPTED
input |
---|
99999 99999 1 2 1 2 3 1 3 4 2 4 5 1 ... |
correct output |
---|
YES 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 ... |
user output |
---|
YES 1.000000000 0.000000000 1.0000... Truncated |
Test 70
Group: 5
Verdict: ACCEPTED
input |
---|
100000 200000 1 2 1 2 3 1 3 4 1 4 5 1 ... |
correct output |
---|
YES 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ... |
user output |
---|
YES 1.000000000 0.000000000 1.0000... Truncated |
Test 71
Group: 5
Verdict: ACCEPTED
input |
---|
99999 99999 1 2 2 2 3 1 3 4 2 4 5 1 ... |
correct output |
---|
YES 1.5 0.5 0.5 1.5 -0.5 1.5 0.5 0... |
user output |
---|
YES 1.500000000 0.500000000 0.5000... Truncated |
Test 72
Group: 5
Verdict: ACCEPTED
input |
---|
100000 99999 46010 73517 1 46010 71237 1 73517 84882 1 46010 88029 2 ... |
correct output |
---|
YES -4 0 -1 1 -1 -3 1 1 0 0 0 1 2 ... |
user output |
---|
YES -4.000000000 0.000000000 -1.00... Truncated |
Test 73
Group: 5
Verdict: ACCEPTED
input |
---|
100000 100000 99997 99996 2 46010 73517 1 46010 71237 1 73517 84882 1 ... |
correct output |
---|
YES -4 0 -1 1 -1 -3 1 1 0 0 0 1 2 ... |
user output |
---|
YES -4.000000000 0.000000000 -1.00... Truncated |
Test 74
Group: 5
Verdict: ACCEPTED
input |
---|
65432 65432 53092 42562 2 61422 3056 1 22311 61422 1 48701 22311 1 ... |
correct output |
---|
YES -43 2 -40 73 83 -68 42 -32 -74... |
user output |
---|
YES -43.000000000 2.000000000 -40.... Truncated |
Test 75
Group: 5
Verdict: ACCEPTED
input |
---|
65432 65432 53092 211 1 27132 53092 2 42562 27132 1 211 42562 2 ... |
correct output |
---|
NO |
user output |
---|
NO |
Test 76
Group: 5
Verdict: ACCEPTED
input |
---|
12003 12002 9377 4878 2 9377 3429 1 9377 7810 2 7810 5657 1 ... |
correct output |
---|
YES -2 0 2 -1 0 0 0 -1 0 3 2 1 0 -... |
user output |
---|
YES -2.000000000 0.000000000 2.000... Truncated |
Test 77
Group: 5
Verdict: ACCEPTED
input |
---|
24578 24577 23603 4344 2 4344 19532 1 23603 3246 1 3246 1886 2 ... |
correct output |
---|
YES 4 2 4 2 -1 0 -2 0 0 0 0 2 -2 1... |
user output |
---|
YES 4.000000000 2.000000000 4.0000... Truncated |
Test 78
Group: 5
Verdict: ACCEPTED
input |
---|
42875 42874 20761 12008 1 20761 1944 1 1944 39972 2 1944 22755 1 ... |
correct output |
---|
YES -1 2 2 -1 0 2 3 1 3 1 -1 -1 0 ... |
user output |
---|
YES -1.000000000 2.000000000 2.000... Truncated |
Test 79
Group: 5
Verdict: ACCEPTED
input |
---|
85112 85111 46719 28242 2 46719 12064 1 46719 41742 2 12064 12832 1 ... |
correct output |
---|
YES 3 0 1 0 2 0 2 0 3 1 2 0 1 2 3 ... |
user output |
---|
YES 3.000000000 0.000000000 1.0000... Truncated |
Test 80
Group: 5
Verdict: ACCEPTED
input |
---|
65432 65432 53092 211 1 27132 53092 1 42562 27132 2 17771 211 2 ... |
correct output |
---|
YES -5 24 -91 23 -7 2 38 16 -11 -1... |
user output |
---|
YES -5.000000000 24.000000000 -91.... Truncated |
Test 81
Group: 5
Verdict: ACCEPTED
input |
---|
100000 100002 56529 57156 2 57156 27549 1 27549 28230 1 28230 7926 1 ... |
correct output |
---|
NO |
user output |
---|
NO |
Test 82
Group: 5
Verdict: ACCEPTED
input |
---|
100000 100002 56529 57156 1 57156 27549 2 27549 28230 1 28230 7926 1 ... |
correct output |
---|
YES 23.5 74.5 -28.5 18.5 35.5 17.5... |
user output |
---|
YES 23.500000000 74.500000000 -28.... Truncated |
Test 83
Group: 5
Verdict: ACCEPTED
input |
---|
99999 99999 80080 1 1 87783 2 2 61570 3 1 63587 4 1 ... |
correct output |
---|
YES -11 120 -66 -119 82 -99 -112 -... |
user output |
---|
YES -11.000000000 120.000000000 -6... Truncated |
Test 84
Group: 5
Verdict: ACCEPTED
input |
---|
100000 100000 80080 1 1 87783 2 2 61570 3 1 63587 4 1 ... |
correct output |
---|
YES 82 27 27 -26 -11 -6 -19 -24 -1... |
user output |
---|
YES 82.000000000 27.000000000 27.0... Truncated |
Test 85
Group: 5
Verdict: ACCEPTED
input |
---|
100000 100000 1 2 2 2 3 1 3 4 2 4 5 2 ... |
correct output |
---|
YES 5 -3 4 -2 4 -3 5 -3 4 -2 3 -2 ... |
user output |
---|
YES 5.000000000 -3.000000000 4.000... Truncated |
Test 86
Group: 5
Verdict: ACCEPTED
input |
---|
99999 99999 1 2 2 2 3 1 3 4 2 4 5 2 ... |
correct output |
---|
YES -8 10 -9 11 -9 10 -8 10 -9 11 ... |
user output |
---|
YES -8.000000000 10.000000000 -9.0... Truncated |
Test 87
Group: 5
Verdict: ACCEPTED
input |
---|
100000 100000 56529 22247 1 57156 76873 2 27549 74689 2 28230 20136 2 ... |
correct output |
---|
NO |
user output |
---|
NO |
Test 88
Group: 5
Verdict: ACCEPTED
input |
---|
100000 99993 56529 22247 1 57156 76873 2 27549 74689 2 28230 20136 2 ... |
correct output |
---|
YES 63.5 -37.5 -3 -50.5 -28.5 49.5... |
user output |
---|
YES 63.500000000 -37.500000000 -3.... Truncated |
Test 89
Group: 5
Verdict: ACCEPTED
input |
---|
99995 99995 78058 31441 1 31441 51023 1 51023 74459 1 74459 23055 2 ... |
correct output |
---|
YES 1.5 0.5 0.5 1 0.5 0.5 1 1.5 -0... |
user output |
---|
YES 1.500000000 0.500000000 0.5000... Truncated |
Test 90
Group: 5
Verdict: ACCEPTED
input |
---|
99995 99993 78058 31441 1 31441 51023 1 51023 74459 1 23055 78058 1 ... |
correct output |
---|
YES 1 0 1 0.5 1 0.5 0.5 1 0.5 0.5 ... |
user output |
---|
YES 1.000000000 0.000000000 1.0000... Truncated |
Test 91
Group: 5
Verdict: ACCEPTED
input |
---|
99995 99991 1 20142 2 2 6002 2 3 82095 1 4 60745 2 ... |
correct output |
---|
YES 0.5 1 1.5 1 0 1.5 0.5 1 1 0.5 ... |
user output |
---|
YES 0.500000000 1.000000000 1.5000... Truncated |
Test 92
Group: 5
Verdict: ACCEPTED
input |
---|
50000 50000 24269 39765 1 24269 22722 2 24269 43371 2 24269 38058 2 ... |
correct output |
---|
YES -2.5 -0.5 0.5 0.5 2.5 0.5 0.5 ... |
user output |
---|
YES -2.500000000 -0.500000000 0.50... Truncated |
Test 93
Group: 5
Verdict: ACCEPTED
input |
---|
50000 50000 12607 45763 2 45763 7230 1 7230 4820 2 12607 46801 2 ... |
correct output |
---|
YES 1 1 1 2 4 0 2 0 -1 3 3 1 -1 1 ... |
user output |
---|
YES 1.000000000 1.000000000 1.0000... Truncated |
Test 94
Group: 5
Verdict: ACCEPTED
input |
---|
100000 100000 80080 1 1 87783 2 2 61570 3 1 63587 4 1 ... |
correct output |
---|
NO |
user output |
---|
NO |
Test 95
Group: 5
Verdict: ACCEPTED
input |
---|
99995 99993 1 20142 2 2 6002 2 3 82095 1 4 60745 2 ... |
correct output |
---|
NO |
user output |
---|
NO |
Test 96
Group: 5
Verdict: ACCEPTED
input |
---|
99997 200000 13425 90048 1 81741 46019 1 35193 33756 1 4840 2182 1 ... |
correct output |
---|
YES 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.... |
user output |
---|
YES 0.500000000 0.500000000 0.5000... Truncated |
Test 97
Group: 5
Verdict: ACCEPTED
input |
---|
100000 100000 1 2 2 2 3 1 3 4 2 4 5 2 ... |
correct output |
---|
NO |
user output |
---|
NO |