Search found 85 matches

by medv
Sun Sep 14, 2008 2:21 pm
Forum: Bugs and suggestions
Topic: Lost password - DOES NOT work
Replies: 2
Views: 1617

Lost password - DOES NOT work

Dear UVA staff! I lost my password, but your link http://icpcres.ecs.baylor.edu/onlinejudge/index.php?option=com_comprofiler&task=lostPassword DOES NOT work! I wrote a lot of times to "Contact us" http://icpcres.ecs.baylor.edu/onlinejudge/index.php?option=com_contact&Itemid=4 but NEVER got answer. P...
by medv
Thu Aug 23, 2007 7:18 pm
Forum: Volume 103 (10300-10399)
Topic: 10330 - Power Transmission
Replies: 43
Views: 15759

10330 Time Limit - I used BFS - Edmonds-Karp

Why Time Limit? How to improve solution? #include <stdio.h> #include <memory.h> #define MAX 202 #define INF 1000000000 #define min(i,j) (i<j)?i:j int m,n,a,b,d,cap,i; int MaxFlow,flow; int g[MAX][MAX],used[MAX]; int aug(int x,int t,int CurFlow) { if (x == t) return CurFlow; if (used[x]++) return 0; ...
by medv
Mon Nov 13, 2006 4:36 pm
Forum: Volume 111 (11100-11199)
Topic: 11103 - WFF 'N PROOF
Replies: 13
Views: 7923

WHY RTE?

Why Run Time Error? (Sorry, I can't use HTML) #include <cstdio> #include <vector> #include <string> #include <algorithm> using namespace std; char s[101]; vector<char> op,var; vector<char>::iterator iter; string res; int f(char a, char b) { if (a == 'N') return 1; if (b == 'N') return 0; return a < ...
by medv
Mon Nov 13, 2006 4:12 pm
Forum: Volume 111 (11100-11199)
Topic: 11103 - WFF 'N PROOF
Replies: 13
Views: 7923

Your code has a lot of WA

Your code has a lot of WA:
1. input: w
your program says: w
But 'w' is not WWF, only p,q,r,s,t!

2. input: qwerty
your program says: no WFF possible
But we can find a subset of WWF, for example: t.
by medv
Tue Jun 20, 2006 1:49 pm
Forum: Volume 4 (400-499)
Topic: 442 - Matrix Chain Multiplication
Replies: 21
Views: 3306

442 - RTE

I have RTE, but can't find why.
I did a lot of testing.
I tried to put char s[100000]; but it didn't help

Thanks, acc
by medv
Sat May 13, 2006 12:03 pm
Forum: Volume 110 (11000-11099)
Topic: 11002 - Towards Zero
Replies: 39
Views: 17561

I have TLE

To asif_rahman0: You cave wrong answer on test 3 40 50 50 40 40 40 0 50 41 Your program gives 30, but answer is 9. I have TLE. Here is my program: #include <stdio.h> #include <memory.h> #define MAX 1500 int m[2][2*MAX+3]; int i,j,k,n,num; void main(void) { while(scanf("%d",&n),n) { memset(m,0,sizeof...
by medv
Sun Feb 19, 2006 6:29 pm
Forum: Volume 106 (10600-10699)
Topic: 10681 - Teobaldo's Trip
Replies: 44
Views: 11799

Try this input

Try this input:

2 1
1 2
1 2 3

your program gives NO, but must be YES.
The trip is: 1 - 2 - 1 - 2
by medv
Sun Feb 19, 2006 5:05 pm
Forum: Volume 106 (10600-10699)
Topic: 10602 - Editor Nottoobad
Replies: 19
Views: 11251

10602 - RTE. Help me!

Why RTE???? Where is Error? I tried to increase array size - but it didn't help #include <cstdio> #include <string> #include <algorithm> using namespace std; int tests,i,n; string s[100]; int len,res; int common(int i, int j) { int k; for(k=0;k<s .size(),k<s[j].size();k++) if (s [k] != s[j][k]) brea...
by medv
Fri Feb 03, 2006 10:32 pm
Forum: Volume 100 (10000-10099)
Topic: 10023 - Square root
Replies: 121
Views: 27038

TLE

Thank you very much for algorithm! But soon TLE!!!! How I tired of it!!!! How to speed up it????????????????????????????? #include <cstdio> #include <string> #include <memory> #define MAXLENGTH 1001 using namespace std; class BigInteger{ private: int m[MAXLENGTH]; int len; public: BigInteger(int n) ...
by medv
Fri Feb 03, 2006 10:59 am
Forum: Volume 100 (10000-10099)
Topic: 10023 - Square root
Replies: 121
Views: 27038

Why number 20?

Why number 20 is used here? What does this number mean?
by medv
Wed Feb 01, 2006 4:32 pm
Forum: Volume 100 (10000-10099)
Topic: 10023 - Square root
Replies: 121
Views: 27038

So what is the algorithm?

Tell please the algorithm.
Your link does not tell the exact algorithm.
Thanks.
by medv
Mon Jan 30, 2006 3:16 pm
Forum: Volume 100 (10000-10099)
Topic: 10023 - Square root
Replies: 121
Views: 27038

10023 - RTE. Why?

Thank you. But now I have Run Time Error. I don't know why. I corrected my sqrt function - previous program didn't count sqrt(1) Now I have tested a lot - and all seems fine. What about dimention of array? The problem statement says 1000 is enough. Is it so? I tried to put MAXLENGTH = 10001 and get ...
by medv
Mon Jan 30, 2006 12:53 pm
Forum: Volume 100 (10000-10099)
Topic: 10023 - Square root
Replies: 121
Views: 27038

10023 - Compile error

Why Complie Error? Can I use classes on UVA? #include <cstdio> #include <string> #include <memory> #define MAXLENGTH 1001 using namespace std; class BigInteger{ private: int m[MAXLENGTH]; int len; int max(int i, int j) { return (i > j) ? i : j; } public: BigInteger(int n=0) { memset(m,0,sizeof(m)); ...
by medv
Thu Jan 26, 2006 10:33 am
Forum: Volume 108 (10800-10899)
Topic: 10816 - Travel in Desert
Replies: 49
Views: 22180

Here is test

You are wrong on this test (presented here earlier):

3 3
1 3
1 2 10.0 10.0
1 2 11.0 9.0
2 3 11.0 10.0

Your answer is
1 2 3
20.0 11.0


The correct is

1 2 3
19.0 11.0
by medv
Wed Jan 04, 2006 10:51 pm
Forum: Volume 109 (10900-10999)
Topic: 10945 - Mother bear
Replies: 65
Views: 16544

Here is your mistake

Try this test:
aa

This is a palindrome, but your program says that no.

Go to advanced search