№ | Пользователь | Рейтинг |
---|---|---|
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 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 156 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Polynomial Round 2022 (Div. 1 + Div. 2) Editorial
Thank you for your participation!
Problem A
Idea: Cirno_9baka
The answer is the number of $$$1$$$s modulo $$$2$$$.
We can get that by adding '-' before the $$$\text{2nd}, \text{4th}, \cdots, 2k\text{-th}$$$ $$$1$$$, and '+' before the $$$\text{3rd}, \text{5th}, \cdots, 2k+1\text{-th}$$$ $$$1$$$.
#include <bits/stdc++.h>
using namespace std;
char c[1005];
int main() {
int t;
scanf("%d", &t);
int n;
while (t--) {
scanf("%d", &n);
scanf("%s", c + 1);
int u = 0;
for (int i = 1; i <= n; ++i) {
bool fl = (c[i] == '1') && u;
u ^= (c[i] - '0');
if (i != 1) putchar(fl ? '-' : '+');
}
putchar('\n');
}
}
Problem B
Rev. | Язык | Кто | Когда | Δ | Комментарий | |
---|---|---|---|---|---|---|
en29 | ChthollyNotaSeniorious | 2022-12-18 11:18:00 | 2 | Tiny change: 'nd let $j++$. when on' -> 'nd let $j+1$. when on' | ||
en28 | ChthollyNotaSeniorious | 2022-12-18 10:31:30 | 106 | Tiny change: 'has $sum/n 1$s. Becau' -> 'has $sum/n$ $1$s. Becau' | ||
en27 | ChthollyNotaSeniorious | 2022-12-18 04:39:48 | 7648 | |||
en26 | ChthollyNotaSeniorious | 2022-12-18 04:32:22 | 0 | (published) | ||
en25 | ChthollyNotaSeniorious | 2022-12-18 04:32:01 | 368 | (saved to drafts) | ||
en24 | ChthollyNotaSeniorious | 2022-12-17 21:44:53 | 10 | Tiny change: 'ac{sum}{n}$ $1$s. Becau' -> 'ac{sum}{n}\ 1$s. Becau' | ||
en23 | ChthollyNotaSeniorious | 2022-12-17 21:19:00 | 2 | Tiny change: 'ryone a gold time to ' -> 'ryone a good time to ' | ||
en22 | ChthollyNotaSeniorious | 2022-12-17 21:17:53 | 0 | (published) | ||
en21 | ChthollyNotaSeniorious | 2022-12-17 21:16:43 | 2 | Tiny change: '2-12-17]\nTo be ad' -> '2-12-17]\n\nTo be ad' | ||
en20 | ChthollyNotaSeniorious | 2022-12-17 21:16:25 | 2 | Tiny change: '2-12-17]\n\nTo be ad' -> '2-12-17]\nTo be ad' | ||
en19 | ChthollyNotaSeniorious | 2022-12-17 21:16:07 | 90 | Tiny change: 'fault.\n\nProblem A \nIdea: ' -> 'fault.\n\n[problem:1774A] \nIdea: ' | ||
en18 | ChthollyNotaSeniorious | 2022-12-17 21:14:43 | 18 | Tiny change: '022-12-17]' -> '022-12-17]\n\nTo be added...' | ||
en17 | ChthollyNotaSeniorious | 2022-12-17 21:14:24 | 44 | Tiny change: 'oiler>\n\n' -> 'oiler>\n\nProblem H \nIdea: [user:Ecrade_,2022-12-17]' | ||
en16 | ChthollyNotaSeniorious | 2022-12-17 21:11:33 | 345 | |||
en15 | ChthollyNotaSeniorious | 2022-12-17 20:54:24 | 309 | |||
en14 | ChthollyNotaSeniorious | 2022-12-17 20:31:46 | 19 | |||
en13 | ChthollyNotaSeniorious | 2022-12-17 20:31:04 | 12428 | |||
en12 | ChthollyNotaSeniorious | 2022-12-17 14:25:55 | 48 | |||
en11 | ChthollyNotaSeniorious | 2022-12-17 14:24:25 | 21 | |||
en10 | ChthollyNotaSeniorious | 2022-12-17 14:22:55 | 4056 | |||
en9 | ChthollyNotaSeniorious | 2022-12-17 14:11:30 | 2012 | |||
en8 | ChthollyNotaSeniorious | 2022-12-17 11:17:09 | 1125 | |||
en7 | ChthollyNotaSeniorious | 2022-12-17 10:43:56 | 452 | |||
en6 | ChthollyNotaSeniorious | 2022-12-16 17:27:15 | 346 | Tiny change: 'roblem A\nIdea: [u' -> 'roblem A\n\nIdea: [u' | ||
en5 | ChthollyNotaSeniorious | 2022-12-16 13:17:33 | 2 | Tiny change: 'roblem A\n\nIdea: [u' -> 'roblem A\nIdea: [u' | ||
en4 | ChthollyNotaSeniorious | 2022-12-16 13:17:11 | 31 | |||
en3 | ChthollyNotaSeniorious | 2022-12-16 12:25:06 | 539 | |||
en2 | ChthollyNotaSeniorious | 2022-12-16 12:10:45 | 224 | Tiny change: 'ation!\n\n' -> 'ation!\n\n::spoiler\nqwq\n::' | ||
en1 | ChthollyNotaSeniorious | 2022-12-16 12:02:06 | 87 | Initial revision (saved to drafts) |
Название |
---|