Tutorial is loading...
Код автора
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 160 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
8 | Dominater069 | 154 |
8 | nor | 154 |
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 |
---|