## Search found 23 matches

Mon Aug 23, 2004 3:59 pm
Forum: Volume 106 (10600-10699)
Topic: 10681 - Teobaldo's Trip
Replies: 44
Views: 12377
I use memoization / dp approach. Here is some clue

memo[v][d]
can i reach the destination if i'm vertex no v and i have d days left.

I'm sure you can figure out the rest

regards,
stephanus
Fri Aug 06, 2004 4:37 am
Forum: Volume 104 (10400-10499)
Topic: 10479 - The Hendrie Sequence
Replies: 14
Views: 5554
I don't understand the problem... The Hendrie Sequence ``H" is a self-describing sequence defined as follows: H(1) = 0 If we expand every number x in H to a subsequence containing x 0's followed by the number x + 1, the resulting sequence is still H (without its first element). Thus, the first few e...
Fri Jul 09, 2004 5:29 pm
Forum: Volume 106 (10600-10699)
Topic: 10674 - Tangents
Replies: 13
Views: 5074

### 10674 - Tangents - Which one is correct?

Hi, Anyone has test data, i try everything that I could, but WA, don't know what's wrong. Btw what's the output of INPUT -10 30 10 10 20 10 MY FRIEND'S ACC OUTPUT 4 -14.47214 21.05573 5.52786 11.05573 22.36068 -5.52786 38.94427 14.47214 28.94427 22.36068 -4.00000 22.00000 4.00000 28.00000 10.00000 -...
Fri Jul 02, 2004 12:42 am
Forum: Volume 105 (10500-10599)
Topic: 10547 - Hidden Truth in Recurrence
Replies: 7
Views: 3049
how can that recurrence only be k^n mod 10^t?
thanx

regards,
stephanus
Fri Jun 11, 2004 9:09 am
Forum: Off topic (General chit-chat)
Topic: New site with UVA Hints + UVA Problem Ranking
Replies: 4
Views: 2670

### New site with UVA Hints + UVA Problem Ranking

Hi all, New site with UVA Hints + UVA Problem Ranking. You are cordially invited to HarvestSoft http://www.harvestsoft.net About UVA Hints http://www.harvestsoft.net/uva.php Provides UVA Hints if you get stucked. Now it's not too many. But it will be updated regularly. About UVA Problem Ranking http...
Wed May 26, 2004 2:05 pm
Forum: Volume 106 (10600-10699)
Topic: 10603 - Fill
Replies: 19
Views: 8949
I got ACC using BFS, but I'm still confused why I got WA using DFS + memoization :-? can u help? thx regards, stephanus [cpp] /* @ Problem : Fill @ UVa id : 10603 @ Lang. : C++ @ Author : Stephanus @ Date : 26 May 2004 */ #include <iostream> #include <map> using namespace std; #define f(a,b,c) (1000...
Tue May 25, 2004 8:51 am
Forum: Volume 106 (10600-10699)
Topic: 10603 - Fill
Replies: 19
Views: 8949

### 10603 - Fill

Hi,
I got WA for this. I use memoization to solve. But WA
anyone got test cases? and what the answer for this?

Input

5
12 23 42 14
12 53 75 23
56 23 34 2
23 55 72 25
124 86 173 84

Output

166 14
728 23
0 0
23 23
1012 77
Fri May 14, 2004 5:14 am
Forum: Volume 106 (10600-10699)
Topic: 10644 - Floor Tiles
Replies: 25
Views: 11483
It looks somewhat like a 2 dimensional prime sieve, but now we're after the non-primes... can you give more hint? 1. Is there any mathematical explanation why we can only have 2 building blocks, i.e 2x3 and 5x9? 2. how do you know that mxn rectangle can be built with those building blocks(2x3,3x2,9...
Tue May 11, 2004 1:46 pm
Forum: Volume 106 (10600-10699)
Topic: 10650 - Determinate Prime
Replies: 67
Views: 25352
For those who got WA and have followed every hint above this msg, I just find something and got ACC 1. I swap x and y if x > y 2. There are 162 sequences from 0 to 32000 3. Adrian Kugel's Hint Try this test case 251 263 251 269 257 269 before my program output 251 257 263 269 257 263 269 but should ...
Thu May 06, 2004 4:29 am
Forum: Volume 106 (10600-10699)
Topic: 10620 - A Flea on a Chessboard
Replies: 10
Views: 5496
I finally got AC. :D. It works with my formula for the number of steps, thought I wrote it wrong in the previous post. It is in fact lcm( S/gcd(S,dx), S/gcd(S,dy)). Can you tell what's the logic behind the formula? I'm quite weak in number theory.. S / gcd(S,dx) --> what does this means? S / gcd(S,...
Thu Jan 01, 2004 10:47 am
Forum: Volume 105 (10500-10599)
Topic: 10574 - Counting Rectangles
Replies: 23
Views: 9396
Thanks. Finally got AC.
Wed Dec 31, 2003 8:06 am
Forum: Volume 105 (10500-10599)
Topic: 10593 - Kites
Replies: 18
Views: 6835
before preceeding to counting the diamond shape..
I rewrite my code and write only the code for checking the square shape only.

I have used the area and matrix[j] (described above to prevent double checking) to compute the square shape only! But I still got TLE..
confused ...

Tue Dec 30, 2003 12:57 pm
Forum: Volume 105 (10500-10599)
Topic: 10593 - Kites
Replies: 18
Views: 6835
I think I have done it by using this loop. I count the square with the area. For the kite, first I check the area, if match then do the grid by grid check. But I still got TLE. Any other idea ? [cpp]for (size=2; size<=nsize; size++) for (j=1; j<=nsize - size + 1; j++) for (i=1; i<=nsize - size + 1; ...
Tue Dec 30, 2003 6:35 am
Forum: Volume 105 (10500-10599)
Topic: 10593 - Kites
Replies: 18
Views: 6835

### 10593

Any idea how to overcome this probs? I use naive brute force O(n^3) for checking the square and O(n^4) for checking the kite and got TLE.
Mon Dec 29, 2003 5:42 am
Forum: Volume 105 (10500-10599)
Topic: 10574 - Counting Rectangles
Replies: 23
Views: 9396
Please help.. I don't know why I still got TLE.. I've used the method (normalizing) above.. :cry: thanx [cpp]// Problem : Counting Rectangles // UVA id : 10574 // Lang. : C++ // Author : Stephanus Indra // Date : 29 December 2003 #include <iostream> #include <cstdlib> #define BITSPERWORD 32 #define ...