Search found 15 matches

by jambon_vn
Wed Mar 02, 2005 11:05 pm
Forum: Volume 1 (100-199)
Topic: 111 - History Grading
Replies: 135
Views: 22709

111 WA

Here is my code. I already pasted input test. Can anyone point out my mistake? #include <iostream> using namespace std; int N; int A[25], B[25], C[25], D[25][25]; int main() { cin >> N; int i, j, ans; for (i = 1; i <= N; i++) { int k; cin >> k; A[k] = i; } for (i = 1; i <= N; i++) for (j = i + 1; j ...
by jambon_vn
Mon Dec 20, 2004 8:25 am
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 82855

Man, I have the same problem.
I used cin.peek first and get WA. It is AC after changing to cin >> N.

Thank so much. However don't know what is going on.
by jambon_vn
Thu Oct 14, 2004 4:56 am
Forum: Volume 1 (100-199)
Topic: 108 - Maximum Sum
Replies: 233
Views: 24217

by jambon_vn
Wed Oct 13, 2004 8:16 am
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 70461

Re: 10189 WA - Banging my head against the desk.

This problem is not hard but anyone know the way to speed up the program. The fastest record is 0.000s. How did he do? :(
by jambon_vn
Thu Oct 07, 2004 3:04 pm
Forum: Volume 100 (10000-10099)
Topic: 10021 - Cube in the labirint
Replies: 17
Views: 3965

I did not see your code but actually I misunderstand this problem. You are right about repeated cell. Cell can be repeated.
by jambon_vn
Thu Oct 07, 2004 7:27 am
Forum: Volume 100 (10000-10099)
Topic: 10047 - The Monocycle
Replies: 20
Views: 6162

As I think, this is a graph problem and you can use BFS to solve.
by jambon_vn
Thu Oct 07, 2004 7:17 am
Forum: Volume 100 (10000-10099)
Topic: 10048 - Audiophobia
Replies: 27
Views: 9835

I think you refer to the out size of the array. int Path[100][100]; You can only use Path[0][0] to Path[99][99]. When C = 100. See the following code (for example) for(i=1;i<=C;i++) Path =0; You assign Path[100][100] --> Run Time Error. You should change to: Path[101][101]. It will be okie, I do not...
by jambon_vn
Thu Oct 07, 2004 7:06 am
Forum: Volume 100 (10000-10099)
Topic: 10021 - Cube in the labirint
Replies: 17
Views: 3965

The problem do not say the cell can be repeated or not. But to find the minimal number of moves, it is wise when each cell will be visited no more once.

I think BFS or DFS will work in this problem. If you stil have WA, please post your code. Maybe someone can point out your mistake.
by jambon_vn
Sun Oct 03, 2004 6:47 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 59453

Nothing is wrong with your code. I submit your code and get AC. :D
by jambon_vn
Sun Oct 03, 2004 6:38 pm
Forum: Volume 1 (100-199)
Topic: 108 - Maximum Sum
Replies: 233
Views: 24217

I got your idea. Thanks a lot.
by jambon_vn
Sun Oct 03, 2004 2:00 am
Forum: Volume 1 (100-199)
Topic: 108 - Maximum Sum
Replies: 233
Views: 24217

How to get the answer for one-dimension with O(n). I can't find any.
by jambon_vn
Sat Oct 02, 2004 5:51 am
Forum: Volume 100 (10000-10099)
Topic: 10099 - The Tourist Guide
Replies: 91
Views: 29389

Hi, According to this problem, you will use the route 1 - 2 - 4 - 7. And the maximum number of passengers is 25. But only 24 tourists can go each time because the tourist guide has to ride the bus with each group . The input sample has 99 tourists. With 4 trips only 96 tourists can go to the destina...
by jambon_vn
Thu Sep 30, 2004 2:56 am
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 25939

Thank guys. I have the same mistake. I got AC now. :D
by jambon_vn
Wed Sep 29, 2004 6:29 am
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 41242

1
9
8
by jambon_vn
Wed Sep 29, 2004 6:18 am
Forum: Volume 100 (10000-10099)
Topic: 10009 - All Roads Lead Where?
Replies: 60
Views: 14928

10009 - WA :((

Can anyone point out my mistake? Thank. #include <iostream> #include <string> using namespace std; long Num, M, N, numB, numC; int A[27], B[27], C[27]; int main() { cin >> Num; for (long k = 1; k <= Num; k++) { cin >> M >> N; long i; for (i = 1; i <= M; i++) { string city1, city2; cin >> city1 >> ci...

Go to advanced search