## Search found 4 matches

Tue Sep 04, 2007 8:54 pm
Forum: Volume 9 (900-999)
Topic: 929 - Number Maze
Replies: 92
Views: 40429
I am going to crazy for this problem
My code passed all the data on this thread, and I could not find whether there is an error with my dijkstra+heap.
Sun Jul 01, 2007 4:53 pm
Forum: Volume 105 (10500-10599)
Topic: 10539 - Almost Prime Numbers
Replies: 44
Views: 24530

### Re: 10539TLE

I first calculate all the prime numbers between 1 and 10<sup>6</sup> then for every prime numbers below low and high, I add all the log below and high to the base of the prime number as a and b. Then b-a is the answer. But it is really inefficient, can anyone tell me some efficient algorithm. I wil...
Sat Dec 31, 2005 7:17 am
Forum: Volume 109 (10900-10999)
Topic: 10981 - String Morphing
Replies: 31
Views: 13549
thank you very much!
i know why i wrong
Sat Dec 31, 2005 5:27 am
Forum: Volume 109 (10900-10999)
Topic: 10981 - String Morphing
Replies: 31
Views: 13549
i also use DP but got many WA... here is my code could someone give me some tricky test data i am nearly crazy! #include <iostream> #include <cstring> #define N 120 using namespace std; char str[N],ans; int s[N][N][3],from[N][N][3],l[N][N][3],r[N][N][3],n; int table[3][3]={{1,1,0},{2,1,0},{0,2,2}}; ...