Saratov State University :: Online Contester


::Go
- home
- news
- register
- update personal info
- problemset archive
- submit
- status online
- standing
- contests
- virtual contests
- forum
- statistic
- FAQ
- links
- projects

::Poll
Are you registered on Codeforces?
Yes
No
What is it???

[results]

::webboard

Invalid input
Author: Piotr Komisarski
ID: 045085
Problem: 113
Contest: 0
Date: 2011-07-27 23:58:04

Hi.

In my opinion input for problem #113 is invalid.
(btw: It's not clear if numbers are in the same line or not.)
When i'm reading input with:

String st = new StringTokenizer(in.readLine());
int N = Integer.parseInt(st.nextToken());

i have runtime error in test #3.
But if i'm reading input with :

if(!st.hasMoreTokens()) {
st = new StringTokenizer(in.readLine());
}
int N = Integer.parseInt(st.nextToken());

i have runtime error on test #15.
Pls admit, that something is wrong with test#3.
Can you post input for this test ?
It can be with different numbers, but with the same whitespaces and lines structure.

see sub-tree reply to that message


::Login
Forgot password?

::News
22.10.12 - The problems from the Southern Subregional Programming Contest 2012 added to the problemset archive (542 - 553).
22.10.12 - After the start of the contest the statements in PDF will be available by the link.
23.10.11 - The problems from the Southern Subregional Programming Contest 2011 added to the problemset archive (530 - 541).

::Counter

Server time: 2017-09-21 11:02:50Online Contester Team © 2002 - 2016. All rights reserved.