Search found 8 matches

by kane116
Sat Jun 23, 2007 5:49 am
Forum: Bugs and suggestions
Topic: Problem with the test case for 10122
Replies: 0
Views: 1966

Problem with the test case for 10122

The problem specification state that the value of y must within the range [1, 1000], however, I discover that the test cases in the judge may have y = 0.

Thank you
by kane116
Wed Jan 18, 2006 12:11 pm
Forum: Volume 105 (10500-10599)
Topic: 10594 - Data Flow
Replies: 40
Views: 25820

10594 WA

Would someone give me some test case? I think my algo is correct, I solve it as Min Cost Max Flow problem. Here is the idea: - The time is the cost of flowing on that edge. - Capicity of the edge is set to K. - While there exist an shortest augmenting path (Use Dijkstra to find the shorest augmentin...
by kane116
Wed Jan 11, 2006 6:02 pm
Forum: Volume 100 (10000-10099)
Topic: 10011 - Where Can You Hide?
Replies: 58
Views: 12660

I find the points of the tangent on the circle, the two equation for finding the points is: (x - t.x) ^ 2 + (y - t.y) ^ 2 = r ^ 2 p.x ^ 2 + p.y ^ 2 = t.x ^2 + t.y ^ 2 - r ^ 2 t.x & t.y is centre of the tree, p.x & p.y is the point of the tangent on the circle. However, I still got WA, I don't know w...
by kane116
Thu Dec 22, 2005 6:03 pm
Forum: Volume 106 (10600-10699)
Topic: 10635 - Prince and Princess
Replies: 29
Views: 15427

I am getting RE, Would someone told me what's wrong with my code? Actually, I am using LCS only. #include <cstdio> #include <string> #include <algorithm> using namespace std; int a[255], b[255]; int c[255][255]; int main() { int T, idx = 0; scanf("%d", &T); while (T--) { int n, p, q; scanf("%d%d%d",...
by kane116
Sun Nov 13, 2005 8:41 am
Forum: Algorithms
Topic: How to find a shortest cycle in a directed graph?
Replies: 1
Views: 1314

How to find a shortest cycle in a directed graph?

As title. I just solve 10806, which is a problem of finding a shortest cycle in a bi-directional graph. I would like to ask if Dijkstra + Bellman-Ford can also find the shortest cycle in directed graph.

Thank you!
by kane116
Sun Sep 04, 2005 2:25 am
Forum: Volume 3 (300-399)
Topic: 348 - Optimal Array Multiplication Sequence
Replies: 22
Views: 3939

Please help me...I cannot find and error in my code. :cry:
by kane116
Fri Sep 02, 2005 3:39 am
Forum: Volume 3 (300-399)
Topic: 348 - Optimal Array Multiplication Sequence
Replies: 22
Views: 3939

RTE - 348 Optimal Array Multiplication Sequence

Please help me check the program, I don't know why OJ give RTE to me... I try it on both Linux and Windows, but no error occur... Please help me... :cry: Here is my code #include <stdio.h> #include <string.h> int n; int idx; int row[10], col[10]; int map[100][100]; int que[100][100]; int init() { me...
by kane116
Sun Aug 07, 2005 5:37 am
Forum: Volume 4 (400-499)
Topic: 410 - Station Balance
Replies: 41
Views: 15258

410 - Station Balance

What's wrong with it? Help me please, thank you! :D #include <iostream> #include <math.h> #include <string.h> #include <stdlib.h> #include <stdio.h> using namespace std; int dat[10]; int sto[5][2]; int s, c, cot; double AM, IM; double CM[5]; int init() { for (int i = 0; i < 10; i++) { dat[i] = 0; } ...

Go to advanced search