×

# [closed] guessing the game

 0 getting tle in guessing game bcoz of nested loops ,, any alternative?? asked 08 Jun '14, 22:04 16●4●5●11 accept rate: 0% 1★garakchy 1.1k●16●30●48

### The question has been closed for the following reason "Other" by garakchy 09 Jun '14, 19:53

 0 Try different approach, be more mathematical, just a hint: there is no Nested loop required. No more hints, cos its ongoing Contest. more detailed hints will be against rules answered 08 Jun '14, 22:08 3★s1h33p 329●2●3●9 accept rate: 15%
 0 okay thanks answered 08 Jun '14, 22:10 16●4●5●11 accept rate: 0%
 0 How did you decide, you are getting TLE becoz of nested loop ? If your nested loops are if & else only, they won't effect your time much, they are O(1). Hint : Most probably, problem is somewhere else. answered 09 Jun '14, 00:09 23●3 accept rate: 0%
 0 somewhere else means??? answered 09 Jun '14, 11:23 3★srswain2 139●5●6●12 accept rate: 0%
 0 If you are using some loops such as for and while which run for long time with large inputs then it will show TLE because your program didnt stop in the stipulated time. answered 09 Jun '14, 15:32 129●1●2●5 accept rate: 3%
 0 the solution is o(1) for each test case :D . 3-5 line answer(excluding includes and declarations). purely mathematical. answered 09 Jun '14, 15:47 3★s1h33p 329●2●3●9 accept rate: 15%

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,477

question asked: 08 Jun '14, 22:04

question was seen: 746 times

last updated: 09 Jun '14, 19:53