# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3821 |
3 | Benq | 3736 |
4 | Radewoosh | 3631 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3388 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 161 |
5 | -is-this-fft- | 158 |
6 | awoo | 157 |
7 | adamant | 156 |
8 | TheScrasse | 154 |
8 | nor | 154 |
10 | Dominater069 | 153 |
Codeforces has ranks "candidate master", "master", "grandmaster", "international grandmaster" and "legendary grandmaster". I propose renaming these titles for the following reasons:
I think the following titles should be used instead:
Additionally, I believe "genius" is more descriptive than "master" or "grandmaster".
I want to note that a similar change was adopted by many projects:
Codeforces doesn't have any sort of dark theme. Even the special extensions (like a Dark Reader) don't really work with it — it leaves the logo background white. It looks like white is always better than black no matter what.
I hope you'll add dark theme as soon as possible and make it the default one.
just to point out: this is a sarcastic post, except for yet another request for a dark theme
After the last round (Codeforces Round 645 (Div. 2)), the trouble with problems' statements became quite obvious: many people liked the problem themselves, but legends do not. Some people even started talking about incorrect use of coronavirus theme in the statements, you can read this post.
It's quite a shame that the announcement and editoral get downvotes because of the legends, because making the legend is the most minor part of the problems, much more effort is spent on generating tests, inventing the problem itself, checking the solutions, writing tutorials, etc..
There are people who want to read only formal statements, and there are those who like to read legends. Unfortunately, the first ones are much more numerous, and some of them rate rounds not by problems, but by negative emotions caused during the contest, and in this case the legend.
It is often difficult to write a formal statements in a place with a legend, the participant is not obvious where to read what is important and what is not. But I think it's wrong to remove creativity on such an excellent platform as Codeforces. That's why I'd like to suggest this: the possibility to write a separate statements with a legend, a separate formal statements. That is, separate "tabs" in the problem with only formal statements, and the statements of which are now the majority on Codeforces.
This does not mean that the authors will have to invent a legend, the main thing is to write a formal statements for the participants. In this case, the legend's tab just contains a formal statements.
With this innovation, it will be better for everyone — the participants read the statements they want, and the authors are happy that the round is not free of creativity and the round is evaluated by the problems themselves.
I understand that this is likely to be difficult to implement, especially from the point of view of Polygon, but this update will be better for everyone. What do you think about it?
This is our first contest for the three of us (Alexdat2000, crazyilian, sevlll777), so we would like to share our impressions of creating this contest. Check it if you want to!
First problem — task rejections. 300iq rejected about 13 problems, 6 of which were supposed to be problem D. In the end, we came up with E, and the old E moved to D.
These are the verdicts with which the problems were rejected:
When the problems were already formed, their creation began. In some problems, it was necessary to lower the constraints, which made it impossible to cut off some non-deterministic or not optimal solutions.
Otherwise, everything was fine until the last 18 hours before the contest began...
A total of 475 commits to the Polygon were made.
During the round there were many of the same type, but also some funny clares. For example:
Thanks to everyone who upvotes this editorial!
And, of course, here's the tutorial of the round.
1358A - Park Lighting
Idea: Alexdat2000
#include <iostream>
using namespace std;
int main() {
int t, n, m;
cin >> t;
while (t--) {
cin >> n >> m;
cout << (n * m + 1) / 2 << '\n';
}
}
1358B - Maria Breaks the Self-isolation
Idea: crazyilian
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
void solve() {
int n;
cin >> n;
vector<int> arr(n);
for (int &el : arr)
cin >> el;
sort(arr.begin(), arr.end());
for (int i = n - 1; i >= 0; i--) {
if (arr[i] <= i + 1) {
cout << i + 2 << '\n';
return;
}
}
cout << 1 << '\n';
}
int main() {
int t;
cin >> t;
while (t--)
solve();
}
1358C - Celex Update
Idea: crazyilian
#include <iostream>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
long long a, b, c, d;
cin >> a >> b >> c >> d;
cout << (c - a) * (d - b) + 1 << '\n';
}
}
1358D - The Best Vacation
Idea: sevlll777
#include <iostream>
#include <algorithm>
#include <vector>
#define int long long
using namespace std;
signed main() {
int n, len;
cin >> n >> len;
vector<int> A(2 * n);
for (int i = 0; i < n; i++) {
cin >> A[i];
A[n + i] = A[i];
}
n *= 2;
vector<int> B = {0}, C = {0};
for (int i = 0; i < n; i++)
B.push_back(B.back() + A[i]);
for (int i = 0; i < n; i++)
C.push_back(C.back() + (A[i] * (A[i] + 1)) / 2);
int ans = 0;
for (int i = 0; i < n; i++) {
if (B[i + 1] >= len) {
int z = upper_bound(B.begin(), B.end(), B[i + 1] - len) - B.begin();
int cnt = C[i + 1] - C[z];
int days = B[i + 1] - B[z];
int too = len - days;
cnt += ((A[z - 1] * (A[z - 1] + 1)) / 2);
cnt -= (((A[z - 1] - too) * (A[z - 1] - too + 1)) / 2);
ans = max(ans, cnt);
}
}
cout << ans;
}
1358E - Are You Fired?
Idea: sevlll777 и crazyilian
#include <iostream>
#include <vector>
using namespace std;
#define int long long
signed main() {
int n;
cin >> n;
int N = (n + 1) / 2;
vector<int> a(N);
for (int &el : a)
cin >> el;
int Ax;
cin >> Ax;
vector<int> m(N + 1, 0);
int Pprefsm = 0;
for (int i = 1; i < N + 1; ++i) {
Pprefsm += Ax - a[i - 1];
m[i] = min(m[i - 1], Pprefsm);
}
int Aprefsm = 0;
for (int k = 1; k <= N; ++k)
Aprefsm += a[k - 1];
for (int k = N; k <= n; ++k) {
if (Aprefsm + m[n - k] > 0)
return cout << k, 0;
Aprefsm += Ax;
}
cout << -1;
}
1358F - Tasty Cookie
Idea: sevlll777 и crazyilian
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int LIM = 2e5;
bool is_increasing(const vector<int> &vec) {
for (int i = 0; i < vec.size() - 1; i++) {
if (vec[i] >= vec[i + 1])
return false;
}
return true;
}
bool is_decreasing(const vector<int> &vec) {
for (int i = 0; i < vec.size() - 1; i++) {
if (vec[i] <= vec[i + 1])
return false;
}
return true;
}
vector<int> rollback(const vector<int> &vec) {
vector<int> ans(vec.size());
ans[0] = vec[0];
for (int i = 1; i < vec.size(); i++)
ans[i] = vec[i] - vec[i - 1];
return ans;
}
signed main() {
int n;
cin >> n;
vector<int> a(n), b(n);
for (int &i : a)
cin >> i;
for (int &i : b)
cin >> i;
vector<int> a_rev = a;
reverse(a_rev.begin(), a_rev.end());
if (n == 1) {
if (a == b)
cout << "SMALL" << '\n' << 0 << '\n';
else
cout << "IMPOSSIBLE" << '\n';
return 0;
}
int sum_a = accumulate(a.begin(), a.end(), 0LL);
int sum_b = accumulate(b.begin(), b.end(), 0LL);
int rollback_cnt = 0;
if (n == 2) {
vector<int> ans; // -1 = R, X = PPP..PP (x times)
int move_cnt = 0, roll_cnt = 0; // both types
bool rev = a[0] > a[1];
if (rev)
swap(a[0], a[1]);
if (b[0] > b[1]) {
swap(b[0], b[1]);
ans.push_back(-1);
move_cnt++;
}
while (true) {
if (sum_a > sum_b) {
cout << "IMPOSSIBLE" << '\n';
return 0;
}
if (sum_a == sum_b) {
if (a != b) {
cout << "IMPOSSIBLE" << '\n';
return 0;
}
if (rev) {
ans.push_back(-1);
move_cnt++;
}
if (rollback_cnt > LIM) {
cout << "BIG" << '\n' << rollback_cnt << '\n';
return 0;
} else {
cout << "SMALL" << '\n' << move_cnt << '\n';
reverse(ans.begin(), ans.end());
for (auto i : ans) {
if (i == -1)
cout << "R";
else {
for (int _ = 0; _ < i; _++)
cout << "P";
}
}
cout << '\n';
return 0;
}
}
if (a[0] == b[0]) {
if ((b[1] - a[1]) % b[0] == 0) {
roll_cnt = (b[1] - a[1]) / b[0];
ans.push_back(roll_cnt);
move_cnt += roll_cnt, rollback_cnt += roll_cnt;
b = a;
sum_b = b[0] + b[1];
} else {
cout << "IMPOSSIBLE" << '\n';
return 0;
}
} else {
roll_cnt = b[1] / b[0];
ans.push_back(roll_cnt);
move_cnt += roll_cnt, rollback_cnt += roll_cnt;
ans.push_back(-1);
move_cnt++;
swap(b[0], b[1]);
b[0] %= b[1];
sum_b = b[0] + b[1];
}
}
}
string ans;
while (true) {
if (sum_a == sum_b) {
if (a_rev == b) {
ans.push_back('R');
reverse(b.begin(), b.end());
}
if (a == b) {
reverse(ans.begin(), ans.end());
if (rollback_cnt > LIM)
cout << "BIG" << '\n' << rollback_cnt << '\n';
else
cout << "SMALL" << '\n' << ans.size() << '\n' << ans << '\n';
} else
cout << "IMPOSSIBLE" << '\n';
return 0;
} else if (is_increasing(b)) {
b = rollback(b);
sum_b = accumulate(b.begin(), b.end(), 0LL);
ans += 'P';
rollback_cnt++;
} else if (is_decreasing(b)) {
reverse(b.begin(), b.end());
ans += 'R';
} else {
cout << "IMPOSSIBLE" << '\n';
return 0;
}
}
}
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int n;
cin >> n;
vector<int> a(n), b(n);
for (int i = 0; i < n; ++i) cin >> a[i];
for (int i = 0; i < n; ++i) cin >> b[i];
if (n == 1) {
if (a[0] == b[0]) cout << "SMALL\n" << 0;
else cout << "IMPOSSIBLE";
return 0;
}
if (n == 2) {
vector<pair<int, bool>> res;
int kol = 0;
while (true) {
if (b[0] == 0 || b[1] == 0) {
cout << "IMPOSSIBLE";
return 0;
}
if (a == b) break;
if (a[0] == b[1] && a[1] == b[0]) {
res.emplace_back(1, false);
break;
}
if (b[0] == b[1]) {
cout << "IMPOSSIBLE";
return 0;
}
if (b[0] > b[1]) {
res.emplace_back(1, false);
swap(b[0], b[1]);
}
if (a[0] == b[0] && a[1] < b[1] && a[1] % b[0] == b[1] % b[0]) {
res.emplace_back((b[1] - a[1]) / b[0], true);
kol += res.back().first;
break;
}
if (a[1] == b[0] && a[0] < b[1] && a[0] % b[0] == b[1] % b[0]) {
res.emplace_back((b[1] - a[0]) / b[0], true);
kol += res.back().first;
res.emplace_back(1, false);
break;
}
kol += b[1] / b[0];
res.emplace_back(b[1] / b[0], true);
b[1] %= b[0];
}
if (kol > 2e5) {
cout << "BIG\n";
cout << kol;
} else {
cout << "SMALL\n";
int flex = 0;
for (auto i : res) flex += i.first;
cout << flex << "\n";
for (int i = res.size() - 1; i >= 0; --i) {
for (int j = 0; j < res[i].first; ++j) {
if (res[i].second) cout << "P";
else cout << "R";
}
}
}
return 0;
}
vector<bool> ans;
int kol = 0;
while (true) {
if (a == b) break;
reverse(b.begin(), b.end());
if (a == b) {
ans.push_back(false);
break;
}
reverse(b.begin(), b.end());
bool vozr = false, ub = false, r = false;
for (int i = 1; i < n; ++i) {
if (b[i] > b[i - 1]) vozr = true;
else if (b[i] < b[i - 1]) ub = true;
else r = true;
}
if (r || (vozr && ub)) {
cout << "IMPOSSIBLE";
return 0;
}
vector<int> c(n);
if (ub) {
ans.push_back(false);
reverse(b.begin(), b.end());
}
c[0] = b[0];
for (int i = 1; i < n; ++i) {
c[i] = b[i] - b[i - 1];
}
ans.push_back(true);
b = c;
++kol;
}
if (kol > 2e5) {
cout << "BIG\n" << kol;
} else {
cout << "SMALL\n" << ans.size() << "\n";
for (int i = ans.size() - 1; i >= 0; --i) {
if (ans[i]) cout << "P";
else cout << "R";
}
}
}
Thank you, everyone, for participating in the round! We hope you've raised your rating! And if you haven't, don't be sad, you'll do it!
Name |
---|