Invitation to Encoding August '18

Hello everyone!
We are excited to invite you all to Encoding August '18. The contest is hosted by Netaji Subhash Engineering College, Kolkata. The contest will have challenges for all - beginner to advanced programmers. We hope all of you will love to join us and spend the Sunday evening solving exciting coding challenges.

The authors of the contest are:

  1. Arkapravo Ghosh
  2. Amit Kumar Pandey
  3. Rahul Ojha
  4. Md Shahid

Contest Details

Date : 5th August
Time : 19:30 hrs - 22:30 hrs(IST)Check your timezone here
Contest Link :
Registration : You just need to have a CodeChef handle to participate. For all those, who are interested and do not have a CodeChef handle, are requested to register in order to participate.

Good Luck!
See you on the ranklist! Happy Coding!


check the contest time in your Time Zone by clicking here

1 Like

Hey! I want an explaination for this scenario :
Solution 1

Solution 2

In soltion 1 , i’m taking no. of test cases as input through cin and then ignoring the remaining line by using cin.ignore(). This results in WA.
While in Solution 2 , i’m taking the no.of test cases as input using getline and then converting it into int. This gives AC. Why is that so?? thanks in advance!

1 Like

This is the problem link.

Can you provide the link to your solution, both the wrong and correct.

1 Like

What is special about this answer so it is marked as accepted ??

Hi, he helped me with the time zone. I forgot that. :slight_smile:

1 Like

Hi, in solution 1, the problem is not caused by cin.ignore() after taking the input t. It is caused by cin.ignore() which you wrote after getline(cin, x).
So, everytime you ignore the next character after a line, i.e. the first character of every line of input.
Hope this helps. :smiley: