Search found 21 matches

by mosaick2
Sat Sep 30, 2006 11:45 am
Forum: Volume 103 (10300-10399)
Topic: 10344 - 23 out of 5
Replies: 81
Views: 27773

Actually, Your algorithm is right, but...

Your Backtracking implementation is a little bad. I used the same algorithm and I also used the next_permutation. But, when I tested your program and mine. The count results that recall the function was like below. input => count result 1 1 1 1 1 => you: 324, me: 121 1 2 3 4 5 => you: 2948, me: 456 ...
by mosaick2
Wed Sep 27, 2006 12:14 pm
Forum: Volume 7 (700-799)
Topic: 755 - 487--3279
Replies: 115
Views: 29094

755. (487-3279). W.A.

Could you give me a tricky sample or advice?
I don't know what's wrong in my code.
Below my code.

Code: Select all

code removed after A.C.
Actually, My mistake is not to consider MULTISET input data.
by mosaick2
Wed Sep 13, 2006 4:52 am
Forum: Volume 2 (200-299)
Topic: 231 - Testing the CATCHER
Replies: 53
Views: 14673

and, You have to change the comparision condition.

432
423
2423
423
423
-1
Test it. Correct Answer is 4.
The missile can move forward.
by mosaick2
Sat Sep 02, 2006 4:27 am
Forum: Volume 3 (300-399)
Topic: 343 - What Base Is This?
Replies: 72
Views: 21675

I have changed my code, but...

Edit: Try to update the algorythm so one of the bases is always less than the other one, instead of checking every single case, given the input it is possible to figure out which of the 2 bases is supposed to be the lesser than the other. The OJ defines an ONLINE_JUDGE constant so you don't have to...
by mosaick2
Fri Sep 01, 2006 4:35 pm
Forum: Volume 3 (300-399)
Topic: 343 - What Base Is This?
Replies: 72
Views: 21675

343(What Base Is This?), TLE. I don't know the reason.

I don't know what's problem in my code.
Frankly, I think my algorithm is fast enough. But, I got TLE. I don't know the reason. Who can advice me?
Below my code.

Code: Select all

Code Removed
by mosaick2
Wed Aug 30, 2006 12:38 pm
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 13928

About Input data...

Actually, We don't need to consider about the same number inputs.
The problem defined like below.
... All pancakes in a stack have different diameters. ...
So I made a algorithm based on the problem. and I got A.C.

Frankly, If I input the same numbers in my program, It's crazy.. :o
by mosaick2
Mon Aug 28, 2006 3:22 am
Forum: Volume 4 (400-499)
Topic: 443 - Humble Numbers
Replies: 82
Views: 7433

I can just give a tips.

If your answer is correct, but you had given a TLE from judge. You can use a kind of technic that store your humble numbers in memory. That means precalculate the humble numbers(it's just total 5842). I hope it helps you. ps. anyway, your answer printing is wrong. you have to consider about the numb...
by mosaick2
Sat Aug 19, 2006 2:13 am
Forum: Volume 1 (100-199)
Topic: 118 - Mutant Flatworld Explorers
Replies: 68
Views: 9499

I got the idea. I was misunderstood..*_*

Sample Input 5 3 1 1 E RFRFRFRF 3 2 N FRRFLLFFRRFLL <-- Second Test 0 3 W LLFFFLFLFL <-- Next Test Sample Output 1 1 E 3 3 N LOST 2 3 S Frankly, I think in the second test, old robot will be replaced by new robot at last grid position just soon after the old robot was disappeared. So, I can't under...
by mosaick2
Fri Aug 18, 2006 5:02 am
Forum: Volume 1 (100-199)
Topic: 118 - Mutant Flatworld Explorers
Replies: 68
Views: 9499

118(Mutant Flatworld Explorers), I can't understand the rule

Who can explain me about this problem?
I can't understand a sample below.

sample
3 2 N
FRRFLLFFRRFLL
Why the sample's answer is
3 3 N LOST
Could you simulate it?

Thankx, friends~ : )
by mosaick2
Wed Aug 16, 2006 2:02 pm
Forum: Volume 2 (200-299)
Topic: 227 - Puzzle
Replies: 56
Views: 9520

227(Puzzle), W.A. Who know about this problem?

Who know this problem? I searched articles related with this problem. And I applied some rule that I couldn't be realized from the articles. But, I can't get A.C yet. Who CAN explain what's wrong in my program or logic? Thankx, friends~ #include <iostream> //#include <fstream> #include <string> #inc...
by mosaick2
Tue Aug 15, 2006 3:46 pm
Forum: Volume 4 (400-499)
Topic: 483 - Word Scramble
Replies: 122
Views: 20476

483. W.A, Who can advice me?

I have tested all sample that I could find below articles. And I have passed the testcases. BUT, online-judge give me W.A(Wrong Answer) Frankly, I believe online-judge. So I think I have a fault in my program. Who can give advice me aboue this? Thankx, your help. : ) #include <string> #include <cstr...
by mosaick2
Tue Aug 15, 2006 9:15 am
Forum: Volume 4 (400-499)
Topic: 424 - Integer Inquiry
Replies: 96
Views: 20428

424. Compile Error. Help me~

My code is a little long. but, Actually, I have already written my BigInteger class. So, I just want to reuse my class. My program is well-working at VC and G++. However, online-judge give me C.E(compile error). Who know about this problem? Give me your idea, plz... deleted ---- Thankx, bro : )
by mosaick2
Wed Aug 09, 2006 5:04 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 51171

102, WA. Help me.

I don't know what's problem in my code. Who can advice me? (Actually, I have passed many testcase that I found below threads.) I'll appreciate your help. ------------------------------------------------------------------------------ I got A.C Actually, My mistake is if-statement's position. *wrong c...
by mosaick2
Thu Apr 13, 2006 5:35 am
Forum: Volume 100 (10000-10099)
Topic: 10050 - Hartals
Replies: 59
Views: 19298

Re: 10050 - Hartals - I got RE.

I got A.C. But, I have just changed my Clear part. I used for-loop to clear array instead of memset function. I can't understand why the memset function occur Runtime error. Who can explain me about it? You define 'day' as an array of bools yet you use sizeof(int) instead of sizeof(bool) when you s...
by mosaick2
Wed Apr 12, 2006 12:38 pm
Forum: Volume 100 (10000-10099)
Topic: 10050 - Hartals
Replies: 59
Views: 19298

Re: 10050 - Hartals - I got RE.

I got A.C.
But, I have just changed my Clear part.
I used for-loop to clear array instead of memset function.
I can't understand why the memset function occur Runtime error.
Who can explain me about it?

Go to advanced search