## Search found 19 matches

Thu Mar 14, 2013 1:15 pm
Forum: Volume 102 (10200-10299)
Topic: 10252 - Common Permutation
Replies: 150
Views: 51758

### Re: ( 10252 ) What's the diffrence between the two codes?

Got it!
Thank you, very much.
Wed Mar 13, 2013 8:17 am
Forum: Volume 102 (10200-10299)
Topic: 10252 - Common Permutation
Replies: 150
Views: 51758

### Re: ( 10252 ) What's the diffrence between the two codes?

Got AC!
But what's the reason? I want to know!

And if I change into this.

Code: Select all

``````......
while( fgets( a, 1001, stdin ) != NULL && fgets( b, 1001, stdin ) != NULL ) {
a[ strlen( a ) - 1 ] = '\0'; b[ strlen( b ) - 1 ] = '\0';
......``````
WA, why?
Wed Mar 13, 2013 3:12 am
Forum: Volume 102 (10200-10299)
Topic: 10252 - Common Permutation
Replies: 150
Views: 51758

### Re: ( 10252 ) What's the diffrence between the two codes?

Thx, I've tried that, but still WA why?
Tue Mar 12, 2013 6:01 pm
Forum: Volume 102 (10200-10299)
Topic: 10252 - Common Permutation
Replies: 150
Views: 51758

### Re: ( 10252 ) What's the diffrence between the two codes?

Sun Mar 10, 2013 7:34 pm
Forum: Volume 102 (10200-10299)
Topic: 10252 - Common Permutation
Replies: 150
Views: 51758

### ( 10252 ) What's the diffrence between the two codes?

As the title, Wrong Answer C code: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> int cmp( const void *a, const void *b ) { return *(char *)a - *(char *)b; } char a[ 1001 ], b[ 1001 ]; int main( ) { while( 1 ) { /* read */ gets( a ); gets( b ); if( a[ 0 ] == '\0' ) b...
Sat Feb 23, 2013 3:19 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 184329

### Re: Newbie can't get AC

Specific problem should be asked in corresponding board.
Best wishes!~
Thu Feb 21, 2013 5:41 pm
Forum: General
Topic: I installed a Linux(Ubuntu12.04LTS), how can I test RuntimeE
Replies: 4
Views: 7337

### Re: I installed a Linux(Ubuntu12.04LTS), how can I test Runt

Oh, I just didn't post the "#include <stdio.h>". When compiling, the code includes them. Oh, again... I didn't switch to Ubuntu system when posting the reply, so the code file in "ext4" partion cannot be read in Windows ( NTFS partion ), thus I just... you know, too careless... while you are extreme...
Thu Feb 21, 2013 3:11 am
Forum: General
Topic: I installed a Linux(Ubuntu12.04LTS), how can I test RuntimeE
Replies: 4
Views: 7337

### Re: I installed a Linux(Ubuntu12.04LTS), how can I test Runt

:D Thanks for your suggestion! But I have tried this code, causing no RE. Why? int main( ) { int *n = new int [ 3 ]; printf( "First test.\n" ); printf( "%d\n", n[ 10 ] ); /* Does this */ printf( "Last test.\n" ); return 0; } In Ubuntu, I run program by "./re"( compiling by "gcc re.c -o re" ), and th...
Wed Feb 20, 2013 2:13 pm
Forum: General
Topic: I installed a Linux(Ubuntu12.04LTS), how can I test RuntimeE
Replies: 4
Views: 7337

### I installed a Linux(Ubuntu12.04LTS), how can I test RuntimeE

I want to see the message when causing a runtime error on my own computer, can gcc or a way to run program can achieve this goal?

If the way permits windows system, that will also be welcomed!

Thanks!!!
Thu Nov 22, 2012 9:21 am
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 52497

### Re: 10267 - WA! Previous topics's test data can output corre

Input: I 2 2 F 2 2 X S one.bmp X Correct output: one.bmp XX XX I rewrite "_F" function, but now it's RE Please help me!~ :( Thank you !~ /* Name: 10267 - Graphical Editor Copyright: MewCatcher Author: MewCatcher Date: 01-11-12 16:32 ReDo: 22/11/12 12:25 Description: */ #include <stdio.h> #include <...
Sat Nov 03, 2012 3:55 am
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 52497

### Re: 10267 - WA! Previous topics's test data can output corre

You've got a point again.
Let me have a close check!~
Thank you very much!~
Fri Nov 02, 2012 8:58 am
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 52497

### Re: 10267 - WA! Previous topics's test data can output corre

Thank you! You've got a point here! but I change into this, is still WA !~ :-? Please have a look, Thx!!! /* Name: 10267 - Graphical Editor Copyright: MewCatcher Author: MewCatcher Date: 01-11-12 16:32 Description: */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> /*...
Thu Nov 01, 2012 6:22 pm
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 52497

### 10267 - WA! Previous topics's test data can output correctly

I know it's not a good code at all, but I just want to know the very reason... :o Thanks everyone opening this page!~ :) Hope the kind you can help me!~ :D P.S. in "_F" function: I used a stupid way - Scanning from the given element to the edge loop for 10 times. e.g. ??? ????? ???? ?- Judge; ?- Ce...
Wed Oct 31, 2012 11:39 am
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 57692

### Re: 10035 Runtime Error!!! I tried a lot and get right answe

God! You!~
Two tiny excellent answers make perfect!~
Thank you !!! ^_^
Wed Oct 31, 2012 8:47 am
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 67830

### Re: 10189 Puzzle WA...I cannot find out the reason

Thank you very very much with my most appreciate!!!