Search found 26 matches

by outsbook
Tue Jul 24, 2012 7:04 pm
Forum: Volume 100 (10000-10099)
Topic: 10070 - Leap Year or Not Leap Year and ...
Replies: 233
Views: 51259

Re: 10070 why wa?

Print blank line between two cases. like this Input: 330000 330000 Output: This is leap year. This is huluculu festival year. This is bulukulu festival year. This is leap year. This is huluculu festival year. This is bulukulu festival year. But your output: This is leap year. This is huluculu festiv...
by outsbook
Sun Jul 15, 2012 7:40 pm
Forum: Volume 119 (11900-11999)
Topic: 11957 - Checkers
Replies: 4
Views: 1786

Re: 11957 - Checkers

Try the input Input: 3 10 .......... .......... .......... .......... .......... .......... .......... .......... .......... ....W..... 20 .................... .................... .................... .................... .................... .................... .................... .................
by outsbook
Sun Jul 15, 2012 4:33 pm
Forum: Volume 117 (11700-11799)
Topic: 11752 - The Super Powers
Replies: 6
Views: 3549

Re: 11752 - The Super Powers

For check Overflow You can use int bit = 64; int power= ceil(bit / (log(powerBase)/log(2))); Example: 1. If powerBase=3 then power=41 (i.e. the maximum power of 3 is 40, 3^40 < 2^64-1(unsigned long long range)). 3^41 is overflow at 64 bit integer. 2. If powerBase=5 then power=28 (i.e. the maximum po...
by outsbook
Mon Jul 09, 2012 5:00 pm
Forum: Volume 7 (700-799)
Topic: 763 - Fibinary Numbers
Replies: 40
Views: 15372

Re: 763 - Fibinary Numbers

Try this Input: 100000001010001010001010001000101000101000101000010000000101000101000101000100010100010100010100001 100000001010001010001010001000101000101000101000010000000101000101000101000100010100010100010100001 Output: 1001000100001001001001001000100100100100100100010100100010000100100100100100...
by outsbook
Mon Jul 09, 2012 4:52 pm
Forum: Volume 12 (1200-1299)
Topic: 1258 - Nowhere Money
Replies: 0
Views: 1803

1258 - Nowhere Money

I got 20 times Presentation Error before AC. :( :( In output specification "The second line is a series of slot sizes (in descending order) separated by spaces" Input: 1 10 1000000 My Output: 1 1 1 # 10 5@2 8@2 # 1000000 29@25@23@11@9 832040@121393@46368@144@55 # Note: Here # represent the blank lin...
by outsbook
Fri Jul 06, 2012 2:27 am
Forum: Volume 110 (11000-11099)
Topic: 11058 - Encoding
Replies: 28
Views: 14840

Re: 11058 - Encoding

I explain the sample input output, then the problem is very clear for understand. Original string: ufrn a replace by: t b replace by: o c replace by: w d replace by: k e replace by: q f replace by: z g replace by: f h replace by: n i replace by: y j replace by: i k replace by: c l replace by: m m re...
by outsbook
Mon Jan 09, 2012 9:26 pm
Forum: Volume 113 (11300-11399)
Topic: 11385 - Da Vinci Code
Replies: 70
Views: 22534

11385 - Da Vinci Code

Try this Input: 10 5 1 2 3 5 8 A 5 8 5 3 2 1 A 5 8 5 3 2 1 abcd 5 8 5 3 2 1 ABCDEFG 5 5 4 3 2 1 ABCDE 5 5 4 3 2 1 A a B b C c D d E e 1 13 ABCD 1 1836311903 aaaaaaaaaabbbbbbbbbbcccccccccccDdddddddddddddddddddd 1 4 ABC 1 2 a Output: A#### ####A ##### EDCBA DCBA DCBA #####A ###########################...
by outsbook
Sun Jan 08, 2012 8:56 pm
Forum: Volume 124 (12400-12499)
Topic: 12406 - Help Dexter
Replies: 6
Views: 2701

Re: 12406 - Help Dexter

Remove Code After AC

I go WA For this test Case
Input:

Code: Select all

2
3 4
4 5
Output:

Code: Select all

Case 1: 112
Case 2: 2112
by outsbook
Sun Jan 08, 2012 8:48 pm
Forum: Volume 124 (12400-12499)
Topic: 12406 - Help Dexter
Replies: 6
Views: 2701

Re: 12406 - Help Dexter

Input: 153 1 1 2 1 2 2 3 1 3 2 3 3 4 1 4 2 4 3 4 4 5 1 5 2 5 3 5 4 5 5 6 1 6 2 6 3 6 4 6 5 6 6 7 1 7 2 7 3 7 4 7 5 7 6 7 7 8 1 8 2 8 3 8 4 8 5 8 6 8 7 8 8 9 1 9 2 9 3 9 4 9 5 9 6 9 7 9 8 9 9 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 8 10 9 10 10 11 1 11 2 11 3 11 4 11 5 11 6 11 7 11 8 11 9 11 10 11 11 1...
by outsbook
Tue Jan 03, 2012 11:19 pm
Forum: Volume 1 (100-199)
Topic: 144 - Student Grants
Replies: 21
Views: 3395

144 - Student Grants

Read this line carefully " When the machine is switched on in the morning, with an empty output store, it immediately moves 1 coin into the output store. When that has been dispensed it will then move 2 coins, then 3, and so on until it reaches some preset limit k. It then recycles back to 1, then 2...
by outsbook
Mon Jan 02, 2012 12:05 pm
Forum: Volume 105 (10500-10599)
Topic: 10554 - Calories from Fat
Replies: 4
Views: 2653

10554 - Calories from Fat

For grams to Calories, you are given a rules that:

1g fat = 9 Calories,
1g protein = 4 Calories,
1g sugar = 4 Calories,
1g starch = 4 Calories,
1g alcohol = 7 Calories

I think now the problem is very easy. :D

Remember that use double for all calculation
by outsbook
Mon Dec 05, 2011 11:34 pm
Forum: Volume 101 (10100-10199)
Topic: 10102 - The path in the colored field
Replies: 34
Views: 12758

10102 - The path in the colored field

BFS problem Maximum length of M=100 For each location(x,y) you got four adjacency location 1.(x-1,y) 2.(x+1,y) 3.(x,y-1) 4.(x,y+1) When taking in the input, keep a list of all 1-nodes and all 3-nodes. For each 1-node, find the distance to the closest 3-node. distance=abs(1.x - 3.x) + abs(1.y - 3.y)....
by outsbook
Mon Dec 05, 2011 12:32 am
Forum: Volume 5 (500-599)
Topic: 571 - Jugs
Replies: 24
Views: 12442

571 - Jugs

BFS Problem Pouring rule: Pouring from one jug to the other stops when the first jug is empty or the second jug is full, whichever comes first. For example, if A has 5 gallons and B has 6 gallons and a capacity of 8, then pouring from A to B leaves B full and 3 gallons in A. 1. At first push to queu...
by outsbook
Mon Nov 28, 2011 11:37 pm
Forum: Volume 100 (10000-10099)
Topic: 10067 - Playing with Wheels
Replies: 62
Views: 23115

10067 - Playing with Wheels

BFS Problem I represent the 4 digit as integer i.e. if 4 digits are 0 2 0 1 then I represent is 201, or 1 2 3 1 represent 1231 At first pregenerate all adjacency for 0 to 9999 For each value you got 8 adjacency value Example If the 4 digit are 0 1 0 0 so, the value is 100 ---set n=value ---set m=n%1...
by outsbook
Mon Nov 28, 2011 4:57 pm
Forum: Volume 106 (10600-10699)
Topic: 10610 - Gopher and Hawks
Replies: 29
Views: 12429

10610 - Gopher and Hawks

BFS problem This is just a BFS problem with a bit of math. 1. Find all adjacency using this condition, consider two holes connected if the distance between them is less than or equal to v*m*60. 2. Run BFS on the gopher holes to destination hole. 3. If gopher reach to destination hole then print leng...

Go to advanced search