Search found 32 matches

by Dejarik
Tue Apr 27, 2004 9:27 am
Forum: Volume 4 (400-499)
Topic: 458 - The Decoder
Replies: 71
Views: 14936

Maybe replacing while(scanf("%c",&c[i])!=NULL) with while(scanf("%c",&c[i])!=EOF) will work? Hope it helps... PD: Why do you need an array to store chars if you manage them individually with scanf((char)) ? Try to store each char readed in a simple char variable and then print it with -7 ascii code....
by Dejarik
Mon Apr 26, 2004 3:26 pm
Forum: Volume 6 (600-699)
Topic: 612 - DNA Sorting
Replies: 122
Views: 15964

That's my input: 3 10 13 AACATGAAGG TTTTGGCCAA TTTGGCCAAA GGGGGGGGGG GATCAGATTT CCCGGGGGGA TTTTTTTTTT ATCGATGCAT AAAAAAAAAA CCCCCCCCCC ACGTACGTAC CGTACGTACG TGCATGCATG 10 6 AACATGAAGG TTTTGGCCAA TTTGGCCAAA GATCAGATTT CCCGGGGGGA ATCGATGCAT 10 13 AACATGAAGG TTTTGGCCAA TTTGGCCAAA GGGGGGGGGG GATCAGATTT ...
by Dejarik
Fri Apr 23, 2004 2:40 pm
Forum: Volume 4 (400-499)
Topic: 445 - Marvelous Mazes
Replies: 93
Views: 10258

The problem is in your gets() call.

Replace:

Code: Select all

while(gets(str)){
with:

Code: Select all

while(scanf("%s\n",&str)==1) {
should work.

Good luck,
Joan
by Dejarik
Tue Apr 20, 2004 1:58 pm
Forum: Volume 5 (500-599)
Topic: 555 - Bridge Hands
Replies: 12
Views: 3852

The compiler used by the Online Judge does not accept "//" as a coment. You have to use "/* ........ */".

In addition, you receive an email for each code you submit. If you receive Compilation Error, in the mail is explained the reason.

Hope it helps, Joan
by Dejarik
Mon Apr 19, 2004 4:02 pm
Forum: Volume 5 (500-599)
Topic: 560 - Magic
Replies: 12
Views: 6232

The other example that fails between our both executions (all other are the same): Input instance: 69832064398623063231 My output is: 59118266514059 And your suggested output is: 862124185015151 How is my output built? 6983206439862 3 063231 : remove the 3 6983206439862063231 : divide by 3 232773547...
by Dejarik
Mon Apr 19, 2004 3:36 pm
Forum: Volume 5 (500-599)
Topic: 560 - Magic
Replies: 12
Views: 6232

I think it is the strongest and hardest problem I even tried in ACM Contest Site. I cannot understand the execution for this example: 1234567891011121314 Your suggested output is: 5918004814864 But my estimated output is: 4115226004048 How is my output built? Please see: 1234567891011121314 divide i...
by Dejarik
Sat Apr 17, 2004 5:06 pm
Forum: Volume 5 (500-599)
Topic: 560 - Magic
Replies: 12
Views: 6232

Hey! Thanks for your answer. You helped me very much in order to understand the requirements of the problem. I'm now working hard on it, but always receiving Wrong Answer. May you help me comparing several input/output cases for the problem? Thanks in advance! Here is my I/O sample: Input 15 904390 ...
by Dejarik
Sat Apr 17, 2004 12:31 am
Forum: Volume 6 (600-699)
Topic: 612 - DNA Sorting
Replies: 122
Views: 15964

Instead of posting your code, you may want to post some input/output samples executed with your program and we can compare them in order to find differences. I got AC in this problem and we can check where may be the bug.

Joan
by Dejarik
Sat Apr 03, 2004 12:30 pm
Forum: Volume 5 (500-599)
Topic: 560 - Magic
Replies: 12
Views: 6232

560 - Magic

I'm trying to solve the problem 560-Magic , but I don't understand the meaning of some of the keys of the statement. Please has anybody solved this problem (only 16% accuracy?... hummm, and only 193 accepted answers in stats) in order to tell me the exact meaning of remove if possible leading zeros ...
by Dejarik
Thu Apr 01, 2004 1:00 pm
Forum: Volume 8 (800-899)
Topic: 861 - Little Bishops
Replies: 33
Views: 20288

How can't I think about it???

The number of ways to put 0 bishops in a NxN chessboard is not 0, it's of course 1: leaving it blank! When I think all the time I spent to solve this stupid mistake...

Thank you very much!

Joan
by Dejarik
Tue Mar 30, 2004 6:26 pm
Forum: Volume 8 (800-899)
Topic: 861 - Little Bishops
Replies: 33
Views: 20288

861 - Little Bishops. Please try this input!

Hi! I'm trying to solve the problem 861, and I don't understand why I'm receiving Wrong Answer. Please can you check the following input in your accepted programs and report me the solution obtained? Thanks you very much in advance, Joan That's the input: 8 6 4 4 8 15 8 12 8 0 5 1 5 5 5 9 8 10 1 1 1...
by Dejarik
Fri Mar 26, 2004 3:09 pm
Forum: Volume 4 (400-499)
Topic: 445 - Marvelous Mazes
Replies: 93
Views: 10258

445 - Why Output Limit Exceeded??

I'm not a supporter of posting code in the board. However in this case the code works correct in my computer but i don't know what can i do to solve the Output Limit Exceeded received in my submissions of problem 445 - Marvelous Mazes . I've never found this error in my other programs, and I cannot ...
by Dejarik
Fri Mar 26, 2004 2:13 am
Forum: Volume 103 (10300-10399)
Topic: 10394 - Twin Primes
Replies: 101
Views: 32208

Yes, I'm also interested about the problem of using while(scanf("%d",&num)) instead of while(scanf("%d",&num)==1) because i'm receiving Output Limit Exceeded in other problem of this Set and i cannot understand where is the mistake.

Thanks in advance!

Joan
by Dejarik
Wed Mar 24, 2004 12:46 pm
Forum: Volume 7 (700-799)
Topic: 750 - 8 Queens Chess Problem
Replies: 78
Views: 26453

I solved this problem a few days ago. If you post some inputs and outputs of your executions, i will do the same with my file to check where might be the wrong answer...

Joan, SPAIN
by Dejarik
Mon Mar 22, 2004 10:43 pm
Forum: Volume 7 (700-799)
Topic: 750 - 8 Queens Chess Problem
Replies: 78
Views: 26453

You were right! Thank you very much for you help! I thought that all the problems with multiple input would be explained in the statement of each problem. Now I will check the color of the mark before implementing my solutions...

THanks again!

Go to advanced search