Can someone send me some document or code for "Suffix Array O(N) implementation" ?
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3821 |
3 | Benq | 3736 |
4 | Radewoosh | 3631 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3388 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 161 |
5 | -is-this-fft- | 158 |
6 | awoo | 157 |
7 | adamant | 156 |
8 | TheScrasse | 154 |
8 | nor | 154 |
10 | Dominater069 | 153 |
Can someone send me some document or code for "Suffix Array O(N) implementation" ?
Can someone give me some hard treap problem?
I push OK("Tamam"). But I don't believe Santa Claus. What can I do??? Help me!!
Turkish Olympiad in Informatics start in one hour. T.O.I's some contestants are in this link.
What is the difference between g++ and c++ command in ubuntu terminal?
N trees were planted on a side of a long straight road. In the other side there are farms, industries etc. The market price of these trees is huge now. Some greedy people want to cut these trees down and want to be millionaires. They got the permission from the Govt. decoying that they would develop the area. You published this fact in the web and millions raised their voices against this conspiracy.
You gathered the information of the trees and found the type and height of all trees. For simplicity, you represented them as integers. You want to find the overall price of the trees. To find the price, the following method is used.
1) The trees are first partitioned into groups with the condition that, types of two trees will not be similar in a group. A group can only be formed using contiguous trees.
2) The price of a group is equal to the height of the tallest tree.
3) The overall price is the summation of prices of all groups.
Now you want to find the minimum possible price of the trees in this scheme and show the Govt. that even though you calculated the minimum possible price, it's actually huge.
Can anyone help me?
N(1≤N≤2 * 105)
links: Lightoj 1415 and UVa 12440
I found a new theorem and I called it "My Remainder Theorem". My theorem finds similar thing with "Chinese Remainder Theorem". Maybe it has been founded before. If you heard this theorem before, please tell me.
Problem :
We have N equation.
x = equation_1.a ( mod equation_1.b )
x = equation_2.a ( mod equation_2.b )
.
.
.
x = equation_n.a ( mod equation_n.b )
(1<=i<=n) equation_i.b can be not a prime number. ( difference between my M.R.T. and C.R.T. )
We use a function which can do merge two equation and create a new equation. ( Let's call this function "merge" )
For example we have 3 equations. We'll solve this problem.
ans1 = merge( equation_1,equation_2 ); ans2 = merge( a,equation_3 );
Our answer is ans2.a.
Let's look at to "merge" function.
merge( equation_1,equation_2 ){
LCM = lcm(equation_1.b,equation_2.b)
KKK = LCM/equation_1.b
for i=0 to KKK-1
if( ( i*equation_1.b + equation_1.a ) mod equation_2.b == equation_2.a )
return answer = make_equation( LCM , i*equation_1.b+equation_1.a ) // x = i*equation_1.b+equation_1.a(mod LCM)
return "NO SOLUTION"
}
If there is no x value, that means solution doesn't exist.
This algorithm's complexity is O( max( equation_i.b )*n )
I want the ask aquestion. "You have a DAG(directed acyclic graph) which is the contain n(1<=n<=300.000) nod. How many nodes can you go if you will start nod i(1<=i<=n). You must find answer for all nod."
Where can I find English solution for Polish Olympiad in Informatics?
What can I calculate N! for N<=10^9?
if we know log(a) and log(b) how we can find log(a+b) approximately to real value?
Is there any website which we can submit all or most of IOI problems?
What is the Max Flows algorithm which name is Ford Fulkerson time complexity on bipartite graph?
Can you give me a some trick for xor( exclusive or ) operation?
Name |
---|