## Search found 51 matches

Wed Jan 15, 2003 11:28 am
Forum: Volume 104 (10400-10499)
Topic: 10419 - Sum-up the Primes
Replies: 51
Views: 17372
do you mean that the judge now is still wrong? donno to be honest, since I get TLE... but since there are no accepted solutions, I would assume so... other: since my last post, I have tested my program for all the 14000 case and using a primitive timing (difftime), my prog ran in 10.00 seconds... t...
Wed Jan 15, 2003 10:41 am
Forum: Volume 104 (10400-10499)
Topic: 10419 - Sum-up the Primes
Replies: 51
Views: 17372
you guys might be right that the judge's input data isn't OK, but what bothers me more at the moment is that I am getting TLE... my prog gives the right answer for all the input seen on the forum or in the description, so I guss it is "just" slow - what could the problem be? I am using a backtrackin...
Wed Jan 15, 2003 9:40 am
Forum: Volume 104 (10400-10499)
Topic: 10423 - Peter Takes a Tramway
Replies: 7
Views: 2708

### 10423 - Peter Takes a Tramway

ok, this problem seemed fairly easy, but I keep on getting WA. Would someone give me a hint about (if there are any) tricky cases? Is there something with the train numbers, for instance, can they be negative or zero? 'coz there is nothing else I can think about.... but then, i have no clue how to p...
Wed Jan 15, 2003 6:00 am
Forum: Volume 100 (10000-10099)
Topic: 10034 - Freckles
Replies: 101
Views: 33292

### 10034

honestly, if someone could explain me why on earth I get runtime error with this problem, would appreciate it... thanx [c]#include <stdio.h> #include <stdlib.h> #include <math.h> #define MX 101 typedef struct _edge { int v1,v2; double cost; }edge; edge e[5001]; double x[MX],y[MX]; int compare(const ...
Tue Jan 14, 2003 11:27 pm
Forum: Volume 100 (10000-10099)
Topic: 10008 - What's Cryptanalysis?
Replies: 55
Views: 17837

### Re: Very confuce about 10008

For the TLE: you should only change the value of the max when you came upon a character, which is a letter... like this: I dont know Why I got TLE if I use this program in c: [c] for(j=0;kalimat[j];j++) { if(isalpha(kalimat[j])) { banyak[toupper(kalimat[j])-'A']++; if(banyak[toupper(kalimat[j])-'A']...
Sun Jan 05, 2003 2:29 pm
Forum: Volume 4 (400-499)
Topic: 454 - Anagrams
Replies: 97
Views: 21949
Well, sometimes declaring large arrays are not enough. Check your code, is there any part that goes out of the range? you are completely right, I wouldn't wanna argue with that - the only reason I mentioned that I maximized the arrays was to avoid people telling me to make sure that the array is bi...
Sun Jan 05, 2003 10:31 am
Forum: Volume 4 (400-499)
Topic: 454 - Anagrams
Replies: 97
Views: 21949

### 454 RE & CE

alright, I don't think I will post my code here, but I am getting real \$%^&* with the compiler difference between the judge's and mine... honestly, why does the same C code compiles and runs on my machine fine and gets RE (invalid memory reference) from the judge? Is there any way I could set up my ...
Sun Jan 05, 2003 3:42 am
Forum: Volume 4 (400-499)
Topic: 459 - Graph Connectivity
Replies: 132
Views: 25846
rjhadley wrote:There should be a blank line after the 3:
that was the catch... thanx a lot!
Sun Jan 05, 2003 1:19 am
Forum: Volume 4 (400-499)
Topic: 459 - Graph Connectivity
Replies: 132
Views: 25846

### so then how does the input work in this case?

ok, the non-specified multiple input is giving me a hard time again... am I right that the input looks something like this? 3 C AB BC CA D AB CD E AC BD EA PS: in case the input has the above format - what is there any catch? I tested my code with cases I could think about, including repeated edges,...
Sat Jan 04, 2003 10:35 pm
Forum: Volume 5 (500-599)
Topic: 544 - Heavy Cargo
Replies: 32
Views: 14715

### 544 - Heavy Cargo

I just started to try graph related problems, and I got stuck on the first problem... this one. I took a pretty brute force, backtracking based approach, once arriving at a city, going to every linked one, recursively (isn't it what depth-first search is all about?). My solution is giving the right ...
Fri Jan 03, 2003 7:51 pm
Forum: C
Replies: 7
Views: 3156
I received compile error... however, I did a bit of search on the net, and I found one way the OJ compiles it: [c] typedef struct _myStruct { int data; struct _myStruct *next; }myStruct; [/c] this compiles both on my machine and the OJ's - though to be honest, I pretty much don't know why I had to p...
Fri Jan 03, 2003 7:30 pm
Forum: C
Replies: 7
Views: 3156

could somebody tell me the proper form to create a linked list? I thought the
[c]
typedef struct myStruct {
int data;
myStruct *next;
};
[/c]
was the way, but the OJ demonstrated me that I was wrong :(
Fri Jan 03, 2003 2:47 pm
Forum: Volume 4 (400-499)
Topic: 401 - Palindromes
Replies: 196
Views: 33058
apparently my problem is when the input is a blank line There is no input when the string would be an empty string.... Input consists of strings (one per line) each of which will consist of one to twenty valid characters However, I would say that the specification of the output is rather contradict...
Thu Jan 02, 2003 10:50 pm
Forum: Volume 101 (10100-10199)
Topic: 10156 - Sala-ma-Sond, A Nice Little Pond
Replies: 13
Views: 3491
caesum is right, it didn't seem that difficult - however, I do get WA on it... is there any catch you can think about? is that possible that there is a command given to a turtle with non-existent id? but shouldn't one get runtime error (invalid memory reference) then? any ideas are welcome :)
Sat Dec 28, 2002 5:50 pm
Forum: Volume 1 (100-199)
Topic: 121 - Pipe Fitters
Replies: 36
Views: 2649
what error do you get? TL or WA? thanks a lot for helping. as for the OJ, guess what: it is WA. would you do me a favor? would u compile my code and see if it works on your machine? today the OJ doesn't compile my messages, so I just put it aside a bit. But I have some problems like this, where I r...