×

 0 It seems like something is wrong at the corner case: 4 1000000000 1 1000000000 999999999 999999998 1000000000 2 1000000000 999999999 999999998 1000000000 3 1000000000 999999999 999999998 1000000000 4 1000000000 999999999 999999998  should give the answer 1000000003 2000000001 1 666666667 1000000001 2000000001 1 666666667  But your code gives the following output: 800000007 1600000010 1 666666661 999999918 1999999835 1 666666661  I don't know python but I guess there is some issue about 32-bit integers. Values of N may be small in the first subtask, so your code passes it, but gets wrong in the second one. The number of test cases, T, is most likely not a problem here. answered 15 Jan, 20:02 4★petch 18●1 accept rate: 14%
 -1 I guess the verdict is shown incorrectly as WA when it should be TLE as you have clearly exceeded the time limit of 1 sec for the question. Your program takes more than 2.6 sec which is clearly exceeds the time limit. @vijju123 @admin ,please look into this. answered 15 Jan, 09:20 137●7 accept rate: 10%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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:

×1,721
×427
×112
×73