Блог пользователя hexor

Автор hexor, 9 лет назад, По-английски

Can someone send me some document or code for "Suffix Array O(N) implementation" ?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится

Автор hexor, 9 лет назад, По-английски

Can someone give me some hard treap problem?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +7
  • Проголосовать: не нравится

Автор hexor, 9 лет назад, По-английски

I push OK("Tamam"). But I don't believe Santa Claus. What can I do??? Help me!!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +17
  • Проголосовать: не нравится

Автор hexor, 10 лет назад, По-английски

Turkish Olympiad in Informatics start in one hour. T.O.I's some contestants are in this link.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +14
  • Проголосовать: не нравится

Автор hexor, 10 лет назад, По-английски

What is the difference between g++ and c++ command in ubuntu terminal?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +9
  • Проголосовать: не нравится

Автор hexor, 10 лет назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится

Автор hexor, 10 лет назад, По-английски

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.

  • We assume equation_1.b > equation_2.b
  • lcm -> least common multiplier
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 any solution for equation_1 and equation_2, also there is a solution for i<=KKK-1.
  • We try all possible i values and we get a x value for equation_1. Then we check if x equals to equation_2.b+equation_2.a .
  • If this condition is true, we find a x value. // x = i*equation_1.b+equation_1.a(mod LCM)
  • If there is no x value, that means solution doesn't exist.

This algorithm's complexity is O( max( equation_i.b )*n )

Полный текст и комментарии »

  • Проголосовать: нравится
  • +35
  • Проголосовать: не нравится

Автор hexor, 10 лет назад, По-английски

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."

Полный текст и комментарии »

  • Проголосовать: нравится
  • +34
  • Проголосовать: не нравится

Автор hexor, 10 лет назад, По-английски

Where can I find English solution for Polish Olympiad in Informatics?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится

Автор hexor, 10 лет назад, По-английски

What can I calculate N! for N<=10^9?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится

Автор hexor, 10 лет назад, По-английски

if we know log(a) and log(b) how we can find log(a+b) approximately to real value?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится

Автор hexor, 10 лет назад, По-английски

Is there any website which we can submit all or most of IOI problems?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +10
  • Проголосовать: не нравится

Автор hexor, 11 лет назад, По-английски

What is the Max Flows algorithm which name is Ford Fulkerson time complexity on bipartite graph?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

Автор hexor, 11 лет назад, По-английски

Can you give me a some trick for xor( exclusive or ) operation?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +17
  • Проголосовать: не нравится