idonthatephy's blog

By idonthatephy, history, 22 months ago, In English

163673872--here is the submission Problem-1702E - Split Into Two Sets General Approach- using DSU first check degree of each node

if greater than 2
ans=no
if (a==b)
ans=no

else
if size of parent of each node is even
then
ans=yes
else 
ans=no
  • Vote: I like it
  • +3
  • Vote: I do not like it

| Write comment?
»
22 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Try using cfstress in 6-7 days to find the answer.

»
22 months ago, # |
Rev. 5   Vote: I like it 0 Vote: I do not like it
3 4
1 5
4 6
2 5
1 3
6 2

I didn't analyze your code but I printed test case 4585.

Have a look at this..my submission

  • »
    »
    22 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    his code gives out no on this test case, which is the right answer

  • »
    »
    22 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    how can one print the testcase like this?

    • »
      »
      »
      22 months ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      Its simple..

      For each test-case do not print answer one by one.. instead print all answers at the end of all test-cases. So you can print anything you want from a particular test case...

      For example you cannot see whats happening in test case 4000 because you are printing answer after every test case

»
22 months ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

[Deleted]