### Tommyr7's blog

By Tommyr7, history, 9 months ago, ,

Hi, Codeforces!

I'm quite excited to invite you to Codeforces Round #439 (Div. 2) which takes place at 16:35 MSK on 6 October and lasts for two hours.

One of the five problems is created by quailty, and the others are created by me. This is our first round here.

The round couldn't have been realized without efforts of KAN and gritukan. Besides, I also want to say thanks to our testers: cyand1317, visitWorld, Nisiyama_Suzune, cdkrot and gainullin.ildar. Thanks for your help to the contest. Also, thanks to MikeMirzayanov with the fantastic Codeforces and Polygon platforms.

The contest will consist of five problems and it is rated for Div. 2 contestants. The same as before, Div. 1 contestants can take part out of competition.

The problems will feature... Well, let's wait and see for another time ;) As per Codeforces tradition, moderate length text and no spoilers about the actual plot.

I hope you can have fun during the contest. Good luck and have fun, wish you high rating!

The scoring distribution will be announced later.

See you tomorrow!

UPD1 : The scoring distribution is 500-1000-1500-2250-2500.

UPD2 : The contest is over. The editorial is available.

UPD3 : Congratulations to top five coders!

### Division 2 :

1. 1heart2plans (solved all problems!)
2. fatice
3. LuckyPants
4. xza
5. T404

### Division 1 + Division 2 :

1. 1heart2plans (solved all problems!)
2. unused
3. fatice
4. nuip
5. chemthan

Have fun! See you next time! (Let's wait and see...)

•
• +354
•

 » 9 months ago, # |   +13 Auto comment: topic has been updated by Tommyr7 (previous revision, new revision, compare).
•  » » 9 months ago, # ^ |   0 The E's data has some weak,because many people violence passed,but if Op 1 is 50000 and op 3 is 50000 many people will be TLE.
•  » » » 9 months ago, # ^ |   0 Well... It's my issue... In fact, the generator for div2. E isn't easy to code... I added 20 tests after randomly getting the ractangles... and I didn't consider this situation... Maybe I will do better next time... Thanks for pointing out!
 » 9 months ago, # | ← Rev. 2 →   +1 Tommyr7's round, must be very nice to perticipate.
 » 9 months ago, # |   +15 Another chinese round. Hope for short problem statements.
 » 9 months ago, # |   +9 Not only Chinese round,but Shanghai Round as well.It must be a fantastic one as the ones written by cyand1317!
 » 9 months ago, # |   +18 WOW Shanghai Round OvO
 » 9 months ago, # |   +47 zici!
 » 9 months ago, # |   -23 %%%%Q神
•  » » 9 months ago, # ^ |   -25 ?? What's mean?
•  » » » 9 months ago, # ^ |   0 He means quality's ability is cool!
 » 9 months ago, # |   +10 Wow, another round with special starting time. I can't stop craving those thought-provoking problems.
 » 9 months ago, # |   0 Very good! Hope the statement will be short.
•  » » 9 months ago, # ^ |   -6 HAHAHA
 » 9 months ago, # |   -48 Hy guyzzzz , is it RATEDD??
•  » » 9 months ago, # ^ |   +2 Can you read?
•  » » » 9 months ago, # ^ |   -7 umm, NO
 » 9 months ago, # |   +2 Auto comment: topic has been updated by Tommyr7 (previous revision, new revision, compare).
 » 9 months ago, # |   +54 I did terribly today and cannot wait until tomorrow to try to restore my confidence.
•  » » 9 months ago, # ^ |   +10 Good luck!
 » 9 months ago, # |   +1 gl hf every one
 » 9 months ago, # | ← Rev. 2 →   -35 good luck!
•  » » 9 months ago, # ^ |   0 Poor English.
•  » » » 9 months ago, # ^ | ← Rev. 2 →   -8 I have confused blogs.
 » 9 months ago, # |   0 Hope this contest problems also have a short statements like previous. Wish everybody luck! YA!
 » 9 months ago, # |   -48 guyzzz , plig reply , is the contest rated ?
•  » » 9 months ago, # ^ |   +3 If there written "Codeforces Round #***", it means that it is rated. But not always, for example.
•  » » » 9 months ago, # ^ |   +1 Right. In addition, "Codeforces Round #***" can be unrated if there occurs any unexpected technical problem (though those contests are declared as rated, later they're declared as unrated in those cases).
 » 9 months ago, # |   +8 Wish that this contest announcement will be, as short as, statement)
 » 9 months ago, # |   0 Yeah, This contest will held on my Dad's birthday.The bad thing that I will be doing this contest during my family сelebrating dad's birthday(((
•  » » 9 months ago, # ^ | ← Rev. 2 →   +61 I really think you should celebrate your dad's birthday in case contest clashes with the party time :)
 » 9 months ago, # |   +14 Finally came to a Chinese Round！Fantastic！ Zici Tommyr7's first round. And ORZ Giant Red Q ! I think at Tommyr7's and quailty's level , it's not difficult at all to prepare for Div1！
•  » » 9 months ago, # ^ |   0 Yes, and they (classified information) with (classified information).
•  » » 9 months ago, # ^ |   +2 Well, it's our first round. So I think it more proper to prepare for just one Div. 2 round.
•  » » » 9 months ago, # ^ |   0 proper uh... how to understand this words ? my English is not so good sorry ... proper means suit? maybe... QAQ
•  » » » » 9 months ago, # ^ |   0 Yep...
 » 9 months ago, # |   +29 Chinese Round,fighting!
 » 9 months ago, # |   0 Congratulations....hope your 1st contest will be very interesting and expecting high rating :)
•  » » 9 months ago, # ^ |   0 Thanks.
•  » » » 9 months ago, # ^ |   0 You are most welcomed
 » 9 months ago, # |   +41 So before every contest, I get an email announcement for the upcoming contest, and every time it states that the contest has an unusual start time.Out of curiosity when is the usual start time?
•  » » 9 months ago, # ^ |   +12 19:35 moscow time
 » 9 months ago, # |   +7 For quailty hit call(escape
 » 9 months ago, # |   +16 If you ask me zici not zici, I'm zici
 » 9 months ago, # | ← Rev. 3 →   -43 EMPTY
 » 9 months ago, # |   +9 As someone who is about to retire, I hope to have a happy ending.Come on！
 » 9 months ago, # |   +5 quailty, I hope the problem's quality is very good.
 » 9 months ago, # |   0 Auto comment: topic has been updated by Tommyr7 (previous revision, new revision, compare).
 » 9 months ago, # |   +15 I wonder how Tommyr7 became rating ~2300 so fast (3-4 months) from rating 1800 (with many participation)...
•  » » 9 months ago, # ^ |   +12 In fact... I can't performance well in Div. 2 contests and I even don't know why...Always FST on div2AB may be one of the reasons...You can see that I fst problem B yesterday again... which makes me very upset...
•  » » » 9 months ago, # ^ |   +32 Unrelated comment what's FST short for :D
•  » » » » 9 months ago, # ^ |   +9 Fail on System Test
•  » » » » » 9 months ago, # ^ |   0 Thanks, good to know :D
 » 9 months ago, # |   +12 Let's Hack it!!!!
 » 9 months ago, # |   +10 Someone tell me how to solve C??
•  » » 9 months ago, # ^ |   +25 excuse me?
•  » » 9 months ago, # ^ |   +29 Let me bring my crystal ball... Oohhhh, I can't find it. Must have missed it on the field some day.Well, now you're gonna need to read the problem first.
•  » » 9 months ago, # ^ |   +38 You can do it greedily. Just sort the array and try all the numbers from smallest to largest.
•  » » » 9 months ago, # ^ | ← Rev. 2 →   +59 Greedy won't work. check this test:43 -4 10 -4
•  » » » 9 months ago, # ^ | ← Rev. 2 →   0 i did as u told.Got WA lol
•  » » 9 months ago, # ^ |   +23 You can use Brute force. Just O(n^2). n is less than 10000. So brute force can solve it.
•  » » » 9 months ago, # ^ |   +10 But time limit is only 439 miliseconds. And implementation is pretty heavy so the program can be slow. How can you deal with it?
•  » » » » 9 months ago, # ^ |   +1 You can use fastIO, such as read() or fread(). :)
•  » » » 9 months ago, # ^ |   +13 The brute force solution seems to be O(n^2), but is actually O(n*log(n)), so the solution can easily pass all tests.
•  » » 9 months ago, # ^ |   +14 I solved it with Convex Hull on linked list! :)
•  » » » 9 months ago, # ^ |   +4 Alert !! Sarcasm Overflowed.
 » 9 months ago, # |   +9 Yay! I don't have to feed the cows this morning. Let's have fun in this contest :) !!!
•  » » 9 months ago, # ^ |   +5 Good luck~
 » 9 months ago, # | ← Rev. 4 →   0 Really Pixar:)
 » 9 months ago, # |   -6 How to Solve problem C :D
•  » » 9 months ago, # ^ |   0 that's what i asked before contest..lOl
 » 9 months ago, # |   +10 Today's round ID is 869, which is one of the substring of E869120. I'm lucky that I can participate.
•  » » 9 months ago, # ^ | ← Rev. 2 →   +10 The next contest which's ID will be in your username as substring will be 912. After some more contests :)
 » 9 months ago, # |   +3 the start round doesn't suit me, i've to run from college to home quickly and the contest has started 10 minutes :)
 » 9 months ago, # |   +7 It seems that chinese round is difficult as usual.
•  » » 9 months ago, # ^ |   +14 That's why people shouldn't vote up the announcement before they read problems.
 » 9 months ago, # |   +4 I am not being able to open any solution for hacks. [Locked solutions]
 » 9 months ago, # |   +14 Awesome Chinese names got me!! :-P Instead of "Koyomi", I wrote "Kayomi" and got pretests passed. So, I locked for hacking and now I realized that I made a mistake!! Worst feeling when you know your submission is going to fail in system testing and you cant do anything :-P
•  » » 9 months ago, # ^ |   0 dont worry...have hope...it wont fail :p
•  » » » 9 months ago, # ^ |   0 I see what you did there XD
•  » » 9 months ago, # ^ |   +18 The answer is always Karen so don't worry and you'll be accepted
•  » » » 9 months ago, # ^ |   0 Damn...that is great! Totally missed it.
•  » » » » 9 months ago, # ^ |   +23 I realized that when I tried to hack this code:int main() { printf("Karen\n"); }
•  » » » » » 9 months ago, # ^ |   0 It's not always :)Consider the case: 2 4 1 5 4No of pairs: 3 (1,1) (2,1) (2,2)Luck wasn't in my side, and contest got over before i could hack a submission.
•  » » » » » » 9 months ago, # ^ |   0 all numbers are distinct
•  » » » » » » » 9 months ago, # ^ |   +1 Oops, I missed those constrains.
•  » » » 8 months ago, # ^ |   0 Why is it always Karen? Sorry I'm kind of slow on these things.
•  » » » » 8 months ago, # ^ |   0 It's easy to see, xor(X,Y) = xor(Y,X) right ? So if (X,Y) is a valid pair, (Y,X) would be as well. As you can see the answer comes in pairs, that's why it's always even. Don't forget that xor(X,X) = 0 and 0 is not allowed in the problem so you will never count this one.
•  » » » » » 8 months ago, # ^ |   0 Thanks, I get it now. I was suspecting it was the xor but not sure until now.
•  » » 9 months ago, # ^ |   0 I guess the names are Japanese as the characters from the problems are a part of an anime known as the Monogatari Series.
•  » » » 9 months ago, # ^ |   +1 Yes, they're Japanese names. Though Kanbaru didn't appear in problems XD
•  » » » » 8 months ago, # ^ |   0 XD ? what does it mean ? it's a abbr?
•  » » » » » 8 months ago, # ^ |   0 Rotate it by 90° clockwise.
•  » » » » » » 8 months ago, # ^ |   0 still can't understand it! sorry... Please forgive my ignorance
 » 9 months ago, # |   0 502 Bad Gateway
 » 9 months ago, # |   0
 » 9 months ago, # | ← Rev. 3 →   +26 C is savage :/
•  » » 9 months ago, # ^ |   0 Why ? As I am new to the world of CP. Why Chinese contests are not good ? :P
•  » » » 9 months ago, # ^ |   0 There is a difference between Hard and good :/
•  » » » 8 months ago, # ^ |   0 CP? what does it mean?
•  » » » » 8 months ago, # ^ |   0 Competitive Programming
 » 9 months ago, # |   +18 since when codeforces started allowing Div2 participants in Div1 contests.....???
•  » » 9 months ago, # ^ |   0 Since last contest.
 » 9 months ago, # |   0 How to solve A ? [ What is the hack case for A as I solved it using O(n * n)]
•  » » 9 months ago, # ^ |   +1 ans for A is always "Karen".
•  » » 9 months ago, # ^ |   +1 The answer will always be karen because the number of pairs will be even always. Suppose, for pair (1,2) the answer(xor of both numbers) exists in array, then obviously for (2,1) answer will also exist. Hence for x (x1,x2) number of pairs there are other x(x2,x1) pairs. Hence 2x pairs in total. so the answer will be karen.
 » 9 months ago, # |   0 I am not able to see other solution for hacking after locking my solution. Also my score shows 0 in my room. Why is this happening? :/
•  » » 9 months ago, # ^ |   0 Clear Cookies of your browser.
•  » » » 9 months ago, # ^ |   0 Didn't help
•  » » » » 9 months ago, # ^ |   0 Try C then :-p
 » 9 months ago, # |   +1 Problem descriptions were not that long. Thank you!
 » 9 months ago, # |   +23 It was a high quality round.
•  » » 8 months ago, # ^ |   +3 Thanks for your supporting!
 » 9 months ago, # | ← Rev. 2 →   0 what should be the output for 1 1048576 1048575in A ? update- it was my mistake .
•  » » 9 months ago, # ^ |   +3 Karen 
•  » » » 9 months ago, # ^ |   0 I tried to hack one solution which was giving Koyomi but ended up with unsuccessful hacking attempt.
•  » » » » 8 months ago, # ^ |   0 bool vis[2000200]; will get Runtime Error, but int vis[2000200]; wiil not. I tried to hack the second twice but both failed！ It is really strange…
•  » » » » » 8 months ago, # ^ |   0 int vis[2000200]; accepted ？
•  » » 9 months ago, # ^ |   0 Karen?
•  » » 9 months ago, # ^ |   0 Are there any test cases that don't give Karen?
•  » » » 9 months ago, # ^ |   0 No. The answer is always "Karen".
•  » » » 9 months ago, # ^ |   0 what is the ans for 1 5 0?
•  » » » » 9 months ago, # ^ |   +6 1 <= xi, yi <= 2*10^6
•  » » 9 months ago, # ^ |   0 It is always "Karen"
 » 9 months ago, # |   +22 Math, Math and more Math.
•  » » 9 months ago, # ^ |   +10 Because it is a Chinese round! XD
 » 9 months ago, # |   +10 I did hashing on fenwick tree for problem E. Even though I did double hashing, I'm still crossing my fingers.
•  » » 9 months ago, # ^ |   0 isnt there 2-dimensional segment tree?
 » 9 months ago, # |   +7 When you're < 30 seconds late from submitting a solution.......
 » 9 months ago, # | ← Rev. 2 →   +16 Is there any alternate approach to E, mine is ->I maintain a 2D BIT, where in every cell I store hash of set of rectangles that affected it. For query, I just check if hash of given two cells is same. Query as well as updating all elements inside rectangle while adding or deleting it takes O(log(n)2) time. My hashing technique though is very naive, first I assign unique numbers to rectangles, now I maintain few functions like sum of numbers, sum of squares, xor of numbers, xor of squares in every cell. Comparing two cell then will require to compare these 4 numbers. Using lesser and better functions should also suffice.
•  » » 9 months ago, # ^ |   0 O Just sum some random number in the rectangles using bit 2d
•  » » 9 months ago, # ^ |   +5 I did in q*n.code
•  » » » 9 months ago, # ^ |   0 So I did but got tle on test31.
•  » » » » 9 months ago, # ^ |   0 mine is atmost 2500 basic ops per query.
 » 9 months ago, # |   +27 A. Nice Hello WorldB. Nice problem for PythonC. Nice problem for PythonD. Nice difficultyE. Nice data structureThe difficulty distribution is 500-500-1500-3000-2000.Please dynamic problem scoring.
 » 9 months ago, # |   +12 Mathematic round
 » 9 months ago, # |   +5 do the pretests of E contain big tst cases
 » 9 months ago, # | ← Rev. 2 →   +1 In problem B one should check for 0!/0! case answer should be 1 .
•  » » 9 months ago, # ^ | ← Rev. 2 →   +1 if(a==b) {printf("1\n");return 0;}thug life
•  » » » 9 months ago, # ^ |   0 No need to check 0!/0!.https://ideone.com/QAwDEB
•  » » 9 months ago, # ^ |   0 Really? Give me a link of any Submission with this problem.
 » 9 months ago, # |   +8 How to solve C?
•  » » 9 months ago, # ^ | ← Rev. 2 →   +7 Fix the number of edges between a-vertices and b-vertices. Let there be x of them. Choose x out of a possible a-nodes and x out of b possible b-nodes and connect them in x! ways. Do same for a-c and b-c pairs. Multiply all 3 values to get final answer. Code
•  » » » 9 months ago, # ^ |   0 I don't get it :/. What do you mean by "Fix the number of edges between a-vertices and b-vertices" ? Can you explain with the example a={1,2} and b={1,2,3} ?
•  » » » » 9 months ago, # ^ |   +3 x can range between 0 and min(a, b). In this case, x can be 0, 1 or 2.If x = 0, number of ways = C(a, 0) * C(b, 0) * 0!If x = 0, number of ways = C(a, 1) * C(b, 1) * 1!If x = 0, number of ways = C(a, 2) * C(b, 2) * 2!C(n, r) is number of ways of choosing r objects from n objects.
•  » » » » » 9 months ago, # ^ | ← Rev. 3 →   +1 C(a, 0) * C(b, 0) * 0!,C(a, 1) * C(b, 1) * 1!,C(a, 2) * C(b, 2) * 2!Sir, can you explain why you multiplied the expression with the factorial? 0!, 1!, 2!??? satyaki3794
•  » » » » » » 9 months ago, # ^ |   +3 After you've chosen x values each from the two sets of nodes, you need to make x pairs from them. For the first a-node, you have x possible b-nodes to choose from. Make a pair. Now, for the 2nd a-node, you have x-1 possible b-nodes to choose from, and so on. Total ways is x!.
•  » » » » » » » 9 months ago, # ^ |   0 Thank you so much ! :) Makes perfect sense to me now!
•  » » 9 months ago, # ^ | ← Rev. 3 →   +2 Calculate F(a, b) independently for 3 pairs and multiply. if a <  = b, F(a, b) = F(a - 1, b) + F(a - 1, b - 1) * bBecause, for 1st element of first set, if nothing is assigned in 2nd set, there are F(a - 1, b) ways left, and if 1st is assigned in b ways, F(a - 1, b - 1) ways are left.
•  » » » 9 months ago, # ^ |   0 why not so:F(a-1,b-1)*a+F(a,b-1)
•  » » » » 9 months ago, # ^ |   0 The relation is symmetric, hence I mentioned a <  = b before it.
•  » » » » » 9 months ago, # ^ | ← Rev. 2 →   0 But How are they independent of each other ???
•  » » » » » » 9 months ago, # ^ | ← Rev. 2 →   +5 When you have joined a point in set 1, with a point in set 2, joining this point to any point in set 3 doesn't contradict any given conditions, hence you can treat them as independent.
•  » » » » » » » 9 months ago, # ^ |   0 Thanks a lot . I got it :)
 » 9 months ago, # |   +12 swap(D,E)
 » 9 months ago, # |   +21 I did not enjoy the difficulty this round. The difficulty was A, A, D, E, E. One small mistake on the first two problems can drop your rank by 500.
 » 9 months ago, # |   +36 I've been tricked After I hacked someone's code,I saw this: #define int long long int
•  » » 9 months ago, # ^ |   +11 That's cruel.
•  » » 9 months ago, # ^ |   +8 Exactly this was something I faced in a previous round. From then, I always check ;)
•  » » » 9 months ago, # ^ |   0 Yeah,I will check it from now on.I were so innocent...
•  » » » » 9 months ago, # ^ |   0 i dont understand.
•  » » 9 months ago, # ^ |   0 I use this, It save me from overflows :D
•  » » » 9 months ago, # ^ |   0 but long long int is time consuming.
•  » » » » 9 months ago, # ^ |   0 Codeforces is not so strict with time limits :D until you are writing some sub-optimal solution in which case you need to edit this #define int long long
 » 9 months ago, # |   0 wanna cry, come to the solution of C in the last ten minutes but fail to submit it.
•  » » 9 months ago, # ^ | ← Rev. 2 →   0 Same for me!
•  » » » 9 months ago, # ^ |   0 Hacks on fire :-p
•  » » » » 9 months ago, # ^ |   0 if wouldn't have done it, could have solved c :p
•  » » » » » 9 months ago, # ^ |   -8 But U solved C right? :-p (Mentioned above)
•  » » » » » » 9 months ago, # ^ |   0 i could have submitted* :p xD
 » 9 months ago, # | ← Rev. 2 →   +37 x[i]^y[i] Test 23 A 
 » 9 months ago, # |   0 Answer of A is Always Karen ????
•  » » 9 months ago, # ^ |   0 Yah
•  » » » 9 months ago, # ^ |   0 How ?
•  » » » » 9 months ago, # ^ |   +11 a ^ b = c -> b ^ c = a
•  » » 9 months ago, # ^ |   +1 Yes. Because, if A^B = C then B^C = A and A^C = B both are true. When you find a pair A and B such that A^B = C and C is one of the numbers of your list, then it's guaranteed that you will find another pair looks like A^C (Which will give B) or B^C (Which will give A). So for one successful XOR another successful XOR is guaranteed!
•  » » 9 months ago, # ^ |   0 ordered pairs was the key word.
 » 9 months ago, # |   0 Auto comment: topic has been updated by Tommyr7 (previous revision, new revision, compare).
 » 9 months ago, # |   0 Oh my god, I made an obvious mistake and I passed the pretest of problem A..... Farewell my rating.
 » 9 months ago, # |   0 using map in A gets TLE :(
•  » » 9 months ago, # ^ |   +4 Solution was O(1) answer is always Karen :D
•  » » » 9 months ago, # ^ | ← Rev. 2 →   +8 Too lazy to think for problems which can be solved with brute force approach :p
•  » » » » 9 months ago, # ^ |   0 Same happened with me in B i just looped from a+1 to b without noticing constraints lost 50 points :(
•  » » » » » 9 months ago, # ^ |   +3 I did the same mistake too.
•  » » 9 months ago, # ^ |   0 Same here
•  » » 9 months ago, # ^ |   0 no it doesn't my submission
•  » » » 9 months ago, # ^ |   0 but why it's with me:31069010
•  » » » » 9 months ago, # ^ |   0 It's giving TLE with [] operator but passing with find() but both are logarithmic in complexity .
•  » » » » » 9 months ago, # ^ |   +1 Using [] operator adds keys to the map(if it doesnt exist), thus making it too large for further operations. So find() runs fine but [] gives TLE. Made the exact same mistake !
•  » » » » » » 8 months ago, # ^ |   0 I had a small doubt, if [] is making keys then when it is called for the second time why doesn't it return true.
•  » » » » » » » 8 months ago, # ^ |   +1 Map stores key value pairs. Sure it adds new keys, but maps them to false value.
•  » » 9 months ago, # ^ | ← Rev. 2 →   0 Lol, never use a map just to map something to bool, you can always just use set in such case instead.
 » 9 months ago, # |   +6 O(N^2*6) DP getting TLE in C but O(N^2) Pascal's trangle passing :( too strict time limit
 » 9 months ago, # |   0 Auto comment: topic has been updated by Tommyr7 (previous revision, new revision, compare).
 » 9 months ago, # |   0 CodeForces runs 10^8 operations in 1 second? correct me
•  » » 9 months ago, # ^ |   +3 But it hates combination of map and long long int
•  » » » 9 months ago, # ^ |   0 I'm talking about C
•  » » » » 9 months ago, # ^ |   0 You should have mentioned :)
 » 9 months ago, # |   0 In problem C, it is Impossible to solve the problem in Java using O(N2) Dp. However the same solution, in c++ passes like a wonder.Remember that I used my mind to come up with an idea for a good problem, I type the Code in Java, TLE on pretest #7. The same code I type in C++, AC 740 MS. So, U should also prefer a better language, not only use ur brain to solve problems. I have been facing disappointments like these from time to time. I'm just going to stop using Java anymore, because I feel a lack of respect towards it in the programming Community.Some Proof :C++Java
•  » » 9 months ago, # ^ |   0 It's not impossible http://codeforces.com/contest/869/submission/31077410 , there are others, you can see it on http://codeforces.com/contest/869/status/C , just set the language to Java ... I don't think there is suck lack, look to the top ones in the rating and you gonna see that some of them use Java
•  » » » 9 months ago, # ^ |   0 It's not that it's impossible in Java, it's just that you need much lesser effort (less efficient code) using c++ and much more effort (highly optimized code ) using Java
•  » » » 9 months ago, # ^ |   +5 Some problems are impossible to solve in java, especially the ones using TreeMap/TreeSet. The fact is C++ has the advantage and java is at a disadvantage.
 » 9 months ago, # |   -8 how 2 solve E in 8 minutes like fatice did ?
•  » » 9 months ago, # ^ |   +13 begin with E first read problem in 1 minute think for 2 minutes code BIT in 1 minute code others in 3 minutes submit code in 1 minute
•  » » 8 months ago, # ^ | ← Rev. 2 →   +3 In fact, fatice ranked 1st in CNOI2017.He's really cool./And I was shocked when I knew he took part in the round...lol
•  » » » 8 months ago, # ^ |   +16 That 's amazing !!! When I was in the game, I was shocked when I looked at the rankings. Now read his code, I think in this life I can hardly write such a simple and concise code. lol
•  » » » 8 months ago, # ^ |   0 31072413 This is fatice's solution for problem C. It is really short and clean and I think it's awesome. Any idea what dp[i][j] represents?
 » 9 months ago, # |   +5 Perfect contest time after a long week.
 » 9 months ago, # |   0 This contest is not showing up in my profile. Is there some time to wait before it is updated?
•  » » 9 months ago, # ^ |   +8 Relax, it's a Codeforces.
•  » » » 9 months ago, # ^ |   0 Hahaha! :D
 » 9 months ago, # |   0 checking an element a1 in map like ma.find(a1)!=ma.end() passes all the testcases for A but checking like ma[a1]!=0 gets TLE. why??
•  » » 9 months ago, # ^ | ← Rev. 2 →   +1 When you use the second option, an element with key a1 is inserted on the map, so the runtime will be slower since you gonna have more values in your map
•  » » » 9 months ago, # ^ | ← Rev. 2 →   +1 but time complexity is same for both the cases and also atmost 4*10^6 elements will be inserted.
 » 9 months ago, # |   0 Running on tc22 for 15 mins...Can someone explain why
 » 9 months ago, # |   0 why in problem A mp[] gives TL ,, okay it will insert more elements in the map but still the max size of the map should be 2000+2000+(2000*2000)=4004000 so the overall complexity should be n*n*log(4004000) and this should pass in one second!
 » 9 months ago, # |   0 The constraints given in problem A are wrong thats why my solution did not pass The constraints for xi and yi given are 1 — 2*1000000 whereas actually the constraints are 1-4*1000000. Please correct me if I am wrong.
•  » » 9 months ago, # ^ |   0 You can see my submissions for problem A. The only difference between two codes is size of array 'ha'
•  » » 9 months ago, # ^ |   +1 constrains is right but A^B may be more than 2*10^6
•  » » » 9 months ago, # ^ |   0 Yes my bad
 » 9 months ago, # |   +5 when the ratings will be updated? can't wait to become purple
 » 9 months ago, # |   +8 Am I the only one who solved problem B by finding the repeating pattern of the last digits of b!/a! ?? This is my solution.
•  » » 9 months ago, # ^ |   +4 Yes. You are nezt gennady.
•  » » » 8 months ago, # ^ |   0 Haha lol! I wish I could be like him... :)
 » 9 months ago, # | ← Rev. 2 →   0 Is there anyone else or just me who was not able to understand the test output of Problem C :P ?
 » 9 months ago, # |   0 ratings?
 » 9 months ago, # |   -9 What kind of joke it is to provide editorial of only 2 problems? :/
 » 9 months ago, # |   0 when the rates updated??
 » 9 months ago, # |   0 what is difference between finding in map and direct checking? ex. mapmp; mp.find(x)!=mp.end() and mp[x]!=0
•  » » 9 months ago, # ^ |   +6 If you access a key using the indexing operator [] that is not currently a part of a map, then it automatically adds a key for you. This makes a really large map (up to 4000000) in this problem. You should use .find() or .at() for lookup.
 » 9 months ago, # |   +15 Is there a good deterministic solution to E?
 » 9 months ago, # |   0 How to solve D?
 » 9 months ago, # |   0 Why does my Python 2.7.12 solution get a runtime error when I use xrange (on TC 21) and pass when I use range with the same arguments. This is not supposed to happen. It works fine on my laptop but fails on Python and PyPy here. This cost meLiterally the only difference is the x[range]
•  » » 9 months ago, # ^ |   0 If you use Python 2/PyPy 2, xrange doesn't take args from 2**31 and higher (>=2147483648) (on here that is)
•  » » » 9 months ago, # ^ |   0 Same for me.. i knew this already large arguments in xrange dont work. I checked it and 10**18 was working in my pc i got runtime error while submitting. Took time to realize.
 » 8 months ago, # |   0 My solution is hacked again. It's a sad story.T_T
 » 8 months ago, # |   0 Auto comment: topic has been updated by Tommyr7 (previous revision, new revision, compare).
 » 8 months ago, # |   0 If 1e18*9 is not allowed by long long,then I could have hacked many solutions on B:D
 » 8 months ago, # |   0 Auto comment: topic has been updated by Tommyr7 (previous revision, new revision, compare).
 » 8 months ago, # |   0 this contest was too weeaboo for me, couldn't take it :(
 » 8 months ago, # |   -18 Nehru Place Escorts offering Hi I am Aruna Singh I am waiting very eagerly to make your evening colorful.Nehru place Escorts service Call Girl & Female Model Escort Services in Nehru Place for Your Spicy erotic Desires.I am Available 24X7. I'm also provide the all kind of .So, just call me. http://www.arpitakaur.com/nehru-place-escorts.html (Nehru place ) – Delhi.