Livu_sz's blog

By Livu_sz, history, 14 months ago, In English

Hello everyone, hope you are all doing great.

I recently received message from system that my solution 195163597 is coinciding with many others.

I gave this problem more than whole time for other problems. Initially I thought of making all element 2 ( as it was guraanted that there will be no more than 30n operation which gave me hint of making 2. )

Which got MLE, after using array instead got TLE and then lot's of WAs.

After lots of -ive verdicts, I removed whole code and started again. Finally came with logic of making all elements same, which can be acquired by dividing by minimum element to all other elements. I removed the template as I was having fear of getting TLE because of my template which I have got earlier in some problems few months back.

This finally worked. This was my whole process of spending more than 40 mins of B and getting AC.

I saw the message from system checked others code, logic was same as mine. Can you all tell me what can be the way of check all elements same.

You will create another function write for checking that all other elements are same or not, which I did. Similarly there is common way of finding minimum element, common way of pushing back in vector.

Having a common way does not mean that people are copying each other. It means that problem have one common solution which everyone is getting.

The fault is actually which I think is in plag checker of codeforces. CF is great platform to increasing and showcase your CP skills. But I think improvement is required in plag checker.

Having common logic, which is having common way of implementation does not mean that people are copying from each other.

MikeMirzayanov and Codeforces Headquarters, please look into this.

Full text and comments »

  • Vote: I like it
  • -12
  • Vote: I do not like it

By Livu_sz, history, 21 month(s) ago, In English

Sorry for making blog here. Actually I asked it as comment in announcement's page( Link ) on codeforces, but unfortunately no one replied.

So I decided to ask the same question as blog.

Can any one please the explain this line of editorial :

Here, if the elements in P are scanned from left to right, there must always be more left elements than right elements. The number of such arrangements corresponds to that of parenthesis sequences.

What I understood is that, lets say we have (1,2),(3,4),(5,6),(7,8) as corresponding (ai and bi).
Permutation : (1,2,4,3,5,6,7,8) have more right elements(2) than left elements(1) in first 3 elements (1,2,4) but still it can be divided it into two sequences A(1,3,5,7) and B(2,4,6,8), but in editorial it is told that it should not be possible ( as per I understood ) .
I know I have understood it wrong.
Anyone who did this problem or got the editorial please explain the line in blue

Editorial link : Link

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Livu_sz, history, 22 months ago, In English

Hello codeforces, hope you all doing well.

Today I was upsolving Vowel Anxiety of Codechef Starters 46.

I got wrong answer on all test case files except one. I tried to find the test case using Debug feature of Codechef but it didnt showed any test cases. It told that : "Unable to find test case, please try again in some time"

Is it bug from codechef or just in my laptop?

I have attached the ss below for proof :
bug

My Solution link : link.

Problem Link : link.

Codechef Admin and others please look into it.

Thanks and stay healthy.

Full text and comments »

  • Vote: I like it
  • -6
  • Vote: I do not like it

By Livu_sz, history, 22 months ago, In English

Hello codeforces.

Hope you all doing well and are healthy.

Today I was upsolving the Subsequence LCM

I got wrong answer, now when I used Debug feature of the codechef, I saw that my output and expected are same but it is still showing that my answer is wrong.

Please look into the screenshot below

issue

Is it my bug in my computer or bug in codechef?

My solution link : Link

Codechef Admin please look into it.

Thanks and Have a nice day.

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it