Tutorial is loading...
Код автора
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 160 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | Dominater069 | 154 |
8 | awoo | 154 |
10 | luogu_official | 150 |
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 |
---|