Блог пользователя satyam343

Автор satyam343, 3 года назад, По-английски

We invite you to participate in CodeChef’s Starters 90, this Wednesday, 17th May, rated till 6-stars Coders (ie. for users with rating < 2500).

Time: 8:00 PM — 10:00 PM IST

Note that the duration is 2 hours. Read about the recent CodeChef changes here.

Joining us on the problem setting panel are:

Written editorials will be available for all on discuss.codechef.com. Pro users can find the editorials directly on the problem pages after the contest.

The video editorials of the problems will be available for all users for 1 day as soon as the contest ends, after which they will be available only to Pro users.

Also, if you have some original and engaging problem ideas, and you’re interested in them being used in CodeChef's contests, you can share them here.

Hope to see you participating. Good Luck!

  • Проголосовать: нравится
  • +61
  • Проголосовать: не нравится

»
3 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Reminder: Contest starts in 1.5 hours!

»
3 года назад, скрыть # |
 
Проголосовать: нравится -20 Проголосовать: не нравится

In Crushed Apples and a Balance Scale why is answer for "4 9" NO ?

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +27 Проголосовать: не нравится

no hate to the authors, but problem CHEFPARTY is exactly the same as Jzzhu and Apples

»
3 года назад, скрыть # |
Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

Can anyone please tell me how to solve this problem?

Minimum Ugliness

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +16 Проголосовать: не нравится

In the short contest, you should give every problem a weight like CF. If it is a long contest then its ok. Also, you can take a servery and choose, that most people want. Weighted problem can save your rating, when you can not solve a easy problem.

»
3 года назад, скрыть # |
Rev. 4  
Проголосовать: нравится 0 Проголосовать: не нравится

Can someone tell me why my code for Sum of Goodness gives RTE on one test case or provide me with a test case where it fails? It would be a great help.

Code

Thanks!

EDIT- It worked when I removed my template and submitted the Code. Can someone tell me why it was failing? Is it the fault of the compiler?

EDIT 2- I found the piece of code which gave an error, but I don't know why. Can someone please explain me?

Reason- I took the input like this ( cin>>v (vector), and when I changed this to for(auto &i:v) cin>>i), it passed. Why? What was the error in that?

Edit 3- It was probably the coordinators' fault they created a case with n=0(constraints was n>=1), which led to runtime error.

Just wow!