Hi to all!)

Codeforces #143 for participants from second division is going to be today. I think, it is not necessary to remind, that coders with rating greater than 1699 will be able to take part out of the competition.

Problems' autors for this event are Kholkin Pavel (HolkinPV) and Kuznetsov Nikolay (NALP). Kudryashov Igor KudryashovIA and Agapov Gerald (Gerald) helped in contest's preparation too. Special thanks to creator great resource Codeforces Mike Mirzayanov (MikeMirzayanov) and our translator Maria Belova (Delinur).

Score distribution will be determine later, monitor for changes).

We wish you enjoy participating this competition and want you to get something new and useful.

**UPD**: Score distribution will be **standart** 500-1000-1500-2000-2500.

**UPD2**: Round is over. Thanks to all for participating. Six first coders solved all 5 problems, congratulations.

1) teoy

3) mrNobody

4) Ryannnnnnn

5) marschenly

6) stbproger

Editorial will be published soon.

**UPD3**: Editorial is published, you can find it here

270 new user and keep growing.

First Codeforces round on Sunday since a long time!!! This should happen more frequently!! Thanks to authors!!! Good luck to new users!!

Thank, U for this words "Good luck to new users!!!".

Was Problem D really that easy or have I done some mistake ??My code

If I am correct then I think the problems should have been aranged as A , RightShift( B,C,D ) ,E

I agree with you. But I appreciate it as a test to come up with such an easy idea for a problem of 2000 points after writing harder solutions for 1000/1500 :-) [I am aware that those who open D first have got extra points ;-)]

I´m totally agree with you problem D was really easy and problem B was a little bit tricky

Really nice competition, though it was kinda surprising that the 4-th task was solved by 6 IF-s, i mean at standart score distribution it's expected to be sorted by difficulty. :)

What an amazing Round. 5 Problems are very nice. Thank Authors very much :)

any simple solutions of B?just some words about solution pls

Well you can notice that the number that's resulted at the end is a1-a2+a3-a4+a5... where 'a' are the numbers from the initial array. And i suppose you can find em easily knowing that, didn't have enough time to realize that solution.

yes had exactly the same idea,but somehow could not realize,my bad...

S1=x1+x3+x5+... S2=x2+x4+x6+... n1=n div 2+(n mod 2) n2=n-n1 d=S1-S2 n1<=S1<=l*n1 n2<=S2<=l*n2

Look over possible S1 and S2 values. If it is possible to take such S2 and S1 that d=S1-S2 then answer exists else it doesn`t. In case of its existance some efforts to output the sequence are required.

thanks :)

the order should be A,D,B,C,E

can't agree more.

Maybe author have harder solution rather than using 6 if conditional

Nice problem set and competition, though, I believe System test was fast because of El Clasico :D

Agree....

Hi! How can this submission get AC on problem C: http://www.codeforces.com/contest/231/submission/2319083 But it gets the wrong answer on this test:

Correct output must be: 1 1, but its result is 2 2. Is the test case weak ?

The problemset was good. Not very easy and not very hard. Liked it really much.

Has anybody here solved B using Dynamic Programming?

yes.

Great. I thought it was too slow to get Accepted. The time complexity is nearly O(10^8). However, I got AC.

If time complexity is O(10^8) be sure you'll get AC. :D

UPD:Of course on CodeforcesI don't know, i've got a lot of TLE's with time complexity O(10^8). Before SPOJ gets a faster processor, it was a bit hard to get AC with this time complexity. Anyway, CodeForces has a fast judge.

Great competition!

very nice problem set, thank you very much ^^

I think there were lots of WA's on problem C. Maybe reason is there were no alert about not using %lld specifier on C++. So lots of people didn't use 64-bit integer. and maybe 64-bit integer was not neccessary on authors solution.

UPD:The only thing different with this comment and mine is downvotes and upvotes :DNumbers that you need to find are fit in 32-bit type, so I think the warning about %lld was not necessary.

I made 2 successful hacks on submissions which did not deal with overflow in multiplication. It seems to be the most common mistake I think.

……

Are you happy ? :)

Like your words, but if I were you :)

I know the idea of D but idon't know how to implement it! i think the idea is to make a line from Vasya to center of every face and check if this line intersect with any face, i won't add its weight to sum, other wise i will add its weight to sum. if this is correct, how to check intersection in 3D ? thanks in advance.

I really got surprised when I saw problem B is dp, ...!

Greedy is accepted too.

How can we Dp problem B. Can you show me ???

dp f[i][s]=true means that where are a[0]...a[i] left after some operations(a[i] is not the origional one), and a[i]=s(probably negative)... we can enumerate a[i] from 1 to l to check if condition f[i+1][s2] is true, here (s = a[i] — s2).finally check if f[n-1][i] is true for some i from 1 to l

any chance of an English editorial/analysis being published for this contest round?

nvm, found it here

The hyperlink of editorial is linked to russian editorial again:( hope you can fix it:)

I think that problem C was extremely harder than problem D!

can anyone explain second question? i couldn't understand after translating Russian tutorial