No problem..
I already do it using MAXMIN floyds.
Search found 14 matches
- Thu Jun 30, 2005 1:55 am
- Forum: Volume 100 (10000-10099)
- Topic: 10099 - The Tourist Guide
- Replies: 91
- Views: 31498
- Wed Jun 29, 2005 9:54 pm
- Forum: Volume 1 (100-199)
- Topic: 137 - Polygons
- Replies: 44
- Views: 5166
- Wed Jun 29, 2005 9:52 pm
- Forum: Off topic (General chit-chat)
- Topic: I win !!
- Replies: 361
- Views: 129902
- Wed Jun 29, 2005 9:41 pm
- Forum: Volume 7 (700-799)
- Topic: 700 - Date Bugs
- Replies: 7
- Views: 6839
Same problem
I am having the same problem.. can someone post some input and output so I can test my problem?
Thanks.
Thanks.
- Wed Jun 29, 2005 9:37 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10099 - The Tourist Guide
- Replies: 91
- Views: 31498
10099 TLE
Hi to all!!! I am trying to solve this graph problem but it gives me TLE.. I use this metoth to find the MAX.. void bfs(long a, long b, long cost) { long i; visitado[a]=1; if (a==b && cost>max) max=cost; else { for (i=0;i<=n;i++) if (!visitado[i] && edges[a][i]>0 && min(edges...
- Wed Jan 12, 2005 2:23 am
- Forum: Pascal
- Topic: BigInteger in pascal
- Replies: 3
- Views: 7418
..
well.. if you have a number of test cases.. you just do a for cycle.. if your task is to read until end of file just control EOF (end of file). For example scanf returns the number of arguments read if the value returned is 0 then input ends. gets function is almost like that.. if 0 is returned then...
- Sat Jan 08, 2005 11:37 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 212283
start and end
I think your only problem is to assume that start<end ..
For each pair of input integers i and j you should output i, j, and the maximum cycle length for integers between and including i and j.
I hope this help you.
For each pair of input integers i and j you should output i, j, and the maximum cycle length for integers between and including i and j.
I hope this help you.
- Thu Jan 06, 2005 3:02 am
- Forum: Off topic (General chit-chat)
- Topic: How many language do you know?
- Replies: 32
- Views: 16824
hm..
hmm..
Well.. I know Pascal, C, a little Basic .. and now i am learning Java
Well.. I know Pascal, C, a little Basic .. and now i am learning Java
- Thu Jan 06, 2005 2:38 am
- Forum: Volume 103 (10300-10399)
- Topic: 10340 - All in All
- Replies: 129
- Views: 35476
Your code is OK
Your code is OK..
The problem its your array size .. put one more zero on MAX.
The problem its your array size .. put one more zero on MAX.
- Tue Jun 10, 2003 4:14 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10100 - Longest Match
- Replies: 95
- Views: 22980
10100 Why WA??..
Hi.. I dont understand why my code give me WA... Can somenone who got AC tell me the output for this please.. test test test test sdfasdf (blank Line = (Length=0)) kgds (Space charaters) ..... asd The the My code output: 1. Length of longest match: 1 2. Blank! 3. Length of longest match: 0 4. Length...
- Sun Jun 01, 2003 3:36 pm
- Forum: Volume 4 (400-499)
- Topic: 444 - Encoder and Decoder
- Replies: 155
- Views: 25857
WA?? Why??
I have the same problem I dont no why but my source give me WA... Why?? [pascal] Program Acm_444(Input, Output); Var Letra: Char; Dado: Integer; Result: AnsiString; Function Reverse(X: Integer): String; Var Y, Temp: String; I, Outro: Integer; Begin Str(X, Y); Temp:=''; For I:=Length(Y) DownTo 1 Do T...
- Sun May 11, 2003 8:39 pm
- Forum: Volume 4 (400-499)
- Topic: 412 - Pi
- Replies: 104
- Views: 20628
412 WA.. why??
Can somone help me with this... I have WA ... why?? [pascal] Program Acm_412(Input, Output); Function Verificou(X, Y: Integer): Boolean; Var I: Integer; Begin Verificou:=True; If (Y Mod (Y Div 2)=0) And (X Mod (Y Div 2)=0) And (Y Div 2<>1) Then Verificou:=False Else For I:=2 To Trunc(Sqrt(Y)) Do If ...
- Fri May 09, 2003 5:01 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10391 - Compound Words
- Replies: 40
- Views: 18834
10391 - Why WA ???
THis is my code for problem 10391 [pascal] Program Problema_A(Input, Output); Var Conta, I, Temp, Conta2: LongInt; Words: Array[1..120000] Of String; Function Procurar(N: String): LongInt; Var I, J, A: Integer; Begin I:=1; J:=Conta; While (I<J) Do Begin A:=(I+J) Div 2; If N<=Words[A] Then J:=A Else ...