| # | User | Rating |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | jiangly | 3670 |
| 3 | Kevin114514 | 3657 |
| 4 | maroonrk | 3355 |
| 5 | Um_nik | 3353 |
| 6 | squareOf105 | 3346 |
| 7 | tourist | 3343 |
| 8 | strapple | 3324 |
| 9 | heuristica | 3322 |
| 10 | jiangbowen | 3291 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | nik_exists | 150 |
| 2 | maspy | 150 |
| 4 | AmShZ | 143 |
| 5 | Um_nik | 141 |
| 6 | Errichto | 139 |
| 7 | adamant | 137 |
| 8 | BledDest | 133 |
| 8 | maroonrk | 133 |
| 10 | qwexd | 130 |
|
0
Dunno about you all but this is imo very confusing descrption: description According to the legends, for the apocalypse to happen, the signs must occur sequentially. That is, first they wait for the first sign to occur, then strictly after it, the second sign will occur, and so on. That is, if the i-th sign occurred in the year x, the tribe starts waiting for the occurrence of the (i+1)-th sign, starting from the year x+1 Why use words sequentially? Why use "strictly after". If there werre not example input/output I would think that you have to find years p, p+1, p+2, ..., p+n such that first sign happens on p, second sign happens on p+1 and so on. |
|
0
I've got no idea why my code for D doesnt pass the official test. It says that it expects output '12' (instead of '11) on test number 2. But when I run this test locally I get result '12' :O |
|
0
Maybe it's possible to kinda optimise number of edges in some way. Eg. have a quick way of checking whether an edge even makes sens (ie. no point for this edge to exist because going through some circle first will always be better). |
|
0
interesting indeed dijkstra comes to mind, but it's too slow right |
|
0
I'm not sure whether I understand your code correctly, but I think that in a scenario where res is not 0, you have to move 2 guys to next level, but you're moving only one |
|
0
Thanks, I was thinking about a wrong problem -.- I thought that the labels of participants can be permutated (ie. 1 doesn't have to play 2 at the beginning) |
|
0
but how |
|
0
you're right, nice I didn't understand the code (didn't have time to in the morning). however what I usually do is calculate all inversions independently — this can also be done in linear time |
|
0
This is good but you can count inversions in linear time instead of nlogn |
|
0
I think I'm missing something, either way you have to multiply each one of them |
|
0
why would that be smarter |
|
0
no no no You don't calculate newtons binomial like that :) you dont divide by n!, you multiply by inversions of every number between [2 ... n], so inv(2) * inv(3) * ... * inv(n) (of course keeping everything in check using modulo) |
|
+1
I'm on mobile. Ill answer tomorrow if nobody else explaons |
|
+5
C needs more explanation. It s not obvious that pitting all opening brackets before closing ones gives us best chances of forming rbs. Dont misunderstand me, i know how to prove it now. |
|
0
I like both, when it comes to the old ones I would definitely add berserk. (but berserk manga is so good that it's hard to fck up, though possible :)) |
|
0
Anybody knows the solution for B if all ai were to be distinct between one another? (meaning that for any l <= i, j <= r and i != j: ai != aj) |
|
+13
Dang really nice solution. Hmm maybe it would be easier just binsearching min and max for each segment :D? |
|
+3
Hmm, D doesn't budge for me :D. Any tips? Only thing I've realized is that we always know where 1 is but other than that it may depend :< |
|
+3
Hmm probably depends on what kind of integers and what kind of doubles we're talking about right? Because double has gaps between very big integers and for sufficiently big integers we could probably use that. |
|
+11
put it in spoiler |
|
0
His/her brute force will catch it though :) |
|
0
Yea should pass, why not |
|
+11
div2C is you either guess solution or you don't turns out the letter that occurs odd number of times (over all t's) is the solution. |
|
+1
For rows: store in set every value that is not covered by any rook. initially this set is obv full. to know whether there exists a row between x1 and x2 that is not covered you make use of set.lower_bound() if lower_bound(x1) is set.end() or its value is > x2 then all cells between x1 and x2 must be covered same for columns |
|
0
It can be solved with c++ set |
|
+3
Put it in spoiler and don't spam? |
|
0
I've done this problem the same way as you (logic wise). You can look at my submission. However, I used C++'s set and its 'lower_bound' function. I guess you can find something similar in python :) Maybe there is even some simpler way to solve it but I can't think of anything. |
|
0
I mean you have those two loops in your code: |
|
0
Aren't you iterating over rows and columns for each query though? |
|
+2
Which tasks required segment trees? I only looked at A, B, C and D and none of them required it (or anything similar like Fenwick) |
|
+1
I would argue that 'cost of removal' is pretty ambiguous in C. I myself understood it as a cost of single move — mainly because plural form 'removals' was used in previous sentence. But I think that task descriptions were fine. |
|
0
6 101000 and 4 1011 |
|
0
Dang, that problem B though :P I think it should be swapped with C (looking at point distribtuion)? |
|
0
yes, E, my bad :) |
|
+9
In E we can choose any vertex to be root, right? And max xor will always be n, where n is number of vertices? |
|
+4
Dang, I think I was really close to solving E for the first time. It's a pity I now have to wait for system test to end in order to test my solution :( |
|
+3
Maaaaaaaaybe, but contests this year were all reaaally good so that woudln't be anything bad. Problem A was too hard — that's for sure. Problem B was kinda boring, but implementation heavy and bug prone (at least in my case). Problem C was really nice though. Problem D was nice as well. Not sure about rest as I didn't read them. |
|
+7
I had such a hard time solving A. Hopefully my last submition goes through system testing XD |
|
+6
nice observation, but solving B in a straighforward way is implementation heavy |
|
0
DANGGGGGGGGGGGGG, I didn't think of using anything smaller than 2x2. Thanks. |
|
0
How to solve C -.-? |
|
On
ch_egor →
Codeforces Round #775 (Div.1, Div.2, based on Moscow Open Olympiad in Informatics, rated), 5 years ago
0
no more than one means either 0 or 1 |
|
On
ch_egor →
Codeforces Round #775 (Div.1, Div.2, based on Moscow Open Olympiad in Informatics, rated), 5 years ago
+3
it was written in bold so problem writers cannot be blamed for it :D |
|
+3
It won't work Edit: Actually I don't know. Edit2: I've coded it — it doesnt find the minimal value correctly. |
|
0
Would this idea work for D? idea Have some structure that keeps pairs {rank of vertex, vertex} sorted — eg. set. 'rank of vertex' is number of vertex's neighbors that have no weight assigned yet. Now while there are vertices with no weight assigned do: take vertex with smallest rank for every neighbor of this vertex that has no weight — assign weight 1 to them assign weight to our vertex — weight will be number of neighbors for each neighboring vertex reduce their rank by one and update our structure accordingly So this algorithm would work something like Kruskal. I think only difference is this weird updating of ranks. |
|
0
Maybe it's not hard actually. Like I don't know, I guess once you see similar problem you're going to link it to inversions pretty fast. But maybe if you've never seen anything similar (both in cs and math) then it might be hard, I agree. |
|
0
I mean with the operation given in task you never change parity of inversions. So if initially parity of inversions is odd it will never be even and the other way around. So I guess linking the task to inversions is fairly forcing. What's hard is 'proving' that from every odd state you can reach every other 'odd' state. |
|
0
it's pretty standard tbh |
|
On
Utkarsh.25dec →
Invitation to CodeChef March Starters 28 (Rated for Div 2, 3 & 4) — 2nd March, 5 years ago
0
Lol nice one :D |
|
0
It's not only about counting inversions — if there are two values that are the same then you don't have to care about parity of inversions. But here is my code if you want it: https://atcoder.jp/contests/arc136/submissions/29743627 |
|
0
ah didn't know — but still it's not needed |
|
0
Or is my solution wrong? (it got AC) |
|
0
B can be solved in O(n^2) time (when counting inversions). If we had to use some kind of tree (eg. Fenwick) to get nlogn it would have been way harder. |
|
0
which n gives the highest chances for hacking? :D |
|
+9
Yes. What is the number of possible distinct colorings if you know grid is n x m, there are k colors and you know that q coloring operations were performed (but you don't know anything about those operations). |
|
0
But I couldn't really figure it out. |
|
+1
Version in which no coordinates are given. Just n, m, q and k in input, nothing more. |
|
+1
A — D, were great (didn't read E or F yet). It's a pity I didn't read D thoroughly and was thinking about a way harder problem (one in which we're not given coordinates of operations — just q) |
|
0
Yea, going to be speedforces for me unless I get enlightened by algod. |
|
+7
Problemset was godlike, only problem that wasn't that good was D, because it was heavy implementation based. But other problems? Really nice. |
|
0
(look at my submission history :P) |
|
0
Replace endl with "\n" |
|
+6
But after its increased to 1000, someones gonna say why not increase it to 2000 and so on |
|
+42
Tbh it gives those t-shirts some prestige right? |
|
+3
The only real programming problems (E and F) turned out to be too hard for me :/ In E I guess that if one array has more than one occurence of certain number we can put half of them in L and other half of them in R, right? Problem A was great imo :) |
|
+100
This is the moment our future is going to be decided. We either dominate those ridiculous bots or they're going dominate us in the future. Everybody focus this round — this time it's not about rating, it's about something bigger. Good luck humans |
|
0
I might be misunderstanding something but as far as I understand as long as gcd > l — r + 1 we increase our r. The moment gcd becomes smaller than l — r + 1, we have to build new gcd and we do that by going back from r. Now if we manage to find a bad segment this way then everything is fine as we'll be able to move our l pointer to r + 1. But what if we only find segment [new_l, r] such that l < new_l < r and gcd(new_l,...,r) > r — new_l + 1 and gcd(new_l — 1, ..., r) < r — new_l + 2 Then we have to continue analyzing from l = new_l and r = r + 1 |
|
0
yes, but what about case where we don't find any bad segments in go back step? Then we cannot move our left pointer entirely to the right. |
|
0
I've solved it exactly this way during contest, however I was sure it was O(n^2). Seems like the proof has a lot to do with the fact that when we go back gcd can decrease up to log times. Maybe if I get some time, I'll try to prove it |
|
0
:( |
|
-7
Is this even possible to create a solution for D that exceeds time limit? |
|
+8
Spoiler There's no point using BIT OR operation more than once. |
|
+6
I have no idea why my solution to B passed pretests :OO |
|
0
This is a correct logic as far as I understand it. If tree is a line then you simply assign 2, 5, 2, 5 ... If it's not a line it's impossible. |
|
0
Okay, I overestimated your solution. To make up for my mistake here is a test where your solution is failing :). 1 1 10 abcxcdxdcx abcdcdcdcd |
|
0
No, this is correct, you must have made a mistake somwhere. I've done something very similar and it fails only on big tests (tle). |
|
0
I have idea :) |
|
0
Actually my solution to that problems is O(n * m * n). Does anybody know how to solve this variant in better time? |
|
0
Can be also solved greedily. Count occurences of letters in original string and count number of singles and doubles. (doubles — how many pairs of letters there are, singles — number of letters minus doubles * 2). Knowing singles and doubles values you can calculate solution. |
|
0
DAAAMN, I had so much fun solving E (although I didn't quite finish it). I thought that out of all solutions we were supposed to pick one that has least segments — which imo is even better problem (not sure if harder then original though). |
|
0
Okay, definitely not — 1rst case scenario |
|
0
Hey, ive solved c with binary search but was wondering whether this would work as well: First we find sufix that has minimum average value. Lets say that this value is some k. Does it stand that the answer is k, k-1 or k-2? Or sth similar? |
|
+14
but ur first soluition isn't really accepted it only passed pretests |
|
0
yes |
|
0
man what a solution :D |
|
+8
please I dont want to talk about this problem anymore. But basically if abs(a — b) > 1 then you can't construct it. |
|
+13
I'm gonna have nightmares about B. Daaamn it took me so long to to get it. |
|
0
your sieve is O (n ^ 2) and it should be linear (most likely — I don't know what task is about) |
|
0
And what is the result? sum of all dp[][] values? |
|
0
Indeed it has eg. if I run this code double x = 0.1; cout << (x * 3 == 0.3) << endl; result is 0 (false) for me |
|
0
Wasn't it stated in problem description that here you can take any sequence? edit: nvm |
|
+42
why? |
|
0
I believe you can now solve it on your own now. (Hint I can still see 2 subsequences that are invalid) (Hint 2 — 81267 is not prime) |
|
0
(1,7) is not valid as distance between two next elements is not e (2) |
|
0
Are you talking about problem C? If yes you didn't understand task properly. You're not supposed to find pairs (unless they fulfill certain conditions) — instead you have to find subsequnces. |
|
+4
Would that be possible to solve D for n ~ 10^6? I realized n was small very late into the contest and was thinking about variant in which n can be bigger :/ |
|
+3
Yea me too. In theory XOR has the same abstract complexity as AND and OR. But I feel like our (at least mine) minds don't understand XOR the same, natural way they understand AND and OR. Also XOR has so many weird characteristics that aren't easy to come up with on spot. |
|
On
isaf27 →
Technocup 2022 — Elimination Round 2 and Codeforces Round #755 (Div. 1, Div. 2), 5 years ago
-89
We have to postpone contest a bit. No way I can wake up that early |
|
On
gotexans →
Technocup 2022 — Elimination Round 1 and Codeforces Round #749 (Div. 1+Div. 2), 5 years ago
+3
aaah, smart |
|
On
gotexans →
Technocup 2022 — Elimination Round 1 and Codeforces Round #749 (Div. 1+Div. 2), 5 years ago
0
wait, what? XD I need to think about it |
| Name |
|---|


