Search found 4 matches

by lbfacci
Fri Sep 22, 2006 8:52 pm
Forum: Volume 110 (11000-11099)
Topic: 11098 - Battle II
Replies: 11
Views: 7291



Quote:
I had a hard time understanding this sentence, but eventually I think it means: 'A bomb in the sequence should not set off another bomb that appears later in the sequence'. Correct, but unnecessary: how could you manually set off a bomb that has already exploded?

I agree with the fact ...
by lbfacci
Tue Sep 05, 2006 8:28 pm
Forum: Volume 110 (11000-11099)
Topic: 11078 - Open Credit System
Replies: 12
Views: 8850

Note that the first integer in the input is the number of cases. The input description does not explicitely state this. Treating it as the 'n' of the first case (and reading input until EOF) gives the right answer for all example cases, but will get WA on the judge.
I took 2 WAs in the contest ...
by lbfacci
Sun Aug 06, 2006 4:48 am
Forum: Volume 110 (11000-11099)
Topic: 11057 - Exact Sum
Replies: 50
Views: 30492

Hint:

M = 2000000
N = 2
Books: 1000000 1 1000000
by lbfacci
Tue Nov 08, 2005 4:00 am
Forum: C++
Topic: read til the end of line
Replies: 7
Views: 4058

I do something like

Code: Select all

int a, b;
char c;

scanf("%d%c", &a, &c);
while(c != '\n' && b == 2)
	b = scanf("%d%c", &a, &c);
But you have to be sure that there is no trailing spaces (usually there arent).

Go to advanced search