Search found 429 matches

by Per
Sun Oct 23, 2005 8:53 am
Forum: Volume 109 (10900-10999)
Topic: 10947 - Bear with me, again..
Replies: 23
Views: 2906

This problem definitly needs re-rejudging (and I want my perfect score 6 AC for 6 submissions for the contest back...). It seems the problem is rejudged now, there are a lot more people with 6 solved, you being one of them. Still lots of TLEs though, so I guess they still have a lot more I/O than d...
by Per
Thu Oct 20, 2005 12:06 pm
Forum: Other words
Topic: Strange time limit
Replies: 1
Views: 962

http://online-judge.uva.es/board/viewtopic.php?t=6692

In short, 10 seconds is just the default time limit, unless another limit is specified.
by Per
Sun Oct 16, 2005 8:34 pm
Forum: Volume 109 (10900-10999)
Topic: 10939 - Ants, Aphids and a Ladybug
Replies: 13
Views: 5626

Doh. Sorry.
by Per
Sun Oct 16, 2005 8:08 pm
Forum: Volume 109 (10900-10999)
Topic: 10941 - Words adjustment
Replies: 19
Views: 6047

Perhaps you declare variables in the middle of a code block?
E.g. "for (int i = ..."?
by Per
Sun Oct 16, 2005 8:05 pm
Forum: Volume 109 (10900-10999)
Topic: 10939 - Ants, Aphids and a Ladybug
Replies: 13
Views: 5626

I did an O(n*l) solution (DFS, and I stop searching as soon as I reach the target). It takes roughly 1.1 secs.

[edit: no I didn't. But for 10938 I did.]
by Per
Wed Oct 12, 2005 10:04 am
Forum: Algorithms
Topic: What is the fastest way to do a bit-reversal?
Replies: 4
Views: 1073

Some more ways to do it can be found http://graphics.stanford.edu/~seander/bithacks.html , always a nice reference for bit fiddling stuff.
by Per
Sun Oct 09, 2005 11:20 pm
Forum: Volume 109 (10900-10999)
Topic: 10932 - Calculator
Replies: 19
Views: 11056

tywok wrote:

Code: Select all

 istringstream iss(t);
 int x;
 iss>>x;
 return x;
What happens if you declare x as a double instead? That should work better for cases like "3000000000".
by Per
Sun Oct 09, 2005 9:11 am
Forum: Volume 109 (10900-10999)
Topic: 10930 - A-Sequence
Replies: 102
Views: 31461

Jan wrote:Just follow the algorithm ->

Code: Select all

1. Take the input and print them.
2. Sort the values.
3. Check duplicates.
4. Check the sum.
If the values are not sorted already, the input is not an A-sequence.

Your algorithm will say that "2 1" is an A-sequence, which it is not.
by Per
Sat Oct 08, 2005 2:54 pm
Forum: Other words
Topic: UFRN-2005 Contest #2 - problem?
Replies: 2
Views: 1194

by Per
Sat Oct 08, 2005 2:45 pm
Forum: Other words
Topic: UFRN-2005 Contest #2 - problem?
Replies: 2
Views: 1194

Submission still seems to work, even though the stats are down.
(i.e., I still get submission results mailed back to me.)
by Per
Mon Jun 13, 2005 7:29 am
Forum: Other words
Topic: How to solve the problem
Replies: 6
Views: 1526

Whoops, sorry. That does seem to make the problem harder.
by Per
Sun Jun 12, 2005 4:05 pm
Forum: Other words
Topic: How to solve the problem
Replies: 6
Views: 1526

Looks like Huffman coding.
by Per
Wed May 25, 2005 10:00 am
Forum: Other words
Topic: To the top finishers in the III Local Contest in Murcia
Replies: 10
Views: 4066

In this contest I wrote all code from scratch. Hmm, I realised this is not 100% true. I do use a short template for all my solutions (containing some common #includes, a main method, some debugging macros, etc). When I trained for the ICPC I would type it in at the beginning of each contest, but we...
by Per
Mon May 23, 2005 11:09 pm
Forum: Other words
Topic: To the top finishers in the III Local Contest in Murcia
Replies: 10
Views: 4066

In this contest I wrote all code from scratch. Sometimes I use prewritten code for e.g. bigints. My strategy in the very beginning of the contest is usually to read the short problems while keeping an eye out for problems where the names and/or images and/or sample IO seem to indicate that the probl...
by Per
Sun May 22, 2005 1:51 pm
Forum: Volume 108 (10800-10899)
Topic: 10853 - Pablito nailed a nail
Replies: 10
Views: 3334

I can try. (Warning, this is a big spoiler for how to solve the problem) We know that the range [1, Amax] is winning for A when A begins. Thus, the set [1+Bmax, Amax+Bmin] is winning for A when B begins, and the set [1+Bmax+Amin, 2Amax + Bmin] is winning for A when A begins, and so on. Repeating, we...

Go to advanced search