Good point. Usual integer is not big enough. I didn't think of this at first and then worried I had to use my bignum routines. It was close but C can manage.
Biggest test case
1
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Answer
1152921504606846975
8 bytes are needed to store ...
Search found 22 matches
- Fri May 12, 2006 7:54 pm
- Forum: Volume 106 (10600-10699)
- Topic: 10617 - Again Palindrome
- Replies: 12
- Views: 7324
- Fri May 12, 2006 5:44 pm
- Forum: Volume 106 (10600-10699)
- Topic: 10617 - Again Palindrome
- Replies: 12
- Views: 7324
- Wed Nov 23, 2005 4:03 pm
- Forum: Volume 3 (300-399)
- Topic: 361 - Cops and Robbers
- Replies: 50
- Views: 22234
''Can you post some I/O please.... ''
I have lost touch with this problem so I don't remember what situations are crucial. But I have my program to test-run input if you are unsure what the correct answer should be. (If I can get it to compile again, seems to be problems with using std with the new ...
I have lost touch with this problem so I don't remember what situations are crucial. But I have my program to test-run input if you are unsure what the correct answer should be. (If I can get it to compile again, seems to be problems with using std with the new ...
- Sat Nov 19, 2005 11:21 pm
- Forum: Volume 3 (300-399)
- Topic: 361 - Cops and Robbers
- Replies: 50
- Views: 22234
>> Why the second case is 'safe'??Shouldn't it be 'robbed'??....
Yes, it should be 'robbed'. Quite right of you. It is very shameful of me to put out incorrect test data. Feel free to repost the entire set with correct answer if you like.
BTW, I got quite a lot of presents. Especially a warm, red ...
Yes, it should be 'robbed'. Quite right of you. It is very shameful of me to put out incorrect test data. Feel free to repost the entire set with correct answer if you like.
BTW, I got quite a lot of presents. Especially a warm, red ...
- Fri Nov 18, 2005 6:13 am
- Forum: Off topic (General chit-chat)
- Topic: How many language do you know?
- Replies: 32
- Views: 18950
- Fri Nov 18, 2005 4:30 am
- Forum: Volume 3 (300-399)
- Topic: 361 - Cops and Robbers
- Replies: 50
- Views: 22234
Sorry about the delay,
but we seem to have so fundamentally different opinions on triangles I had to go read the problem specificaton and a math book or two. I am very weak at debating so I'll try Socrates' method of reasoning on your line until we run into contradictions, or in this case, ugliness ...
but we seem to have so fundamentally different opinions on triangles I had to go read the problem specificaton and a math book or two. I am very weak at debating so I'll try Socrates' method of reasoning on your line until we run into contradictions, or in this case, ugliness ...
- Wed Nov 16, 2005 5:45 pm
- Forum: Volume 3 (300-399)
- Topic: 361 - Cops and Robbers
- Replies: 50
- Views: 22234
Jan,
very clever of you to think of the triangle inequality, the only criteria for a triangle. However, you have it wrong! The sum of any two sides must be greater than or equal to the third. We simply must allow for triangles with no area. (0,0) - (0,0) - (0,0) is indeed a triangle. The only point ...
very clever of you to think of the triangle inequality, the only criteria for a triangle. However, you have it wrong! The sum of any two sides must be greater than or equal to the third. We simply must allow for triangles with no area. (0,0) - (0,0) - (0,0) is indeed a triangle. The only point ...
- Mon May 09, 2005 7:56 pm
- Forum: Algorithms
- Topic: BigInteger
- Replies: 10
- Views: 4057
- Mon Dec 13, 2004 9:14 pm
- Forum: Volume 1 (100-199)
- Topic: 193 - Graph Coloring
- Replies: 93
- Views: 36351
- Fri Dec 10, 2004 10:41 pm
- Forum: Algorithms
- Topic: BigInteger
- Replies: 10
- Views: 4057
- Fri Dec 10, 2004 5:37 pm
- Forum: Volume 2 (200-299)
- Topic: 254 - Towers of Hanoi
- Replies: 39
- Views: 20525
Got AC when I reversed the peg order. Example input is
not decisive in this matter. 100 1 should of course give
99 1 0 and not 99 0 1.
Correct output for the input above is:
not decisive in this matter. 100 1 should of course give
99 1 0 and not 99 0 1.
Correct output for the input above is:
Code: Select all
1 1 1
62 1 1
4 2 2
0 0 100
99 1 0
2 18 16
7 6 10
27 31 22
11 31 25
43 26 30
26 26 36
- Fri Dec 10, 2004 1:50 am
- Forum: Volume 2 (200-299)
- Topic: 254 - Towers of Hanoi
- Replies: 39
- Views: 20525
Test data needed
- deleted -
- Fri Dec 10, 2004 1:49 am
- Forum: Volume 2 (200-299)
- Topic: 254 - Towers of Hanoi
- Replies: 39
- Views: 20525
Test data needed
Could some merciful soul please post the result of this indata:
3 5
64 2
8 45
100 1267650600228229401496703205375
100 1
36 23478162346434234
23 231234
80 398573924759238475987234
67 2349302402348238482342348
99 3895732987529387459237955432
88 747328293948729334241100234
0 0
I get
1 1 1
62 1 1 ...
3 5
64 2
8 45
100 1267650600228229401496703205375
100 1
36 23478162346434234
23 231234
80 398573924759238475987234
67 2349302402348238482342348
99 3895732987529387459237955432
88 747328293948729334241100234
0 0
I get
1 1 1
62 1 1 ...
- Thu Dec 02, 2004 3:22 am
- Forum: Volume 2 (200-299)
- Topic: 271 - Simply Syntax
- Replies: 46
- Views: 19796
- Tue Nov 16, 2004 6:41 am
- Forum: Volume 3 (300-399)
- Topic: 361 - Cops and Robbers
- Replies: 50
- Views: 22234