## Search found 8 matches

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

### 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
Wed Jan 18, 2006 12:11 pm
Forum: Volume 105 (10500-10599)
Topic: 10594 - Data Flow
Replies: 40
Views: 25580

### 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...
Wed Jan 11, 2006 6:02 pm
Forum: Volume 100 (10000-10099)
Topic: 10011 - Where Can You Hide?
Replies: 58
Views: 12440
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...
Thu Dec 22, 2005 6:03 pm
Forum: Volume 106 (10600-10699)
Topic: 10635 - Prince and Princess
Replies: 29
Views: 15259
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",...
Sun Nov 13, 2005 8:41 am
Forum: Algorithms
Topic: How to find a shortest cycle in a directed graph?
Replies: 1
Views: 1305

### 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!
Sun Sep 04, 2005 2:25 am
Forum: Volume 3 (300-399)
Topic: 348 - Optimal Array Multiplication Sequence
Replies: 22
Views: 3841
Fri Sep 02, 2005 3:39 am
Forum: Volume 3 (300-399)
Topic: 348 - Optimal Array Multiplication Sequence
Replies: 22
Views: 3841

### 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...
Sun Aug 07, 2005 5:37 am
Forum: Volume 4 (400-499)
Topic: 410 - Station Balance
Replies: 41
Views: 14996

### 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; } ...