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

×

Please explain why my code is failing for last test case.

Hey,all
Can someone help me in finding the error in logic as my last case is not passing. Any help would be appreciated.
My logic
I have taken two set one set will contain all the ingredients found on islands is it size comes out not equal to k then we will print sad.
If it's size becomes equal to k then we will check the size of other set is n if it is n it means we have taken ingredients from every islands so the size becomes n which is equal to no of islands so we will print all.
else we will print sad.

PROBLEM
My Solution

asked 17 Jun '18, 12:44

gaurang44's gravatar image

2★gaurang44
0
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×832
×160
×9

question asked: 17 Jun '18, 12:44

question was seen: 55 times

last updated: 17 Jun '18, 12:44