Search found 146 matches

by hank
Wed Oct 19, 2005 11:57 am
Forum: Volume 105 (10500-10599)
Topic: 10594 - Data Flow
Replies: 40
Views: 25787

My term "Successive Shortest Path" is the name of an algorithm that is for solving mincost flow, it will adjusted the edge cost after removing a shortest path, it is not simply the greedy method...... And my code can solve that case. Hi Did you use Bellman-Ford algorithm in this problem ? However,I...
by hank
Mon Jul 04, 2005 8:54 am
Forum: Algorithms
Topic: Help with B-tree algorithm!
Replies: 1
Views: 865

Help with B-tree algorithm!

B-tree is often used in database index storage.

I see my textbook, it said each key in the tree must be unique.

But how can I store two identical data in the B-tree?

Is it possible?

Thanks in advance! :P
by hank
Sun Apr 03, 2005 10:39 am
Forum: Volume 105 (10500-10599)
Topic: 10535 - Shooter
Replies: 25
Views: 48836

Hello Ryan Pai,
Finally,I got Accepted !!
Because my program initially consider the two same walls as only one.

now my new program pass the following input:

Code: Select all

2
0 10 10 10
0 10 10 10
0 0 
The correct output is

Code: Select all

1
Thanks a lot!!
I am happy now! :D
by hank
Sun Apr 03, 2005 7:46 am
Forum: Volume 105 (10500-10599)
Topic: 10535 - Shooter
Replies: 25
Views: 48836

Hello Ryan Pai,

I still cannot find any wrong in my code...
My program passed all the testdata I tested.
But wrong answer again and again~
:cry:

Is it possible that the two walls can be overlay ot intersected ?
:cry:
by hank
Sun Apr 03, 2005 7:29 am
Forum: Volume 105 (10500-10599)
Topic: 10535 - Shooter
Replies: 25
Views: 48836

My program's output is 2 .
Is it correct ?
by hank
Sun Apr 03, 2005 5:32 am
Forum: Volume 105 (10500-10599)
Topic: 10535 - Shooter
Replies: 25
Views: 48836

My program passed all the sample input in the board.
But still cannot got AC.
I always got WA!
I will be grateful for any help! :cry:
by hank
Wed Mar 23, 2005 6:04 pm
Forum: Volume 101 (10100-10199)
Topic: 10181 - 15-Puzzle Problem
Replies: 36
Views: 19696

Hi,

I got accepted now.

1.705 seconds and memory cost 452

IDA* and F(x)=G(x)+4/3*H(x)

^_^

:D
by hank
Tue Mar 22, 2005 12:45 pm
Forum: Volume 101 (10100-10199)
Topic: 10181 - 15-Puzzle Problem
Replies: 36
Views: 19696

Hi,


My code can't pass the time limit.
I use IDA* algorithm.


Can somebody help me?
or you can give me some tips and hints.

Thanks in advance!
by hank
Tue Aug 17, 2004 12:41 pm
Forum: C
Topic: How to write a simple BASIC interpreter in C ?
Replies: 2
Views: 2509

How to write a simple BASIC interpreter in C ?

I want to use C/C++ to write a BASIC interpreter
but it seems not easy
is there any document about that?
(don't give me the source)
(what I need is just a document that can teach me and give me some tips)
Help me,Thanks ! :P
by hank
Sat Oct 04, 2003 4:25 pm
Forum: Algorithms
Topic: an interesting problem ( help me please ! )
Replies: 1
Views: 1763

an interesting problem ( help me please ! )

Hi, Cryptarithmetic Puzzle A cryptarithm is an arithmetic formula in which the digits are replaced by other symbols. Cryptarithms can be additions, multiplications, or divisions. For example, SEND + MORE = MONEY 9567 + 1085 = 10652 WHO * IS = MOSIS 421 * 75 = 31575 LINK / NET = KT ... KEY 6041 / 453...
by hank
Thu Oct 02, 2003 12:04 pm
Forum: Volume 4 (400-499)
Topic: 409 - Excuses, Excuses!
Replies: 63
Views: 8962

You can use the following code to replace that function. [c] #include "string.h" #include "ctype.h" int strcmpi(char *a,char *b) { int i; if( strlen(a)>strlen(b) ) return 1; else if( strlen(a)<strlen(b) ) return -1; for(i=0;i<strlen(a);i++){ if( toupper(a )>toupper(b ) ) return 1; else if( toupper(a...
by hank
Thu Oct 02, 2003 11:48 am
Forum: Volume 4 (400-499)
Topic: 409 - Excuses, Excuses!
Replies: 63
Views: 8962

Hi,

You can't use the key word "strcmpi".
It is not allowed under ANSI C/C++.

Good luck~ 8)
by hank
Tue Sep 30, 2003 12:05 pm
Forum: Volume 4 (400-499)
Topic: 409 - Excuses, Excuses!
Replies: 63
Views: 8962

There is a function named qsort in <stdlib.h> .
You should remove qsort() in your code.
by hank
Sat Sep 27, 2003 5:09 pm
Forum: Volume 4 (400-499)
Topic: 409 - Excuses, Excuses!
Replies: 63
Views: 8962

Do not use '//' comments.
It will cause a compile error.
by hank
Fri Aug 29, 2003 12:44 pm
Forum: Volume 103 (10300-10399)
Topic: 10380 - Shogi Tournament
Replies: 10
Views: 4849

Thanks for your help. After I realized the problem could be solved by MaxFlow, I fixed my code. But now I have difficulty dealing with finding the augmenting path. I think BFS is not a good idea because it is too slow and takes too much space. Finally, I use DFS to find the augmenting path. But this...

Go to advanced search