Comments

Congrats and great blog! There are few write-ups here as well: https://www.quora.com/What-is-your-ACM-ICPC-story

Try this:

4 
1 1
1 2
1 3
1 4
100 101 102 2
2 2 2 100

Ans: 110

0

Can you re-open the link? Great initiative

On hitman623 → Manthan — Codefest'19, 7 years ago
+3

What is test #5 of D?

4 -1
100 -100 90 -101

How to solve F?

How to solve E?

Answer is yes. (1-2, 2-3, 3-4, 4-5)

May be because if a[i]>=N, you need to push i at ind[N]?

What is test #3 of problem C?

+104

I think GreenGrape should write problems for Div 1, not Div 2.

How to solve G?

If n=1500, then we can find all the pairs (i,j) and for each pair we can map it to 1 if inverted else 0, sort it according to j values and build a segment tree of sums out of that. Then, for every l and r we can find effective r' (means how many pairs are there till r) and update (1,r') and effective l' and update (1,l'). In update operation we just invert it (0 if 1, 1 if 0). And the answer will be sum of all nodes in segment tree. Complexity- O(q*log(n*n)) Will this work?

In this Link user swetankmodi claimed to have used setprecision(18) but still got WA.

Hi, please check the first image. There I used setprecision(10). Still WA. This is not only my case, check this discussion on codechef Link

Auto comment: topic has been updated by rishi_07 (previous revision, new revision, compare).

But I hacked a solution whose output was 1. It showed me unsuccessful hack!!
solution code: 29883956
edit: sorry my bad. The code gives correct output i.e. 0.

For this testcase for problem B: 5 3 1 5 0 1 What should be the answer?

0

The answer is NO right!

-13

In DIV 2 C,if the product of the scores is not perfect cube the answer is surely NO. Why did I get Wrong answer then? My solution

For Div 1 A/ Div 2 C, consider the following testcase:
4
bcc 1 3
c 1 5
bcbc 1 6
cc 1 4
The answer should be "bcbccbcbc" but the accepted solutions output is "aabccbcbc". Why so? The question states that there is at least k occurrences of each string!

EDIT: My mistake! Interpreted the question wrong!

+13

He unregistered!

How to solve E?

On adedalic → Codeforces Round #421, 9 years ago
0
On adedalic → Codeforces Round #421, 9 years ago
+3

Let's assume there are three vertices, v1,v2 v4. There is another vertex v3 in between v2 and v4. Now, it is not difficult to prove that angle(v2v1v3)=angle(v3v1v4) when the edge connecting (v2,v3) and (v3,v4) are equal. Just join v2 with v4 and v1 with v3. Since the edges (v2,v3) and (v3,v4) are equal, then tiangle (v2,v3,v4) is isosceles and therefore (v1,v3) will pass through the mid-point of (v2,v4). Hence, the difference is equal.

214 successful hacks!! Great!

His handle is justified :p Even after solving all problems, 2nd position! :p

Problem statements were very unclear! One reading was not sufficient at all :(

Auto comment: topic has been updated by rishi_07 (previous revision, new revision, compare).

Oh I see..But in the contest page, they mention it will be ACM style. Such ambiguity! Thanks btw, it will be scorebased!

The rankings will be ACM style not score based. So all must start exactly at 21:00. It's of no use to start late. Time will break the ties. Check here: https://www.codechef.com/SNCKPA17

On hloya_ygrt → Codeforces Round #415, 9 years ago
0

Still waiting......Div 1 ratings already updated...this time too late!

all elements >=1

nope. answer is 1. after 1 operation- it turns 0 2 gcd(0,2)=2

On Barichek → Codeforces Round #407, 10 years ago
+3

How come? if b1=0 and q=0 then the answer should be infinite!!