Task: | Kulut |
Sender: | a256 |
Submission time: | 2023-01-21 14:01:33 +0200 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | RUNTIME ERROR | 0 |
test | verdict | time | |
---|---|---|---|
#1 | RUNTIME ERROR | 0.00 s | details |
#2 | RUNTIME ERROR | 0.00 s | details |
#3 | RUNTIME ERROR | 0.00 s | details |
#4 | RUNTIME ERROR | 0.00 s | details |
#5 | RUNTIME ERROR | 0.00 s | details |
#6 | RUNTIME ERROR | 0.00 s | details |
#7 | RUNTIME ERROR | 0.00 s | details |
#8 | RUNTIME ERROR | 0.00 s | details |
#9 | RUNTIME ERROR | 0.00 s | details |
#10 | RUNTIME ERROR | 0.00 s | details |
#11 | RUNTIME ERROR | 0.00 s | details |
Code
#include <bits/stdc++.h> using namespace std; #define F first #define S second typedef long long ll; int n,A,B,C,D,s,a; vector<array<int,3>> r; int main(){ return 9; cin >> n; for(int i = 0; i < n; ++i){ char c; int k; cin >> c >> k; switch(c){ case 'A': A += k; break; case 'B': B += k; break; case 'C': C += k; break; case 'D': D += k; break; } s += k; } a = s/4; if(B){ r.push_back({'B', 'A', B}); } if(C){ r.push_back({'C', 'A', C}); } if(D){ r.push_back({'D', 'A', D}); } r.push_back({'A', 'B', a}); r.push_back({'A', 'C', a}); r.push_back({'A', 'D', a}); cout << r.size() << '\n'; for(auto a : r){ if(a[2] <= 0 || a[2] >= (int)1e9) return 6; cout << (char)a[0] << ' ' << (char)a[1] << ' ' << a[2] << '\n'; } }
Test details
Test 1
Verdict: RUNTIME ERROR
input |
---|
100 C 224 D 4 D 624 D 64 ... |
correct output |
---|
3 A B 630 C B 1636 C D 1470 |
user output |
---|
(empty) |
Test 2
Verdict: RUNTIME ERROR
input |
---|
100 D 768 B 608 A 116 C 80 ... |
correct output |
---|
3 B A 756 B C 1668 D C 1776 |
user output |
---|
(empty) |
Test 3
Verdict: RUNTIME ERROR
input |
---|
100 B 184 C 840 D 648 A 876 ... |
correct output |
---|
3 A B 1131 B C 190 C D 297 |
user output |
---|
(empty) |
Test 4
Verdict: RUNTIME ERROR
input |
---|
100 C 560 D 664 D 632 C 944 ... |
correct output |
---|
3 B A 3230 C B 2572 D C 1594 |
user output |
---|
(empty) |
Test 5
Verdict: RUNTIME ERROR
input |
---|
100 B 20 A 664 D 504 A 248 ... |
correct output |
---|
3 A B 138 B C 652 C D 350 |
user output |
---|
(empty) |
Test 6
Verdict: RUNTIME ERROR
input |
---|
100 B 204 D 520 C 500 C 256 ... |
correct output |
---|
3 B A 285 B C 482 C D 1321 |
user output |
---|
(empty) |
Test 7
Verdict: RUNTIME ERROR
input |
---|
100 B 672 B 840 A 712 C 640 ... |
correct output |
---|
3 B A 324 C B 5128 D C 2920 |
user output |
---|
(empty) |
Test 8
Verdict: RUNTIME ERROR
input |
---|
100 C 860 D 732 A 952 C 940 ... |
correct output |
---|
3 A B 24 C B 536 D C 2252 |
user output |
---|
(empty) |
Test 9
Verdict: RUNTIME ERROR
input |
---|
100 C 84 A 592 B 840 C 708 ... |
correct output |
---|
3 A B 115 B C 1746 D C 3791 |
user output |
---|
(empty) |
Test 10
Verdict: RUNTIME ERROR
input |
---|
1 A 100 |
correct output |
---|
3 B A 75 C B 50 D C 25 |
user output |
---|
(empty) |
Test 11
Verdict: RUNTIME ERROR
input |
---|
4 A 25 B 25 C 25 D 25 |
correct output |
---|
0 |
user output |
---|
(empty) |