Search found 15 matches

by Ronald29
Fri May 27, 2005 5:00 am
Forum: Volume 1 (100-199)
Topic: 108 - Maximum Sum
Replies: 233
Views: 22801

how if all the number in the array is negative?
your program will print 0 because you skip all the number in the array right?
by Ronald29
Thu May 19, 2005 3:59 am
Forum: C++
Topic: Watch this simple program. What happens?
Replies: 8
Views: 3186

You're right misof.
Thanks for the info.
:D
by Ronald29
Wed May 18, 2005 10:02 am
Forum: C
Topic: How should i determine end of inputs
Replies: 16
Views: 6712

sorry, my mistake...
:D
by Ronald29
Wed May 18, 2005 6:07 am
Forum: C
Topic: How should i determine end of inputs
Replies: 16
Views: 6712

that's exactly what i'm trying to do. I don't want the code to be run in the OJ because the file operation is prohibited, isn't it? you will get Restricted Function if you use the file operation function. (that's what i know). but i want to open from file and write to file to test the code in my com...
by Ronald29
Wed May 18, 2005 5:54 am
Forum: C++
Topic: Watch this simple program. What happens?
Replies: 8
Views: 3186

hmmm, maybe my explanation is confusing or even wrong, but i have a simple example the usage of fflush(stdin). for example, this code. the code wants to receive 2 input. the second scanf() isn't work. to make it work, u can use fflush(stdin) after the first input. #include <stdio.h> void main() { ch...
by Ronald29
Tue May 17, 2005 5:48 am
Forum: C++
Topic: Watch this simple program. What happens?
Replies: 8
Views: 3186

ImLazy, cin can do just like scanf. in your program, the other cin don't work because the enter key that you press after the 'ab' input. the other cin will read the enter key. that's because the enter key is still in the input buffer. If you want to make the other cin works, first, you must clear th...
by Ronald29
Tue May 17, 2005 5:32 am
Forum: C
Topic: How should i determine end of inputs
Replies: 16
Views: 6712

oh, i see, u prefer to fgets because it has the second parameter so the buffer will not overflow. you're right, fgets is safer than gets. but when i submit my code i use this: #ifndef ONLINE_JUDGE freopen("file.in", "r", stdin); freopen("file.out", "w", stdout); #endif then i use the standard input ...
by Ronald29
Mon May 16, 2005 8:27 am
Forum: C
Topic: what data type is fast ?
Replies: 8
Views: 3598

mohiul, do you want to access a variable in bit? you can use the bit wise operation, use the '&' operator
by Ronald29
Mon May 16, 2005 8:23 am
Forum: C
Topic: what data type is fast ?
Replies: 8
Views: 3598

mohiul, do you want to access a variable in bit? you can use the bit wise operation, use the '&' operator
by Ronald29
Mon May 16, 2005 8:11 am
Forum: C
Topic: How should i determine end of inputs
Replies: 16
Views: 6712

gets is considered dangerous. fgets should be used instead. <-

if you use freopen, then the gets function will do the same as fgets
by Ronald29
Thu Jul 03, 2003 3:00 pm
Forum: Volume 5 (500-599)
Topic: 594 - One Little, Two Little, Three Little Endians
Replies: 46
Views: 13423

Thx, I've already got AC
by Ronald29
Thu Jul 03, 2003 3:00 pm
Forum: Volume 5 (500-599)
Topic: 594 - One Little, Two Little, Three Little Endians
Replies: 46
Views: 13423

Thx, I already have AC
by Ronald29
Wed May 28, 2003 2:12 pm
Forum: Volume 5 (500-599)
Topic: 594 - One Little, Two Little, Three Little Endians
Replies: 46
Views: 13423

Here's a great hint for you, USE UNION.
Hope that help... :D
by Ronald29
Sun May 25, 2003 2:31 pm
Forum: Volume 5 (500-599)
Topic: 529 - Addition Chains
Replies: 32
Views: 4060

Find all posibility using recursive. to find the minimum, try to find it on each level, don't go to the next level of recursive if all value in one level not checked. It's the most simple algorithm I can found, if anyone know another algorithm please let me know. thx, hope this can help you...tonyk ...
by Ronald29
Sun May 25, 2003 2:11 pm
Forum: Volume 5 (500-599)
Topic: 594 - One Little, Two Little, Three Little Endians
Replies: 46
Views: 13423

594 - Test Case please

I need a test case for problem 594, I'm new here, so please help me, cause I get WA. but my program works fine with the sample input, thx...

Go to advanced search