Comments
  1. Go to https://kyc.fedex.com/
  2. Click the first link — Submission of KYC docs.
  3. Enter the details (AWB is your tracking number) and upload KYC docs.
  4. Wait for verification.

My shipping address is different from my permanent address. Is that fine since my shipping address will not match the one on the KYC docs?

Why is the compensation for problems in Easy and DSA half of what it is in Circuits (for the same difficulty level)?

There is some issue with 1st test case of problem 1 (Possibly x and n are on different lines). Please check.

On hxu10Google Code Jam 2022: Round 2, 4 years ago
0

I did the same which didn't pass. I then tried pruning which passed first set. Code

I think you'd require 1 more contest in Div 2 to advance to Div 1.

I think checking the following conditions would be fine-

  • $$$ (2 \cdot n) \% k = 0 $$$

  • $$$ \dfrac{2 \cdot n}{k} + 1 - k $$$ is positive and even.

+3

It is optional solution as the upper bound of total number possible strings is quite less.

+23

I also can't click on submit sometimes and during hacking, each submission takes around 30 seconds to load which is annoying.

I agree!!

What happened to rainboy??

+6

Did not even receive Oct ones yet :(

+3

A=[1,5,6] B=[10,3,4]

Codechef is not working for me

On HunterXDStrange message (Scam), 4 years ago
+16

Looks like Codeforces team added this after this blog. It's showing in my case now as well.

On HunterXDStrange message (Scam), 4 years ago
+42

I got a similar message from Rookie8 but I didn't do anything as stated by him.

message
On 244mhqDecember Lunchtime 2021, 4 years ago
0
Spoiler
0

It's not tough to write a brute force solution for C to verify.

It earlier showed eligible for me. After clicking re-validate, it is now showing ineligible with caption "has already graduated" whereas I am expected to graduate in 2022. What am I supposed to do now? Balajiganapathi

Edit: The issue is fixed.

Thank you so much!

As a problem setter ...

Agreed. I didn't even read that line.

There's only 1 case (apart from very obvious all-1) when there's draw. Revealing that would have spoiled the problem. There's no case other than 001 that'd be draw. Obviously you can say examples like 11010, 1010111 etc but they are essentially the same.

Yes, I think my solution 115611578 also takes around $$$ \frac{4\cdot n }{3}$$$ in the worst case and $$$n$$$ queries in the best case.

I restore $$$3$$$ elements in $$$4$$$ queries but if I find position of element $$$1$$$ or $$$n$$$, then I can easily find rest of the elements in $$$1$$$ query per element.

x and y in the above example are nearly good numbers. The case of b=1 is different. In that case, the numbers are not only divisible by b but also by a*b.

Note that nearly good numbers can be divisible by b.

+17

Why was problem statement of B written in reverse order? It was so confusing before the statement got changed. The conversion of pair was written before the condition which didn't make any sense.

On notTehlkaDoubt in C++, 5 years ago
+13

I hacked it with simple case of

1
1
1

You are accessing out of bounds. It is an undefined behavior. Hence, unpredictable results.

On notTehlkaDoubt in C++, 5 years ago
+34

Undefined behavior. Also, hacked

I don't like the idea of contests on consecutive days since the number of contests are limited. I'd prefer to wait for around 3 days between 2 contests than giving 2 contests on consecutive days and then waiting another 6 days for another contest.

Yes, but how is it magically passing? You're accessing out of bounds but still got it correct.

But shouldn't it be 6e7 according to this?

Why is the primes array of size 6e6?

On eatmoreGoogle Code Jam 2021, 5 years ago
0

Also, you can compare the both codes for better understanding-

~250 queries
~170 queries
On eatmoreGoogle Code Jam 2021, 5 years ago
0

Here it goes-

You can easily find the relative position of $$$3$$$ elements with just $$$1$$$ query. Now, I try to place elements from index $$$4$$$ to $$$N$$$ in already existing list one by one.

Let's say during the current iteration, size of already existing list is $$$l.$$$ I define $$$start=0$$$ and $$$end=l-1.$$$ For insertion of new element, it can have potentially have $$$l+1$$$ positions ($$$l-1$$$ in between the elements and $$$1$$$ before start and $$$1$$$ after end). Define $$$mid=(start+end)/2.$$$

To find the appropriate position-

I ask $$$(start,mid,i)$$$ where $$$i$$$ is the index of current element we want to place. You can also ask $$$(end,mid,i)$$$ depending on your implementation.

Now, we want to analyze how our search space will be reduced.

  1. If median is $$$start,$$$ we can stop our search and directly place $$$i$$$ before $$$start.$$$

  2. If median is $$$mid$$$, we can be sure that position of $$$i$$$ is definitely not before $$$mid.$$$ We can initialize $$$start=mid+1.$$$ This way we reduce the search space by half.

  3. If median is $$$i,$$$ we can be sure that position of $$$i$$$ is definitely not after $$$mid.$$$ We can initialize $$$end=mid-1.$$$ This way we reduce the search space by half. Also, we can increase $$$start$$$ by $$$1$$$ because we are also sure that the position is definitely after $$$start$$$, otherwise the result of the query would have be $$$start.$$$

Also, I handle the cases when search space reduces to $$$3$$$ or less separately because I don't wanna mess up and end in some infinite loop.

The total queries it takes is $$$1$$$ + $$$\Sigma^{N-1}_{i=3} (\log_2i-c)$$$ where $$$c \sim 1$$$. That $$$c$$$ is due to above mentioned few optimizations and the fact that input is random.

Also, I tested it locally and it takes $$$150-175$$$ queries. My initial solution was taking around $$$\sim 250$$$ queries because I was extra cautious and assigned $$$start=mid$$$ and $$$end=mid$$$ in case $$$2$$$ and $$$3$$$ respectively and did $$$1$$$ more query in case $$$1$$$ to confirm.

On eatmoreGoogle Code Jam 2021, 5 years ago
0

I applied binary search only with some some modifications to decrease queries per iteration and I was able to pass the last sub-task. I tested it locally and it was taking $$$155-175$$$ queries on an average.

Code
Code for testing
On eatmoreGoogle Code Jam 2021, 5 years ago
+17

I've no proof to my solution of Cheating Detection but I did something which looked good to me and it worked :)

I took all the players having $$$ \gt =5000$$$ score and sorted them in non increasing order of the solves. Assuming no cheating, I thought the adjacent players will have less mismatches because of similarity in value of $$$S$$$. Mismatch in a particular question is when score of player $$$i$$$ is different from score of player $$$j$$$. Calculated mismatch for all players. For players which are not on the end points, I took the average value.

I defined a function $$$f_i = a \cdot mismatch_i + b \cdot solves_i $$$.

I took the player having the maximum $$$f$$$ because there is good chance for the cheater to have good amount of solves and good amount of mismatches from its adjacents.

Tried bunch of values for $$$a$$$ and $$$b$$$ and it passed both sub-tasks with $$$a=5$$$ and $$$b=4$$$.

Solution (bit messy)

Sadly, I missed $$$3rd$$$ sub-task of Moons and Umbrellas and couldn't get perfect score. I should've tested it properly :(

I kept getting TLE on test 15 in D. What's the ideal complexity?

Wait! This isn't codechef.

Thanks for the descriptive explanation.

Breaking as soon as you get a pizza with almost new ingredients runs fast in D and E. You can't afford to traverse the whole array for choosing a pizza every-time in D and E.

On MorphyCC February Long 2021, 5 years ago
+10

It takes 3-4 months after plagiarism check.

+5

I missed these cases :'(

First test set is small. So, you can try everything. For the rest, mostly picking the pizzas with largest ingredients and matching the pizzas such that increase of ingredients is maximum and/or intersection is less. Also, tried partial randomization of the sorted (based on count of ingredients) pizzas array and ran 10-2000 times depending upon the size of test set.

  • $$$A: 74$$$
  • $$$B: 12,676$$$
  • $$$C: 706,624,573$$$
  • $$$D: 8,061,427$$$
  • $$$E: 10,988,056$$$
  • $$$Total: 725,686,806$$$
On liouzhou_101Codeforces Round #700, 5 years ago
0

I just asked random indices and it is going to fst.

In D, is ans always possible except for the case when n=2 and m%2=0?

On rgrg4Let's spread some positivity, 5 years ago
+3

haha

On rgrg4Let's spread some positivity, 5 years ago
0

OMG! I literally did the same mistake once (82163671) and it took me a lot of time to realise how stupid I was.

Hey Nanako, check this. For it to be solved with non distinct elements, the statement should be modified as freq(0) is multiple of 2 and freq(i) should be equal to freq(-i) for each i in the A. Then, it would make sense.

oh yeah got it

I did 2 mistakes. First < and second not reading distinct :'(

$$$0 = -0$$$ is true.

Exactly, there was no need of them to be distinct.

Problem E was quite easy ... probably somewhat problem C level.

On yash_0402PyPy vs Python, 5 years ago
+1

I also faced the same issues with string concatenation in pypy. You can use an array and append characters to it which is O(1) and then use join method at the end. 104778493

Lol! reverse the original array.

On OkrutGood Bye 2020, 5 years ago
0

If you submit first, nothing will happen to your ratings. Since your submissions are skipped, that means someone submitted similar solution before you. So using ideone in public mode is a blatant lie.

Also, writing everything in CAPS and tagging so many people who are irrelevant here is idiotic.

On OkrutGood Bye 2020, 5 years ago
0

Why are you tagging so many people? They aren't even related.

Please predict for us.

akshitm16

Kal-El

Probably weak testcases

Yes, I did that mistake and realized it after the contest.

My implementation is bit different. I created graph of pairs — $$$(x,y).$$$ You can look at my code. Not sure, if it's helpful.

I'll try to explain a bit.

Start dfs from any pair $$$(a,b)$$$ if it is not visited and explore its connected component. A pair $$$(c,d)$$$ is connected to pair $$$(a,b)$$$ iff $$$d=a$$$ or $$$c=b$$$. I'm first assuming there is $$$cycle$$$ in the connected component. Start from $$$(a,b)$$$. If it has $$$0$$$ connected nodes, we are sure there will no cycle as we can put $$$(a,b)$$$ at any of the $$$2$$$ suitable points. If it has only $$$1$$$ connected node, we can be sure that there is no cycle (we can move that rook at only suitable point) but we will still put the only connected node into the stack (if its un-visited) to explore further total number of nodes in the connected component. If it has $$$2$$$ neighbor nodes, put them into stack (if they are un-visited).

Finally, after each dfs, $$$ans+=x + c$$$ where $$$x$$$ is nodes in the connected component and $$$c=1$$$ if there is a cycle in the component else $$$0$$$

I'm not sure if cycle is correct term for it but I mean is if in any connected component, if we find any node $$$(x,y)$$$ for which either of it's $$$2$$$ suitable positions is free, we can displace that rook to its any suitable position thus breaking the locks. If we can't find any such position, we have pay 1 extra than the total nodes in the component.

Thanks! My code is giving WA on this. I understood my mistake.

I'm also getting 7 but getting wa on pretest 5.

My code gives correct ans for this- 2 but still fails pretest 5.

I also do the same and break all my pens. So, I've stopped using pens and started using paint during the contests. But whenever I've to compulsory use a pen (to write an assignment etc), I can't stop chewing it; thus, ruining all my pens. :'(

It isn't necessary that $$$i^{th}$$$ index of both the arrays after sorting belong to same segment. The proof above still remains valid.

We can say if a segment $$$(a,b)$$$ coincides with segment $$$(c,d)$$$, then $$$c \lt =b$$$ (vice versa may not be true). So, for a particular segment $$$(a,b)$$$ we can find all those segments whose $$$start \lt =b.$$$

In the above picture if I calculate such segments for red segment, I'll get $$$5$$$ such segments (including the red segment itself).Now, we have to remove such segments in which $$$end \lt a$$$ because such segments (segment $$$1$$$ in this example) will surely be included in the above ans but in actual they don't intersect with red segment. Thus, we get $$$5-1=4$$$ segments intersecting with red segment (including itself).

On McayitelIs this a loop hole?, 5 years ago
-9

No experience. It's just that I'm sensible enough not to make stupid blogs without any proofs.

On McayitelIs this a loop hole?, 5 years ago
0

Then maybe you're wrong. Maybe ratings didn't update for them at the time when you saw it. Anyways, do you think mike wouldn't have thought of it if it was the case?

On McayitelIs this a loop hole?, 5 years ago
0

See this guy. He lost ratings (-131). Can you show some example for what you're saying?

On McayitelIs this a loop hole?, 5 years ago
+1

Oh yeah, I didn't read the blog correctly. Now I understand. So, in this case person X would lose all the submissions and his rank would be dropped to last but the round would still be rated for him. Hence, bigger loss.

On McayitelIs this a loop hole?, 5 years ago
+3

Nope, Person X is still rated. Check this.

Consider case-

Case

AC Submission

This picture is not to scale but can help. Assume there are cells bellow as well.

Image

chirantan_2001 has an old account. He has already completed 6 contests. Why can't you just read this and do some calculations for Ra7 ?

On MonogonCodeforces Global Round 12, 5 years ago
0

No, similar things happened in the past

The second account is new account. So,1330 wasn't his actual rating though it is shown 1330 and neither 1432 isn't his actual rating now. You can the see this to understand better.

Okay seems fine but I was looking for something which can show me all types of failed sys-tests (WA/TLE/RE etc) on one page. Thanks anyways.

I didn't see any filter for that. Are you sure?

How to find this who all failed systests without exploring the whole ranklist obviously?

Same! I also felt it was bit of implementation heavy.

+6

No, I got my march challenge laddus 2.5 months after the contest ended but I haven't received for this one yet.

Did anyone receive laddus for this contest?

Edit : They are credited. :)

Okay Got it!

How is it possible that his solutions were skipped and not yours? Weird! I mean ideally submissions of both the contestants should be skipped. MikeMirzayanov

Wish I was dumb like you!

I get C is easy but what did you find tough in A that you placed it after C? In A you don't even have to think anything.

C easier than A. Seriously?

Thanks! I'll take care of this in future.

I used fast i/o during my second submission and still got tle on pretest 4.

+1

Anyone who faced issues (TLE) in C with python?

Exact same thing but in Python . I still don't get the meaning of the easier sub-task?

+3

Yes! You can but in that case minimum abs value would be 0 only!

Is the period of 6 months compulsory? I am asking because I already have a two months intern most probably starting in May 2021.

I was also thinking the same!

I failed sys tests in DIV2 C because of precision issues in python!! urghh! So stupid of me writing

int(x/i)

instead of

x//i

It did using two pointers. I'm not good in explaining or proving things. It was mainly intuition. You can see my solution . Edit: Why downvotes?