You are not logged in. Please login at to post your questions!


[closed] help in codeforces problem 580/C (Kefa and park).

I am unable to get what is wrong with my logic. The question link is here:

My solution is this:

asked 18 Jun '18, 08:19

hj_97's gravatar image

accept rate: 0%

closed 18 Jun '18, 11:54

vijju123's gravatar image

5★vijju123 ♦♦

The question has been closed for the following reason "The question is answered, right answer was accepted" by vijju123 18 Jun '18, 11:54

Did you even read the question or tried understanding it? It's given cat count must not be greater than m in a path towards leaf. And also you should once look at editorials before asking for help . Just having a look at your code anyone would realise you didnt even care to understand the problem. Anyways your code fails in this testcase:
6 2
0 1 1 1 0 0
1 2
2 3
3 4
4 5
5 6

From next time please do ask for help only when needed.


answered 18 Jun '18, 09:49

soham1234's gravatar image

accept rate: 22%

with due respect soham1234, I want to tell you that i had read the question. also i had read the editorial my 11 test cases were running and on the 12 test case it failed. also it was a large test case so it was not fully visible so i can test my code on it.I will be careful next time when to ask for help.Thanks a lot soham1234.

(18 Jun '18, 10:17) hj_972★

Did you really read the editorial I highly doubt that. In your code you checked for consecutive m cats at leaf nodes and I don't think the editorial has anything even remotely related to that. Please try making better excuses. I merely had a look at your dfs to figure out what was wrong

(18 Jun '18, 10:20) soham12346★

I am not making excuses and also i am not a very good programmer like a 6 star like you. And also what would i get by making excuses and asking for help.I was stuck at this for two days and that's why i decided to ask for help.

(18 Jun '18, 10:23) hj_972★

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 18 Jun '18, 08:19

question was seen: 188 times

last updated: 18 Jun '18, 11:54