Tutorial is loading...
Код автора
# | User | Rating |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Codeforces Round #415 Editorial
int n, k, s = 0;
cin >> n >> k;
for (int i = 0; i < n; ++i) {
int x;
cin >> x;
s += x;
}
for (int ans = 0;; ans++) {
int a = 2 * (s + ans * k);
int b = (2 * k - 1) * (ans + n);
if (a >= b) {
cout << ans;
return 0;
}
}
Rev. | Lang. | By | When | Δ | Comment | |
---|---|---|---|---|---|---|
ru11 | hloya_ygrt | 2017-05-21 17:06:43 | 15 | Мелкая правка: '\n\nFirst accepted:' -> '\n\nFirst (and last :DD) accepted:' | ||
ru10 | hloya_ygrt | 2017-05-21 13:57:38 | 550 | |||
en2 | hloya_ygrt | 2017-05-21 13:49:20 | 549 | (published) | ||
en1 | hloya_ygrt | 2017-05-21 13:17:06 | 12044 | Initial revision for English translation | ||
ru9 | hloya_ygrt | 2017-05-21 13:15:20 | 2 | |||
ru8 | hloya_ygrt | 2017-05-21 13:15:02 | 8304 | |||
ru7 | hloya_ygrt | 2017-05-21 12:53:03 | 1739 | |||
ru6 | hloya_ygrt | 2017-05-21 12:32:22 | 599 | |||
ru5 | hloya_ygrt | 2017-05-21 12:20:12 | 536 | |||
ru4 | hloya_ygrt | 2017-05-21 12:12:56 | 458 | |||
ru3 | hloya_ygrt | 2017-05-21 12:08:21 | 30 | |||
ru2 | hloya_ygrt | 2017-05-21 12:07:39 | 321 | |||
ru1 | hloya_ygrt | 2017-05-21 12:05:40 | 47 | Первая редакция (сохранено в черновиках) |
Name |
---|