Search found 79 matches

by ec3_limz
Wed Sep 04, 2002 7:09 pm
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 27845

I do not understand your code. Can you use tags to format it so that it will be readable?
by ec3_limz
Wed Aug 28, 2002 12:04 pm
Forum: C
Topic: array functions
Replies: 4
Views: 2608

array functions

Hi.

How do I write a function that returns an array of integers in C? Preferably I do not have to use pointers.

Pls reply.

Regards,
ec3_limz
by ec3_limz
Tue Aug 13, 2002 1:19 pm
Forum: Volume 3 (300-399)
Topic: 374 - Big Mod
Replies: 79
Views: 12399

help me now

hey hey hey please help me There's something wrong with my recursion, but I can't see anything wrong. [cpp]#include <stdio.h> int number, mod; int recur(int exp) { if (exp == 0) return 1; int v = recur(exp / 2); v *= v; if (exp % 2 != 0) v *= number; v %= mod; return v; } int main() { int power; whi...
by ec3_limz
Mon Aug 12, 2002 6:19 pm
Forum: Volume 6 (600-699)
Topic: 694 - The Collatz Sequence
Replies: 46
Views: 16260

huh?

I used brute force all the way and got Accepted.

What's your algo?

Regards,
ec3_limz
by ec3_limz
Sun Aug 11, 2002 3:20 pm
Forum: Volume 3 (300-399)
Topic: 332 - Rational Numbers from Repeating Fractions
Replies: 83
Views: 20734

a few suggestions

1. try not to use double.

2. when you output, no need to output the numbers as 11 characters.
by ec3_limz
Sun Aug 04, 2002 7:12 pm
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 31974

Still got WA

Still got WA.... why? I had ensured that the Fibonacci numbers can be up to 2000 digits long. BTW, here is the updated code. [cpp]#include <stdio.h> int main() { const int billion = 1000000000; int fact[5001][200], index, start; int i, j; for (i = 0; i <= 5000; i++) for (j = 0; j < 200; j++) fact [j...
by ec3_limz
Mon Jul 29, 2002 12:15 pm
Forum: Other words
Topic: I can't submit my program through e_mail,why?
Replies: 5
Views: 2664

Neither can I

I also can't submit my solutions through e-mail. I submitted the same problem at least 4 times and when I checked the Judge status, my program was not there.

To all Judges, PLEASE FIX THE E-MAIL PROBLEM NOW!!!!!!

ec3_limz
by ec3_limz
Sun Jul 28, 2002 2:42 pm
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 31974

ACM 495: Why WA?

Got WA, but dunno whats wrong. My Algo: I used base 1000000000 integer arrays to store the Factorial numbers. Please help. [cpp]/* @JUDGE_ID: 18472KP 495 C++ */ #include <stdio.h> int main() { const int billion = 1000000000; int fact[5001][90], index, start; int i, j; for (i = 0; i <= 5000; i++) for...
by ec3_limz
Tue Jul 23, 2002 9:47 am
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 25984

accepted thx

Got accepted. Thanx a lot! :D
by ec3_limz
Mon Jul 22, 2002 1:08 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 189534

why you got compile error

Hello.

If you have submitted the code by e-mail, the end of source tag should be @end_of_source_code, or in upper case, not @end_of_source. Otherwise, the OJ will compile anything added in the e-mail after the code.

Try again. Good luck!
by ec3_limz
Mon Jul 22, 2002 12:59 pm
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 25984

hey hey hey, now help me please

The following code got a WA. Why? [cpp]#include <stdio.h> int main() { const int primes[25] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 }; int fact, factors[25], i, j; while (true) { for (i = 0; i < 25; i++) factors = 0; scanf("%d", &fact); if (...
by ec3_limz
Tue Jul 09, 2002 4:58 pm
Forum: Volume 6 (600-699)
Topic: 652 - Eight
Replies: 22
Views: 8239

BTW, please remember that this problem is a mutliple-input problem. Be careful. Good luck!

Regards,
lim z******
by ec3_limz
Tue Jul 09, 2002 4:57 pm
Forum: Volume 6 (600-699)
Topic: 652 - Eight
Replies: 22
Views: 8239

You MUST get a unique number for each state. Probably one of the hardest parts of the problem is to limit the number. Naturally, since there are 362880 different states, you want to number them 0 - 362879. Here's how: x 1 2 3 4 5 6 7 8 = state 0 x 1 2 3 4 5 6 8 7 = state 1 .... 1 2 3 4 5 6 7 8 x = s...
by ec3_limz
Tue Jul 09, 2002 4:49 pm
Forum: Volume 6 (600-699)
Topic: 636 - Squares (III)
Replies: 7
Views: 3499

[none]

BTW, are you allowed to use cin and cout for OJ? My friend said that OJ doesn't accept cin and cout as standard input and output streams.
by ec3_limz
Tue Jul 09, 2002 4:45 pm
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 36722

i think i understand why

Instead of outputting 1 backquote "`", you should output 2: "``".

That is what I see so far. Try it first.

Good luck!

Go to advanced search