Search found 325 matches

by yiuyuho
Sun Jan 12, 2003 12:01 pm
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 13181

120 Stacks of Flapjacks

I just read that Bill Gate actually did research on this problem and proved the complexity of the algorithm f(n) as the number of flips, n for the number of disks is (15/14)n<=f(n)<=(5n+5)/3

Does anyone know about this? I would like to have some further information on it.

Thanks
by yiuyuho
Tue Dec 10, 2002 2:28 am
Forum: Other words
Topic: The Online Judge status is down..
Replies: 0
Views: 798

The Online Judge status is down..

How long it take to be fixed?
by yiuyuho
Thu Dec 05, 2002 5:56 am
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 20937

clearify

clearify:

what's the definition for each M[j] in your matrix?
by yiuyuho
Wed Dec 04, 2002 11:01 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 181693

Wow

First, your program is way too long for p100, even it is written in java, second I think the judge require the class name to be named "Main" not "Problem 1" you can check the judges re4quirement on java submission to make sure the format is correct. Third, I think all "System" calls are prohibited f...
by yiuyuho
Sun Dec 01, 2002 1:02 am
Forum: C++
Topic: Strange pointers
Replies: 0
Views: 1394

Strange pointers

[cpp] #include <iostream.h> struct list { int x[20]; list *next; }; int f(list *k,list *p) { for(int i=0;i<20;i++) if(p->x !=k->x ) { return k->x -p->x ; } return 0; } void main() { list *k=new list; list *p=new list; k->next=0; p->next=0; for(int i=0;i<20;i++) { k->x =1; p->x =1; } p->x[16]=10; cou...
by yiuyuho
Sat Nov 30, 2002 1:40 am
Forum: Volume 1 (100-199)
Topic: 138 - Street Numbers
Replies: 93
Views: 6970

check :n^2=m*(m+1)/2

check that for all your 10 outputs n,m
that n^2=m*(m+1)/2

1 1 should not be an output since in the problem, she was able to "walk pass" some houses, if 1 1 that she can'y "pass" any house
by yiuyuho
Fri Oct 25, 2002 12:54 am
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 38103

well

Then you mught need to change grid[ar+1][ac]>0 and corresponding checkings to >=0 since a 0 is also a block.
by yiuyuho
Wed Oct 23, 2002 7:38 am
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 38103

There are several places I don't quite get in your code
for instance, why are you printing from 0 instead of from 1?
by yiuyuho
Wed Oct 23, 2002 6:26 am
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 38103

this rather

Any command in which a = b or in which
a and b are in the same stack
of blocks is an illegal command. All illegal commands should be ignored and should have no affect on the configuration of blocks.
by yiuyuho
Wed Oct 23, 2002 6:25 am
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 38103

read the problem

Read the problem, it says:
You may assume that all commands will be of the form specified above. There will be no syntactically incorrect commands.

in the input, so in your case you should not do anything to the blocks

Go to advanced search