|
On
IceKnight1093 →
Invitation to CodeChef Starters 78 (Rated till 6-stars) — 22nd February, 4 years ago
+5
Hint: Any good subarray will contain atmost 30 distinct elements. |
|
+11
That was a constructive reply. |
|
0
The editorial of make permutation is available now. Do check it. |
|
0
Note the unusual timing. |
|
+3
Is there any approach different from the editorial of problem G? |
|
0
. |
|
0
Problem E is easy if you solved this recent Indian ICPC problem. |
|
+1
On line $$$137$$$, do $$$snukes[x][t] += a$$$. Also provide the base case of recursion, like $$$t == 1e5 + 1$$$ return 0; code |
|
On
chokudai →
LINE Verda Programming Contest(AtCoder Beginner Contest 263) Announcement, 4 years ago
+3
Let, $$$dp_i$$$ = number of rolls needed to reach position $$$n$$$ starting from position $$$i$$$. Hence $$$dp_n = 0.$$$ $$$dp_i = \frac{(1 + dp_{i}) + (1 + dp_{i+1}) + \dots + (1 + dp_{i + a_i})} {(a_i + 1)}.$$$. If you solve the equation, you get $$$dp_i = \frac{a_i + 1 + (dp_{i+1}+\dots + dp_{i + a_i})} {a_i}.$$$. So you can traverse from $$$i = n - 1$$$ to $$$i = 0$$$ and calculate $$$dp_i$$$. To calculate the value of $$$dp_{i+1}+\dots + dp_{n + a_i}$$$ you can use fenwick tree or segment tree. |
|
+9
There should be atleast one strong Chinese tester in each round. |
|
0
ABC 257 starting in less than a minute!! |
|
0
Nice problem set! |
|
+10
We want screencast |
|
+3
list, coding style seems very close |
|
+4
A team needs at least one programmer. Hence the number of teams can be at most a. A team needs at least one mathematician. Hence the number of teams can be at most b. A team needs at least four members. Hence the number of team can be at most = total people / 4 = (a + b)/4. So finally the number of teams = min of above three = min({a, b, (a + b)/4}) |
|
+20
Game theory problems loading |
|
0
At the time of the round the CheReKOSH olympiad will be held, where the problems from this round will be used! |
|
0
I feel you. |
|
+1
Thanks codeforces. I will be back again. |
|
0
Sed lyf, but the chances of being unrated is 99.99%. |
|
-7
If unrated, my possibility of becoming CM will be ruined for this time. |
|
+19
I believe you are classmate of these two. |
|
0
Anyways hope is a good thing. |
|
0
What generally erase does !!!!! |
|
0
In multiset we use s.erase(s.find(key)) to erase one occurrence of a value. In pbds i don't think there is such operation. |
|
0
I think you are asking how to find number of values less than equal to some x in pbds with pairs. s.order_of_key({x, n+1}) where n=number of elements in array. Or you can use any big value instead of n+1. s=name of pbds you initialized. |
|
0
Try pbds with pairs, insert{a[i],i}. |
|
+53
Clashes with Codeforces Round #723. Can you please delay the contest by one hour? |
|
-59
IITians !! |
|
+3
I solved problem 2 but I am not sure if it is correct or not. pre[i][0] = sum of subarray elements starting from o to l where(l < i) pre[i][1]= sum of subarray elements starting from l + 1 to i such that absolute difference between pre[i][0] and pre[i][1] is minimum. also calculated suf[i][0], suf[i][1] for subarray from i to n — 1. |
|
+12
Link to my code |
|
+28
I quit |
|
On
ch_egor →
Codeforces Round #707 (Div.1, Div.2, based on Moscow Open Olympiad in Informatics, rated), 6 years ago
+39
Matured testers |
|
+61
MiFaFaOvO Registered ... |
|
0
Problem I |
|
+5
Can you please make the codes visible? |
|
0
I had done the same mistake in a round. |
|
0
If n = 5 and inputs are 2 1 1 1 1, then for loop breaks in the fourth iteration and the last one is acting as n for next test case. |
|
0
Wait, it was GRAPH!! |
|
+1
Atcoder is a competitive programming website just like codeforces. It holds a beginner level contest almost every week named Atcoder Beginner Contest(ABC in short). |
|
+5
Now scheduled :) |
|
+1
Scheduled ! |
|
0
What is your favourite topic in cp ? Btw i have learned so many things just by reading your codes, especially in dynamic programming. |
|
0
Thank you |
|
0
I think this works in log(n). |
|
0
Is multiset is too slow for 2e5? or I had something wrong in my code for problem F: Your text to link here... |