"I want to ask a question" - Ask them all here!

why i m getting this error…
Exception in thread “main” java.util.NoSuchElementException
at java.util.Scanner.throwFor(Scanner.java:862)
at java.util.Scanner.next(Scanner.java:1485)
at java.util.Scanner.nextInt(Scanner.java:2117)
at java.util.Scanner.nextInt(Scanner.java:2076)
at CodeChef.main(Main.java:10)
… in my code CodeChef: Practical coding for everyone

Guyz I am pretty much new to coding…I mostly am only able to apply brute force on questions! Can anyone suggest me a good book for Data Structures and Algorithms pls?
P.S: I need a book not a soft copy or websites.
Thanks for the help :slight_smile:

When will the editorials of JUNE17 arrive.
Why does codechef no longer upload the editorials of contests on time ? Its been 3 days the long challenge has ended and no editorial has arrived yet!!
December long challenge had no editorials and I still struggle with this and this problems from that contest. Then February challenge again had no editorials and the last 2 questions were really nice and are still left for me to upsolve. Then May had no editorials of last 4 questions and now June has no editorials yet. Why not create editorials before the contest ? When will the editorials of these contests arrive ?

can anyone please tell me as to how could I do IPC train of July’17 Long using lazy propagation.? Is this even possible?

Can you please explain the logic of calculator for passing the 2nd test case as it is bothering me?

I need karma to upvote guys, please help me out here.

1 Like

where to get a good understanding on DP concept i.e by seeing the question I need to figure out the states and stuff like that?

QUESTION REGARDING : FIND THE MAXIMUM VALUE ( LOST MAX )
alt text

alt text

FIRST IS TESTER SOLUTION SECOND IS MY SOLUTION LINK JUST SEE LAST LOOP TO FIND MAX ELEMENT AND IGNORE USE OF stl sort in my solution when I submitted it says WA and when I use test logic of bool variable it accepts the solution ?? I want to know why my solution failed ?? and how do I gain reputation so I can ask question on my own ?? how to get karma ??? thx
Best Regards
Syed Ashar Ali

1 Like

Hey, kunnu120, was your question answered? I noticed you deleted it when i was converting it into a independent question.

1 Like

Hey i am new here… have done coding before but new in these online coding field.Can you tell me how to approach the constraints placed in various questions?How should approach handling such an constraint related error? I mean the program I have written for a particular problem runs well in my machine but when submitted here says its incorrect. I have entered all the sample inputs as given and its running well for me at home.

On this recent cookoff, the contest length was 2.5 hours but people have submission times (on just one problem, not a sum) of 4-6 hours. Secondly, some problem had a time limit of 3 seconds but some submissions were 5 seconds. Are those types of stats displayed accurately? Or do those limits not really apply?

can anyone tell me from where i should study to solve questions related to trees and graphs ???

How to guess whether code will run in given time or not or will run for specific input (such as large size array)?

In the question Lazy Jem, I cant get outputs like 131351258112.I’m programming in C.Can anybody please teach me how to store large numbers in an array? Please help me.

https://www.codechef.com/viewsolution/15482446.This is my attempt at Discrepancies in the Voters List.I’m getting a TLE.Please help me!!.This is urgent.(for me)

I’m a beginner at java. I wanted to know how the nextLine() Method discards your current input? For example assume the following code:

{
Scanner input = new Scanner(System.in);

int a = input.nextInt();

input.next();
}

After the input.next() is executed, the value in “input” is discarded. I wanted to know how does it work?

pls help guys

can anyone please tell me whats wrong with my code?

problem: FLOW007 Problem - CodeChef

my code: CodeChef: Practical coding for everyone

thx in advance.

HI all,how to report for this question?
The picture in the question is not showing.

Question

can anyone please tell me whats wrong with my code?

problem : PRB01 Problem - CodeChef

code: CodeChef: Practical coding for everyone

can anyone tell me what wrong in my codes?

  1. problem : HEADBOB Problem - CodeChef
    CODE: CodeChef: Practical coding for everyone

  2. (got 40 points) problem: SMPAIR Problem - CodeChef
    CODE: CodeChef: Practical coding for everyone