Task: | Kertoma |
Sender: | stpn129 |
Submission time: | 2022-10-31 11:14:37 +0200 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
#2 | WRONG ANSWER | 0 |
#3 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | WRONG ANSWER | 0.00 s | 1, 2, 3 | details |
#2 | WRONG ANSWER | 0.00 s | 1, 2, 3 | details |
#3 | WRONG ANSWER | 0.00 s | 1, 2, 3 | details |
#4 | WRONG ANSWER | 0.00 s | 1, 2, 3 | details |
#5 | WRONG ANSWER | 0.00 s | 1, 2, 3 | details |
#6 | WRONG ANSWER | 0.00 s | 1, 2, 3 | details |
#7 | WRONG ANSWER | 0.00 s | 2, 3 | details |
#8 | WRONG ANSWER | 0.00 s | 2, 3 | details |
#9 | WRONG ANSWER | 0.00 s | 2, 3 | details |
#10 | WRONG ANSWER | 0.00 s | 2, 3 | details |
#11 | WRONG ANSWER | 0.00 s | 3 | details |
#12 | WRONG ANSWER | 0.00 s | 3 | details |
#13 | WRONG ANSWER | 0.00 s | 3 | details |
#14 | WRONG ANSWER | 0.01 s | 3 | details |
#15 | WRONG ANSWER | 0.01 s | 3 | details |
#16 | WRONG ANSWER | 0.01 s | 3 | details |
Code
#include "bits/stdc++.h" using namespace std; void init_code() { ios_base::sync_with_stdio(false); cin.tie(NULL); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif } void solve() { vector<int> a(10); int n = 0; for (int i = 0; i < 10; ++i) { cin >> a[i]; n += a[i]; } if (n < 4) { } else { double d = 0; int x = 1; double dn = n + 0.0; while (d < dn) { d += log10(x); x++; } cout << x; } } signed main() { init_code(); int t = 1; //cin >> t; while (t--) { solve(); } return 0; } /* vector<pair<int, int>> moves = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}}; int n, m; cin >> n >> m; char x; pair<int,int> sa, sb; vector<vector<int>> a(n, vector<int> (m)); for (int i = 0; i < n; ++i){ for (int j = 0; j < m; ++j) { cin >> x; if (x == '#') { a[i][j] = 0; } else if (x == '.'){ a[i][j] = 1; } else if (x == 'A'){ a[i][j] = 2; sa = {i, j}; } else if (x == 'B'){ a[i][j] = 3; sb = {i, j}; } } } vector<vector<int>> used(n, vector<int> (m)); used[sa.first][sa.second] = 1; used[sb.first][sb.second] = 2; set<pair<int, int>> q; q.insert(sa); pair<int, int> v; vector<pair<int, int>> while (!q.empty()) { v = *q.begin(); q.erase(q.begin()); for (auto mv : moves) { int x = v.first + mv.first, y = v.second + mv.second; if (x >= 0 && x < n && y >= 0 && y < m && a[x][y] == 1 && used[x][y] == 0) { used[x][y] = 1; q.insert({x, y}); } } } q.insert(sb); while (!q.empty()) { v = *q.begin(); q.erase(q.begin()); for (auto mv : moves) { int x = v.first + mv.first, y = v.second + mv.second; if (x >= 0 && x < n && y >= 0 && y < m && a[x][y] == 1 && used[x][y] == 0) { used[x][y] = 2; q.insert({x, y}); } else if (x >= 0 && x < n && y >= 0 && y < m && a[x][y] == 1 && used[x][y] == 1) { cout << 1 << '\n'; return; } } } for (int i = 0; i < ; ++i) { } */
Test details
Test 1
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
0 0 1 0 0 0 0 0 0 0 |
correct output |
---|
2 |
user output |
---|
(empty) |
Test 2
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
0 0 0 0 0 0 1 0 0 0 |
correct output |
---|
3 |
user output |
---|
(empty) |
Test 3
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
0 0 1 0 1 0 0 0 0 0 |
correct output |
---|
4 |
user output |
---|
(empty) |
Test 4
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
2 0 1 1 0 0 1 0 2 0 |
correct output |
---|
10 |
user output |
---|
12 |
Test 5
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
9 3 1 1 2 2 3 1 6 1 |
correct output |
---|
27 |
user output |
---|
29 |
Test 6
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
10 4 3 4 3 2 2 4 3 7 |
correct output |
---|
36 |
user output |
---|
38 |
Test 7
Group: 2, 3
Verdict: WRONG ANSWER
input |
---|
71 53 36 30 25 29 42 24 34 29 |
correct output |
---|
199 |
user output |
---|
201 |
Test 8
Group: 2, 3
Verdict: WRONG ANSWER
input |
---|
71 33 46 38 27 45 36 21 35 35 |
correct output |
---|
205 |
user output |
---|
207 |
Test 9
Group: 2, 3
Verdict: WRONG ANSWER
input |
---|
93 38 35 26 43 54 38 25 41 34 |
correct output |
---|
222 |
user output |
---|
224 |
Test 10
Group: 2, 3
Verdict: WRONG ANSWER
input |
---|
100 33 33 45 36 43 38 54 56 36 |
correct output |
---|
242 |
user output |
---|
244 |
Test 11
Group: 3
Verdict: WRONG ANSWER
input |
---|
3419 1797 1845 1849 1879 1791 ... |
correct output |
---|
5959 |
user output |
---|
5961 |
Test 12
Group: 3
Verdict: WRONG ANSWER
input |
---|
4776 2695 2709 2781 2616 2753 ... |
correct output |
---|
8391 |
user output |
---|
8393 |
Test 13
Group: 3
Verdict: WRONG ANSWER
input |
---|
20097 12282 12229 12214 12406 ... |
correct output |
---|
32001 |
user output |
---|
32003 |
Test 14
Group: 3
Verdict: WRONG ANSWER
input |
---|
47934 29918 29878 29713 29984 ... |
correct output |
---|
71718 |
user output |
---|
71720 |
Test 15
Group: 3
Verdict: WRONG ANSWER
input |
---|
84691 54156 54277 54533 54296 ... |
correct output |
---|
123123 |
user output |
---|
123125 |
Test 16
Group: 3
Verdict: WRONG ANSWER
input |
---|
99098 63339 63878 64182 63904 ... |
correct output |
---|
142663 |
user output |
---|
142665 |