Search found 8 matches

by wos
Thu May 26, 2005 8:41 am
Forum: Volume 108 (10800-10899)
Topic: 10803 - Thunder Mountain
Replies: 47
Views: 23997

Ok i solved it at last. The problem was i didn't read carefuly enough. I thought that you should output "Send Kurdy" when there are no ways to get from any town to any other, and not when there is only one such way. Thanks for your help.
by wos
Tue May 24, 2005 8:17 am
Forum: Volume 108 (10800-10899)
Topic: 10803 - Thunder Mountain
Replies: 47
Views: 23997

Ok i found one problem i was setting the diagonal values to INT_MAX to avoid getting 0 as a result however that was wrong, because FW then fails. I fixed that and the test case gived by mf now works. Also just to be safe i added a check in FW if a value of any of the nodes it's going through is INT_...
by wos
Wed May 18, 2005 8:43 am
Forum: Volume 8 (800-899)
Topic: 879 - Circuit Nets
Replies: 11
Views: 5610

879 TLE

Hi, I am using BFS to transverse the graph, and then search for all those not visited and start the BFS on them again. I count how many times i found vertices that aren't visted, and that is the result. However using this algorithm i get TLE. So i was wondering if there is a faster algorithm to do t...
by wos
Wed May 18, 2005 8:16 am
Forum: Volume 108 (10800-10899)
Topic: 10803 - Thunder Mountain
Replies: 47
Views: 23997

10803 WA help please

I spent a few days trying to fix this, no luck, i read the other subject on this problem again no luck :D. So if anyone can give me some test data, i would be very thankful, or point out something wrong in my code ? #include <cstdio> #include <climits> #include <algorithm> #include <vector> #include...
by wos
Tue Aug 31, 2004 3:06 pm
Forum: Volume 7 (700-799)
Topic: 751 - Triangle War
Replies: 17
Views: 7779

int y=0; int z=6/y; this means 6/0, witch would give u FPE, but i guess u did this to find out if there will be test cases for m < 6 :D Also u are declaring int y in two places, in main() , and localy for if(m < 6) ... And i think that if u have both multiiple input problem and number of test cases...
by wos
Tue Aug 31, 2004 2:55 pm
Forum: Volume 7 (700-799)
Topic: 705 - Slash Maze
Replies: 13
Views: 11177

What i did is to represent the boxes as a graph (adjacency lists in matrices) and then use DFS to find and count the cycles in that graph, and i used flood fill for counting the length of those cycles...
by wos
Wed Jul 07, 2004 9:23 am
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 27801

i solved it i didn't realise that sort() compares by ASCII codes :D
by wos
Mon Jul 05, 2004 11:20 am
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 27801

Can someone please help me here, I don't know what is wrong in my program. I tryed all test cases I could think of, and everything works, but when i post it i get WA. Here is my program: #include <cstdio> #include <algorithm> #include <cstring> using namespace std; int main() { int n; char str[1000]...

Go to advanced search