Search found 8 matches

by Andrey Grigorov
Thu Jan 05, 2006 11:23 am
Forum: Volume 109 (10900-10999)
Topic: 10913 - Walking on a Grid
Replies: 23
Views: 12149

L I M O N wrote: do u use "long long" data type ?
L I M O N
I used "long int" and got AC.
by Andrey Grigorov
Wed Jan 04, 2006 11:31 pm
Forum: Volume 109 (10900-10999)
Topic: 10913 - Walking on a Grid
Replies: 23
Views: 12149

Someone pls send some critical data, i m getting WA again and again. i use DP. Thx in Advace. L I M O N Try this input: 1 0 1 1 0 -1 1 1 -1 3 0 1 1 1 1 1 1 1 1 1 4 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 1 1 -1 1 1 -1 1 1 1 10 -1 5 1 1 1 1 1 3 5 -1 -1 -1 -1 -1 -1 -1 -1 -1 3 4 -1 -1 -1 -1 -1 -1 -1 -1 -1...
by Andrey Grigorov
Wed Jan 04, 2006 11:57 am
Forum: Volume 109 (10900-10999)
Topic: 10913 - Walking on a Grid
Replies: 23
Views: 12149

hi, i cannot make a way to use DP in this problem. if you anyone describe how to implement DP here, i will be greatly helped. btw, can this problem be solved within time limit using dfs? thanks in advance... I used following DP-algorithm: In cell t[i,j,g] save the maximum sum of integers of the pat...
by Andrey Grigorov
Sat Dec 31, 2005 9:16 am
Forum: Volume 109 (10900-10999)
Topic: 10979 - How Many Triangles?
Replies: 15
Views: 6029

Hello there!
I'm getting WA but get correct output for all the sample input in this board and a lot of made by hand.
Are there any tricky cases?
Try this input:
6
1 0 3 0
2 0 4 0
1 0 3 2
3 2 2 0
3 0 3 2
3 2 4 0

Output:
6
by Andrey Grigorov
Sat Aug 13, 2005 8:47 pm
Forum: Volume 102 (10200-10299)
Topic: 10259 - Hippity Hopscotch
Replies: 15
Views: 3160

Why Compile Error?

Please, help me! Why my program get Compile Error /*Problem 10259 */ #include <stdio.h> const osn = 10; const maxn = 100; typedef int tlong[maxn]; void sum(tlong a, tlong b, tlong& c){ int i,n; for (i = 0; i <= maxn; i++) c[i] = 0; n = (a[0] > b[0]) ? a[0] : b[0]; for (i = 1; i <= n; i++){ c[i+1] = ...
by Andrey Grigorov
Tue Aug 09, 2005 4:22 pm
Forum: Volume 108 (10800-10899)
Topic: 10892 - LCM Cardinality
Replies: 25
Views: 8075

For N = 87675612 my program return LCM Cardinality = 23; There are all pairs what program found: (1,87675612) (2,87675612) (3,29225204) (3,87675612) (4,21918903) (4,43837806) (4,87675612) (6,29225204) (6,87675612) (12,7306301) (12,14612602) (12,21918903) (12,29225204) (12,43837806) (12,87675612) (73...
by Andrey Grigorov
Tue Nov 16, 2004 8:20 pm
Forum: Volume 100 (10000-10099)
Topic: 10088 - Trees on My Island
Replies: 11
Views: 4468

10088 - Trees on My Island

Hi! Can anybody give me some critical test? I don't know why WA. :( [pascal] {$A+,B-,C+,D-,E-,F-,G+,H+,I-,J-,K-,L-,M-,N+,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+} Program Problem10088 (input, output); {$APPTYPE CONSOLE} Type TPoint = Record X,Y: Int64; end; Var P: Array [0..1000] of TPoint; S: Double; i,PA,...
by Andrey Grigorov
Thu Jul 15, 2004 6:01 pm
Forum: Volume 104 (10400-10499)
Topic: 10401 - Injured Queen Problem
Replies: 19
Views: 9400

10401 - Injured Queen Problem

Hi! Please, help me. Is my input/output correct? Input: ?????? ??????????????? ???8????? 43????? ? ?? ??? ???? ????? 1???? 2???? 3???? 4???? 5???? ?????????? ??1?5?7A?? ?1?2?3?4?5 135797531? ?4?3?F??A???6?? My output: 2642 22696209911206174 2098208 0 1 0 2 16 184 44 30 36 30 44 531713286 81225 12096...

Go to advanced search