Search found 251 matches

by serur
Sun Nov 25, 2007 8:49 pm
Forum: ACM ICPC Archive Board
Topic: 2342 - Puzzle out
Replies: 0
Views: 2403

2342 - Puzzle out

I was trying to solve 2342 from LA with the same approach as that of 843 - 'Crypt Kicker', but got TLE. Moha was suggesting trie-based solution, but I can't see how tries can help save by preventing repeated words. My algo: Wit every word I associate 2 ints: its length and the number of different le...
by serur
Sun Nov 25, 2007 8:26 pm
Forum: Volume 6 (600-699)
Topic: 671 - Spell checker
Replies: 27
Views: 10735

You can dispense with edit distance altogether - just try to modify each word and see what comes of it. I'm the first in the ranklist.
by serur
Thu Nov 08, 2007 12:21 pm
Forum: Volume 108 (10800-10899)
Topic: 10828 - Back to Kernighan-Ritchie
Replies: 20
Views: 15005

How to deal with multiple edges?
by serur
Wed Nov 07, 2007 8:43 pm
Forum: Volume 108 (10800-10899)
Topic: 10828 - Back to Kernighan-Ritchie
Replies: 20
Views: 15005

I use Gaussian Elimination with global pivoting strategy: #include <assert.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define N 128 #define xchg(x,y) (((x)==(y))||((x)^=(y),(y)^=(x),(x)^=(y))) #define tol (1e-10) double max( double x, double y ) { return x < y ? ...
by serur
Tue Nov 06, 2007 11:44 pm
Forum: Volume 7 (700-799)
Topic: 707 - Robbery
Replies: 12
Views: 6895

The map corresponding to the first testcase:

At time 1:

Code: Select all

####
####
####
###o
oooo
At time 4:

Code: Select all

###o
####
####
####
oooo
Why he can't stay at X:

Code: Select all

###o
####
####
####
Xooo
all the time?
by serur
Tue Nov 06, 2007 10:11 am
Forum: Volume 104 (10400-10499)
Topic: 10405 - Longest Common Subsequence
Replies: 103
Views: 30803

Please, use the existing thread.
As for the problem, you should read strings with fgets() (there can be blanks)
by serur
Sun Oct 28, 2007 10:11 pm
Forum: Volume 8 (800-899)
Topic: 841 - Snake
Replies: 3
Views: 3731

Any hints on how to store the snake?
by serur
Fri Oct 19, 2007 9:45 pm
Forum: Volume 107 (10700-10799)
Topic: 10793 - The Orc Attack
Replies: 35
Views: 20026

This is misleading:
You should remember that a unit does not need to cover any distance if it remains static.
by serur
Sat Oct 13, 2007 9:55 pm
Forum: Volume 104 (10400-10499)
Topic: 10436 - Cheapest way
Replies: 18
Views: 6704

Correct output for this:

Code: Select all

1

1
limpopo 1
0
1
limpopo limpopo 1
?
EDIT: Pretty sure the solution is ok, but still WA.
by serur
Fri Oct 12, 2007 11:11 pm
Forum: Volume 103 (10300-10399)
Topic: 10354 - Avoiding Your Boss
Replies: 47
Views: 22045

int main() { int i,j,k,r; #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); #endif while ( scanf("%d %d %d %d %d %d\n",&n,&r,&boss,&office,&me,&market) == 6 ) { --boss, --office, --me, --market; memset(g,0xff,sizeof(g)); for ( i = 0 ; i < n; i++ ) g[i][i] = 0; while ( r-- ) { scanf("%d %d %d\n",...
by serur
Mon Oct 08, 2007 1:50 pm
Forum: Volume 102 (10200-10299)
Topic: 10243 - Fire! Fire!! Fire!!!
Replies: 12
Views: 6579

Fire exits will be installed in such a way that if any gallery does not have a fire exit then at least one of its adjacent galleries must have one and for each corridor at least one of the two galleries it connects must have a fire exit.. This part is redundant, is it not? What's the difference bet...
by serur
Sun Oct 07, 2007 7:19 pm
Forum: Bugs and suggestions
Topic: Infinite redirect
Replies: 15
Views: 5673

playerX,
please elaborate a bit on it? What is 'authenticated session'? Where the button is located?

Thank you.

EDIT: that works fine, thanks a lot
PS:http://browsers.about.com/od/firef2/ss/ ... vate_4.htm
by serur
Sun Oct 07, 2007 8:51 am
Forum: Bugs and suggestions
Topic: Infinite redirect
Replies: 15
Views: 5673

Now, from ie I got as far as logging in, but one have to wait a gooood deal to browse problems.
by serur
Sun Oct 07, 2007 6:22 am
Forum: Bugs and suggestions
Topic: Infinite redirect
Replies: 15
Views: 5673

Yes, the problem seems to be Firefox-specific. From IE I got to the page. Hm...
by serur
Thu Oct 04, 2007 11:36 am
Forum: Bugs and suggestions
Topic: Infinite redirect
Replies: 15
Views: 5673

Only yesterday it was OK for me, and you say you can't see online_judge since 24th of Sept. What am I to do with this, Igor?

Go to advanced search