Search found 4 matches

by RuanZheng
Tue Sep 04, 2007 8:54 pm
Forum: Volume 9 (900-999)
Topic: 929 - Number Maze
Replies: 92
Views: 40055

I am going to crazy for this problem :evil:
My code passed all the data on this thread, and I could not find whether there is an error with my dijkstra+heap.
More test data, please.
by RuanZheng
Sun Jul 01, 2007 4:53 pm
Forum: Volume 105 (10500-10599)
Topic: 10539 - Almost Prime Numbers
Replies: 44
Views: 24340

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...
by RuanZheng
Sat Dec 31, 2005 7:17 am
Forum: Volume 109 (10900-10999)
Topic: 10981 - String Morphing
Replies: 31
Views: 13448

thank you very much!
i know why i wrong
by RuanZheng
Sat Dec 31, 2005 5:27 am
Forum: Volume 109 (10900-10999)
Topic: 10981 - String Morphing
Replies: 31
Views: 13448

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}}; ...

Go to advanced search