Search found 38 matches
- Sun Feb 15, 2004 4:48 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10029 - Edit Step Ladders
- Replies: 70
- Views: 22926
I don't think he completely bypassed the size of the alphabet, but I think he ignored it because it could be treated as a constant. You can pass the time limit with hashing too, if you have a good implementation. Check out little joey's comments at: http://online-judge.uva.es/board/viewtopic.php?t=...
- Sat Feb 14, 2004 9:34 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10029 - Edit Step Ladders
- Replies: 70
- Views: 22926
I have two method to solve your problem, and both of them are related to the size of the strings (but I think the O(t*n) is better than O(n^2) where t refers to the length of the string) ... The second method uses hash instead of Sorting and Searching with binary search. (Ofcourse I ignore problems...
- Wed Feb 11, 2004 7:44 pm
- Forum: C++
- Topic: Debugging cpp files in rhide
- Replies: 1
- Views: 3309
Debugging cpp files in rhide
Hi. I'm coding in rhide v1.4.9. I'm having trouble with debugging C++ code. Say I start tracing into (F7 option). All I can see during this process is last few lines of code instead of highlighted line that is being executed. Another one problem is that sometimes I can't see values of variables in W...
- Sat Aug 30, 2003 1:05 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10100 - Longest Match
- Replies: 95
- Views: 23142
Hello I'm having WA for this problem, and after having rewrote it from scratch twice, and read the whole forum. So I'm now going to an extremity I never used before : posting my algorithm and my whole source here, hoping that someone we'll help me ;) The algo is simple : DP with a table l [j] where...
- Thu Jul 31, 2003 11:21 am
- Forum: Volume 105 (10500-10599)
- Topic: 10534 - Wavio Sequence
- Replies: 44
- Views: 8911
- Mon Jun 02, 2003 1:16 pm
- Forum: Algorithms
- Topic: Negative cycle in graph
- Replies: 11
- Views: 4996
need something better
I've found a negative-weight cycle (cycle itself) with Floyd-Warshall in O(n^4). Please, does anyone know how to do it faster? I need to do it in dynamic graph and remove them after detected, so it would take really long to complete it. I
- Sun Jun 01, 2003 1:09 pm
- Forum: Algorithms
- Topic: Negative cycle in graph
- Replies: 11
- Views: 4996
Excuse me. Can anyone post the pseudocode for Bellman-Ford's Algorithm here? d[i] <- infinity for each i except for source (i.e. starting node), so d[source] <- 0 for i <- 1 to |V[G]| - 1 do for each edge (u, v) in E[G] if d[v] > d[u] + w(u, v) d[v] <- d[u] + w(u, v) If you want to know if there is...
- Fri May 30, 2003 11:52 am
- Forum: Algorithms
- Topic: Negative cycle in graph
- Replies: 11
- Views: 4996
Negative cycle in graph
Given directed weighted graph determine a negative cycle C, (c1,c2,
- Fri May 30, 2003 11:51 am
- Forum: Algorithms
- Topic: Minimum cost flow problems
- Replies: 0
- Views: 1481
Minimum cost flow problems
Are there any instances of minimum cost flow problem at UVA?
Maxim
Maxim
- Sun May 25, 2003 10:43 pm
- Forum: C++
- Topic: how to copy an array in C
- Replies: 2
- Views: 1997
- Mon May 12, 2003 1:08 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10013 - Super long sums
- Replies: 212
- Views: 45315
Why WA?
First of all, set not only line1[num] and line2[num] to zero, but all num + 1 elements of each line to zero.
After computation, only line1[num] might be leading zero, so test only for it, not whole line1.
Maxim
After computation, only line1[num] might be leading zero, so test only for it, not whole line1.
Maxim
- Mon May 12, 2003 12:26 pm
- Forum: Volume 5 (500-599)
- Topic: 538 - Balancing Bank Accounts
- Replies: 18
- Views: 8718
538 - Balancing Bank Accounts
Can anyone tell me or prove whether this problem can be solved using Network flow?
Thanks,
Maxim

Thanks,
Maxim
- Sun May 11, 2003 10:05 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10436 - Cheapest way
- Replies: 18
- Views: 6999
Don't know why
It's quite tricky to solve this problem using Floyd-Warshall. Your program doesn't work well because of additional cost when passing through some station. I've been testing your program and I couldn
- Sun May 11, 2003 11:42 am
- Forum: Volume 104 (10400-10499)
- Topic: 10436 - Cheapest way
- Replies: 18
- Views: 6999
Tricky input
What about case when r and s are the same stations (find cheapest path from node to itself)? Your program outputs 0, instead of 1.1 * b[j] / val ?
Am I right? I think this is the only mistake you've made.
Maxim
Am I right? I think this is the only mistake you've made.
Maxim
- Sun May 11, 2003 11:06 am
- Forum: Other words
- Topic: Multiple input problems??
- Replies: 1
- Views: 919