Tutorial is loading...
Код автора
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3773 |
3 | Radewoosh | 3646 |
4 | ecnerwala | 3624 |
5 | jqdai0815 | 3620 |
5 | Benq | 3620 |
7 | orzdevinwang | 3612 |
8 | Geothermal | 3569 |
8 | cnnfls_csy | 3569 |
10 | gyh20 | 3447 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | awoo | 161 |
2 | maomao90 | 160 |
3 | cry | 158 |
4 | atcoder_official | 156 |
4 | nor | 156 |
6 | -is-this-fft- | 155 |
7 | maroonrk | 154 |
8 | adamant | 153 |
8 | Um_nik | 153 |
10 | djm03178 | 146 |
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. | Язык | Кто | Когда | Δ | Комментарий | |
---|---|---|---|---|---|---|
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 | Первая редакция (сохранено в черновиках) |
Название |
---|