Search found 214 matches

by CDiMa
Thu May 12, 2005 9:31 am
Forum: Other words
Topic: AVATAR.
Replies: 3
Views: 957

ibrahim wrote:

Code: Select all

#include <iostream.h> 

int main (void) { 
  cout << 'Hello Wordl!' << endl; 
}
Is this code ok?
No, it will give WA even on the sample data!:roll:

:P

Ciao!!!

Claudio
by CDiMa
Tue May 10, 2005 6:20 pm
Forum: Volume 103 (10300-10399)
Topic: 10370 - Above Average
Replies: 62
Views: 18941

Yeah, still saying .c I triple checked everything and still am getting the error =( is there a way to format the output w/o using the fixed function? Here are the compiler error messages: 03553475_24.c: In function `int main()': 03553475_24.c:42: `fixed' undeclared (first use this function) 0355347...
by CDiMa
Tue May 10, 2005 12:47 pm
Forum: Volume 103 (10300-10399)
Topic: 10370 - Above Average
Replies: 62
Views: 18941

I tried to submit it again making sure I selected C++ as the type of code. I'm still getting the same compile error. I was induced to think that it was submitted as C code by the compiler messages: 03546402_24.c: In function `int main()': As you can see the file extension is .c Is the file extensio...
by CDiMa
Mon May 09, 2005 10:06 am
Forum: Volume 103 (10300-10399)
Topic: 10370 - Above Average
Replies: 62
Views: 18941

I'm getting a compile error when I run my program... here's the error [...] I'm just posting for some help in formatting the output so it compiles correctly. The compiler at my school accepts it w/o a problem, not sure why OJ doesn't. You should submit your code as C++. This should make it compile ...
by CDiMa
Thu May 05, 2005 6:02 pm
Forum: Volume 1 (100-199)
Topic: 124 - Following Orders
Replies: 49
Views: 7124

#ifndef ONLINE_JUDGE close(0); open("input.txt", 0); #endif Will you please describe its function? (It's work) The program closes standard input and opens the file input.txt associating it with file descriptor 0. Since this wouldn't work on the online judge and isn't allowed (restricted function) t...
by CDiMa
Thu May 05, 2005 1:58 pm
Forum: Volume 8 (800-899)
Topic: 879 - Circuit Nets
Replies: 11
Views: 5565

Eduard wrote:Can there be spaces after the last number of the line???
Thanks.
Actually I don't know if the Judge's input has redundant spaces, but my AC program tolerates them...

Ciao!!!

Claudio
by CDiMa
Thu May 05, 2005 1:56 pm
Forum: Volume 8 (800-899)
Topic: 879 - Circuit Nets
Replies: 11
Views: 5565

Yes, the description is vague in this respect. I made the following assumptions: 1. The input set for each case ends either with a blank line or the EOF (there can be only one EOF, of course). 2. There are no blank lines within the input set for a case. In other words: each case has one or more lin...
by CDiMa
Thu May 05, 2005 12:10 pm
Forum: Volume 8 (800-899)
Topic: 879 - Circuit Nets
Replies: 11
Views: 5565

879 - Circuit Nets

Hi all. I have a problem understanding the input specification. The problem text says that the input is terminated by the "end_of_file mark". Does this refer to each input set? How do I detect the end of an input set? My solution ends an input set trying to find a blank line but gets WA. Thanks in a...
by CDiMa
Wed May 04, 2005 6:14 pm
Forum: Volume 1 (100-199)
Topic: 124 - Following Orders
Replies: 49
Views: 7124

Re: CE in problem 124 [why error messages are so dumb?]

Hi! I've compiled following code in MSVC7.1 and even in Borland C. Everything is fine. So why do it gets compile errors in online judge? I recieved by e-mail tough list of errors but they did not give me any clue to understang the problems. What is the character 0232, and why my declared variables ...
by CDiMa
Tue Apr 26, 2005 4:24 pm
Forum: Other words
Topic: Problem with submit the code
Replies: 2
Views: 936

Re: Problem with submit the code

I have problem submit as C source code. When I submit it always gets compile error. But when I submit as CPP source code it gets A.C. It's the same code. I have this problem since 24 april and 2 days ago the status page isn't update but in author statistics is update (but I don't have this problem ...
by CDiMa
Fri Apr 15, 2005 6:24 pm
Forum: C
Topic: undetermination?
Replies: 4
Views: 2151

I'm sorry for my two mistakes before: 1. yes, it is j--; 2. I forgot to tell you that I use a Borland C++ compiler, version 3.1 and it's worked good so far. (I've also tried the code on Linux, but there it was no problem) Yes, it's on my computer that's it's not working. I could send you the whole ...
by CDiMa
Thu Apr 14, 2005 11:10 am
Forum: C
Topic: undetermination?
Replies: 4
Views: 2151

Re: undetermination?

I used this piece of code in a program the other days and it took me about an hour to find the bug: while(i<j) a[i++] = a[j--]; Replacing with {a =a[j]; i++; j++} made the code run correctly. My real problem now is that i knew this is NOT a bug. I'm guessing I've got some kind of undetermination, b...
by CDiMa
Tue Apr 12, 2005 12:43 pm
Forum: Volume 102 (10200-10299)
Topic: 10276 - Hanoi Tower Troubles Again!
Replies: 9
Views: 6654

yatsen wrote:f = f[i-1] + ((i-1)/2+1)*2

You can rewrite this as f=f[i-1]+i+1 but I don't think it really works...

Ciao!!!

Claudio
by CDiMa
Tue Apr 12, 2005 12:08 pm
Forum: Other words
Topic: funny log in problem
Replies: 4
Views: 1190

I have another, possibly related, problem. After I read threads marked unread they are still marked as such and to clear them I have to click the link "mark all topics read". After I do it for a couple of different forums some of the old threads reappear as unread even if they don't list new posts. ...
by CDiMa
Fri Apr 08, 2005 9:53 am
Forum: Volume 105 (10500-10599)
Topic: 10591 - Happy Number
Replies: 61
Views: 20963

Re: 10591-RunTimeError

i don't understand what's wrong. it ran without any problem & the output is also correct.so why RuntimeError #include<stdio.h> int main(void) { unsigned long a,b,i,c,num[1000],u,sum=0; scanf("%lu",&c); for(i=0;i<c;i++) scanf("%ld",&num ); for(i=0;i<c;i++) { u=num ; do{ sum=0; a=num ; b=a%10; sum=su...

Go to advanced search