Comments
On codeKNIGHTTocoder SRM-537, 2 months ago
+13

Nope. Your post was written in russian.

I like SP too :)

On codeKNIGHTTocoder SRM-537, 2 months ago
+3

And new MLP episode after challenge phase! YAY!

UPD. mistaken, it was at the same time as SRM :(

i don’t know what’s wrong with that test, but i think there is another WA test:

abcde cde cd

correct answer is 0

“Substrings are different if and only if their contents aren’t equal, their positions of occurence don’t matter.” You are comparing length of this substrings. Use hachcodes.

+18

They just don’t like google ;) Also, there are people who love -’s.

Forget it, contribution is not important, a good post is more valuable for people than all of these contribution ratings.

TL 22
Comparer checks distance, not the vertex. For example, pairs (fst=1,snd=5) and (fst=1,snd=6) are equal. SortedList uses comparer and removes first element with same "fst" value.
I fixed it and got TL 22.

Grundy function usually takes small values. Initilize vector M[v] with 10 elements and then enlarge it if necessary.
On nataliaCodeforces Round #100, 4 months ago
+8
Your solution fails if R/2 < r < R.
O(n*n) if all points belong to the hull.
6
0 10
10 0
20 10
10 20
1 7
6 1

all points in the hull.
6
0 4
4 0
8 4
4 8
1 2
1 1

1 2 is not in the hull.
On paladin8Z Algorithm, 6 months ago
0
+1
I wonder, if there is any person on codeforeces who has a relative with access to the military archives. I don't know where to search, i think that social networks are useless - too many people with the same last name.

It's for c=0;

in other cases it will fail.
You should use max(abs(x-c/b), abs(y)), for example )

So you know maxflow algorithm.
1. Find the path
2. Increase flow through it
3. Repeat

For a weighted graph:
1. Find the SHORTEST path
...

Don't forget about back edges - they have negative weight.

Is there a problem with understanding how to solve biparate a matching without weights using maxflow?
For me maxflow is easier, for you it might be hungarian. Anyway , maxflow is more useful, there are many problems that can be solved by it.
Do you know how to solve biparate matching without weights with maxflow algorithm?
On EvilinComplex Feelings Now, 13 months ago
0
gla
On merkator[Linux] Stress test, 14 months ago
0
Write a TCL script :)
On AryobarzanUnknown Language Round #2, 14 months ago
+1
Thanks to you now we know io :)
On AryobarzanUnknown Language Round #2, 14 months ago
+11
Free Pascal :)
On AryobarzanUnknown Language Round #2, 14 months ago
+11
n = (n - (n%10)) / 10
On AryobarzanUnknown Language Round #2, 14 months ago
+3
Nice round!
Unfortunately, i was late by 40 minutes.

Everyone, you must see my solution for D :)

http://www.iolanguage.com/paste/p/40c888e58.html
On TachyonManthan 2011, 14 months ago
0
Yes
+50
Petr wins
+1
That's the point - to learn new language during contest time : - )
0
Special for equation problems like "3+4-7"
Taylor Reece I AM DONE WITH THIS CRAP! Input files for chess2 DO NOT match the example. There was no way to parse the input file I received and push it out into something readable. 2 hours down the drain, again!



On nevidomyCodeforces Beta Round #53, 16 months ago
0
negative numbers.
ans = (2*ans - n)%mod

in my case, victim wrote
if (ans<0) ans+=n;
instead of
ans+=mod;

On nevidomyCodeforces Beta Round #53, 16 months ago
0
i hacked one guy with that test too :)
On nevidomyCodeforces Beta Round #53, 16 months ago
+1
try this test:
AXAAA
AAAXA
replace"A" with dots
my answer is 2.62500000
On stgatilovCodeforces Beta Round #47, 17 months ago
0
Find 4 points: min by x - y, min by x + y, max by x - y, max by x + y. Convex hull is a rhombus, the answer is max(x + y) - min(x + y) + max(x - y) - min(x - y).
I thought about octagon at the contest and used 8 points.
On ivan.popelyshevSRM 490, 17 months ago
+1
Assume D = GCD(N, M)
Waiting time of starship is a divisor of D, because it is always linear combination of N and M.
Assume waiting time of i-th starship is ai.
ai + 1 = ( - i * M)modN, a0 = aN = 0,  , so the sequence is linear and has a period. The answer is an average value of one period of the sequence.
D = x * N + y * M for some x, y (extended euclidian algorithm ), so ay = N - D, hence every k * D , 0 <  = k * D < N is found in the sequence.
The answer is average of  k * D where 0 <  = k * D < N which is (N - D) / 2.0
Test
0
Eclipse for Java
In case of W>=2 and N>=2 solution always exist.
i replaced your detCh function with mine:

char detCh(int i, int j){
    return (char)((i+5*j)%26 + 'a');
}

and received AC.
you should check all neibours in 5x5 square :)
Oops, it's my fault :)

Your program writes in output symbol with code 1.
flag
[n-1][i]=1;
Replace it with
(char)('y'+(i/2%2))
and you will get WA test 21.
Add a case m==0 (mm==1) in the code and you will get AC :)
On TahlilNeed Some Nim Game Problem, 22 months ago
0
On Nedy88Codeforces Beta Round #24, 22 months ago
+17
Topcoder SRM often starts at 5AM MSK. That is our revenge :)
+1
new Thread(null, new Sample(), "1", 1<<23).start(); - 8 megabytes stack.
forget it. Found a bug :)
I mistaken, that's other test. What is test case #9?
Empty cycle of length 0 is bad thing (test 9, problem D).
On brainailCodeforces Beta Round #17, 23 months ago
0
cool :)
On brainailCodeforces Beta Round #17, 23 months ago
0
phi(c) is divisible by phi(c2) and phi(c1)
On brainailCodeforces Beta Round #17, 23 months ago
+11
b1 = b mod C
if n is less than 1000 then n1 = n;
else n1 = n mod phi(c) + 10 * phi( c );

answer is b1^n1 mod C
On brainailCodeforces Beta Round #17, 23 months ago
0
On hadiProblem Solving by Guessing!, 2 years ago
0
Offtopic:
The solution for this problem is simple: modified Z-algorithm.
(shift+4)\frac{x}{y}(shift+4)
oops..


frac{x}{y} = 3
frac{x}{y} = 3
for example.
You can use TeX for the mathematical formulas.
On rng_58Hello, 2 years ago
0
Hello. I'm Jedi_Knight, you know me from topcoder :)