Recent actions
 On KAN → VK Cup 2018 — Wild-card Round 1, 101 minute(s) ago 0 You can add these problems to a mash up in the gym and then you can solve them without the language restriction.
 On KAN → VK Cup 2018 — Wild-card Round 1, 30 hours ago 0 you have to think positively,bro. I do .
 On KAN → VK Cup 2018 — Wild-card Round 1, 43 hours ago +6 Could we submit these problems by any language now? It's difficult for me to translate C++ to other language and I really want to have change to slove these problem...
 On KAN → VK Cup 2018 — Wild-card Round 1, 2 days ago +10 I think Dozebear doesn't want to have same colour as you
 On KAN → VK Cup 2018 — Wild-card Round 1, 2 days ago 0 Just Boring :(
 On KAN → VK Cup 2018 — Wild-card Round 1, 3 days ago +1 To solve J, I maintain a set of disjoint ranges. For example: if I insert the range [2, 4] and then [3,6], my set will contain only {[2, 6]}. But if I insert [5, 6] instead of [3, 6], the set will be {[2, 4], [5, 6]}.You can see that the answer will be the amount of elements in the set, because the points that belong to different elements of the set will never coincide.You can see my implementation, but if you don't understand something, please feel free to ask!PD: this kind of set can be very useful, you should implement your own! :)
 On KAN → VK Cup 2018 — Wild-card Round 1, 3 days ago +60 Just asking, who are you talking to?
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago -16 if ( comment.evaluate() == content.bad ){ `downVote();`} else { `downVote();`}
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago -12 These guys are the best :gautam1212__Bsarthak0797
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago 0 ok, but it's strange
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +8 Well,as an OI-participant,I can only use C/C++ and Python 3.Fortunately, a friend of mine can coding in java and I tried to use pascal and C# for I think they are similar to C.Finally, we solved 6 problems. I have to say that it's an excellent round!
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago 0 how can i get the editorial of this round ..???
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago 0 E's approach is quite straight-forward:Use a stack to store the new array. Iterate through the original array, and for each element, push it to the stack, and while the stack size is greater than 1, and its top element has the same value with is nearest element below, merge these two elements.
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago 0 In the previous year authors said you shouldn't discuss it until hacking phase is finished. I think, the same rule this year.
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago 0 how to solve J,E ?
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago 0 I think you can, because you can see others' solutions
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago 0 can we discuss the problems now in the comments or should we wait until the hacking phase is finished?
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago 0 Same here, except it's because I don't know that many languages :(
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago 0 As the contest is finished, can we submit in same language?
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago 0 Get it
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago -8 It was fun
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago -14 i solved 5 problems :) nice
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +45 I think the language restriction should be removed in practice mode. Maybe I want to solve every problem in all languages lol.
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +7 Congrats, nice result! We used C#, Java, Python, C, Kotlin, Go and D. Without C++ it was really funny :D
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +13 I used the same strategy and only passed my C++ problem in the last 24 seconds
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +14 I used javascript, C#, PHP, Ruby, Python 2, D, Java, C and C++ . It was fun like last year.
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +55 Colorful, Colorful and Colorful!!!
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +28 I solved 8 problems in 8 languages I have barely seen and used, and I didn't have enough time to solve a problem in C++ (my main language).The contest was fun anyways.
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +27 Just 1 minute late ;( http://codeforces.com/contest/953/submission/36367508We kept C++ for the hard problem and couldn't use it :D LOL
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +18 Hi, could you please add the problems to problem-set so that we could submit them in any language we want? there were some really good problems...... I would really love to get a chance to submit them..... thanks.
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +12 Very nice opportunity to try new languages.For me I used : Java8 — Python — C — D and C++ (my main)Was a very good experience.
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +67 I wish We had the same color :p :p
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +7 Yes
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago 0 The rules are the same for unofficial participants ?
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago -26 new ChallengeDay().execute();
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago -18 it is time to learn something new (Forced) ..
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago -45 we will have some problems with compiling today (10 unique programming languages )we can use online compilers :)
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +37 Why the rules are the same as last year? I expect something new and interesting .QvQ
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +23 Posted above.
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago Created or updated the text
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +7 and where are the rules?
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +32 We've got the same photo, bro!
 On KAN → VK Cup 2018 — Wild-card Round 1, 4 days ago +63 For Div1 users there are lots of unrated contests.
 On KAN → VK Cup 2018 — Wild-card Round 1, 5 days ago +36 But, virtual is virtual, it's not real!
 On KAN → VK Cup 2018 — Wild-card Round 1, 5 days ago +23 All virtual contests are unrated ;)
 On KAN → VK Cup 2018 — Wild-card Round 1, 5 days ago +1 The detailed rules will be added to this post around 30 minutes before the start.
 On KAN → VK Cup 2018 — Wild-card Round 1, 5 days ago +13 Finally, unrated contest. It's becoming difficult to find such contests in Codeforces.
 On KAN → VK Cup 2018 — Wild-card Round 1, 5 days ago 0 2hr
 On KAN → VK Cup 2018 — Wild-card Round 1, 5 days ago +6 contest duration ?
 On KAN → VK Cup 2018 — Wild-card Round 1, 5 days ago +14 Wild-card Round 1 who has been last year is very pretty. One programming language for one problem. Js, perl, c++, python, java, pascal — all of this languages try use everyone!
 On KAN → VK Cup 2018 — Wild-card Round 1, 5 days ago -14 Why I'm unable to select team when registering in the Official Round?
 On KAN → VK Cup 2018 — Wild-card Round 1, 5 days ago +21 After the contest we will solve the first 2 problems in 2 vedios
 On KAN → VK Cup 2018 — Wild-card Round 1, 5 days ago +10 Are these problems similar to those in Codeforces rounds?
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 5 days ago +10 The main problem with D is that most cases are not difficult to spot. It seems like the solution is: reduce it to BC-s followed by A-s, the number of B/C-s monotonically increases by 2-s in operation 1, the number of A-s monotonically decreases by 3-s in operation 4, then check how these operations can affect the other number. This translates to a lot of conditions, but the rules they check can be described very clearly, it doesn't look like case bashing at all if you think and then code, as I did.Then there's the special case I missed: a string containing the right number of A-s at the end and no B/C-s, changed to something containing B/C-s.Note that I started with D and solved it fairly quickly; failing the first problem I tried cost me quite a lot in score. That E/F were practically unsolvable and I didn't expect there would be many hacks (see above: I didn't see D as casework) didn't help. a reasonable strategy is to revisit problem D, perhaps try to come up with a more formal proof or write a brute force solution to compare with I had a formal proof shortly after the contest started. The problem is you can miss something no matter how many times you go through the same thought process because, well, it's the same thought process. I had something of a bruteforce (bruter force, O(N2)). Writing a test generator, fully bruteforce solution, stresstesting, finding this bug by picking random cases and fixing it takes a lot of time, probably more than 20 minutes. I sure didn't manage it that fast.Some problems have a small element of randomness. Some problems are nasty and have a huge element of randomness, either because you need to think weird to find a solution or because there's something that's very easy to miss. Some problems are geometry. There isn't always a way to do better other than farming luck in advance...Anyway, the choice of pretests for F is much worse. If a bogo-algorithm works (bogosort: randomly permute while not sorted) on the first 95 tests, then you should make test 96 one of the pretests or use no pretests. This way, you don't have people making blind submissions. The difference is that you sometimes get a wrong answer on systest few years after submission. If you can conceal your failure for years, that's pretty damn successful. That's not comparable to systests, but to someone running stresstests for fun and noticing an obscure bug nobody thought about a week after a contest.Or you can be sufficiently powerful, in which case you get a taxpayer-funded bailout. But I digress.I find my real world experience isn't nearly as harsh as people say. Not in the sense that failure is terminal. "Your submission to a vendor test didn't do well? Here are some statistics, compared to your previous submissions; we're accepting submissions again in a month." "A wild bug has appeared! We should fix it ASAP and get back to what we were doing." The various catches in (not only programming) competitions are unique in that regard. Competitions are harsh compared to ["real world" activity here] and so few people do them precisely because of that harshness.
 On KAN → VK Cup 2018 — Wild-card Round 1, 5 days ago 0 looks like we cant talk about the legend of Unrated contest in CF with the Users registered after 23 NOV
 On KAN → VK Cup 2018 — Wild-card Round 1, 5 days ago +51 Well, “should” is improper here. Cf doesn’t have any obligations of holding a round per week.
 On KAN → VK Cup 2018 — Wild-card Round 1, 5 days ago +6 There are other sites too that you can enjoy. Atcoder is having a contest tomorrow.
 On KAN → VK Cup 2018 — Wild-card Round 1, 5 days ago -36 Oh, I missed that. Anyway, they should have a rated round on every weekend. Some people like me who enjoy coding only on CF quite enthusiastically wait for weekends for rated contests :)
 On KAN → VK Cup 2018 — Wild-card Round 1, 5 days ago +3 "The rounds will use special rules"
 On KAN → VK Cup 2018 — Wild-card Round 1, 5 days ago -80 Why unrated? Codeforces should have at least one rated round every weekend.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 8 days ago +3 Only tourist can lose 290 points and still have 300+ points above Legendary Grandmaster line.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 9 days ago 0 Answered on PM. On Flash — it's been told many times, nothing happened and nothing is going to.About the strategy — I've done exactly what you are saying. But it turned out I'm so stupid that couldn't fix my solution till the end of the contest even having the bruteforce and 20 minutes. I've spent another half an hour after the contest to make it work.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 9 days ago +2 With your first paragraph you're barking up the wrong tree here. To be honest, I've not seen any complaints about the Flash interface. Note that I'm not implying that they don't exist nor am I saying that it is ideal. I'm positive that it's not productive to complain about it on a random post three layers deep in discussion of a random round that intentionally used both of the ways of gaining points to decide the ranking. I have not noticed you saying the above in a more appropriate discussion. Perhaps you would gain more support over there and things could actually happen. I know that I would join the bid.Regarding your second paragraph — I already know that some of the tasks were more difficult that they should have been (even though having a task with 3 or fewer correct submissions is not that uncommon) and I will do my best to avoid that situation next time. they should agree that the contest is imbalanced as hell as don't try to solve the last two tasks No, I am saying I hoped they would adjust their strategy to the circumstances and assess how to act to maximise their score. If on task E you got nowhere 20 minutes prior to the end of contest, it may be a good idea to do something else. Perhaps hack other people.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 9 days ago +36 Everyone was, however, able to look at the scoreboard 20 minutes before end of contest and see that it is full of hacks. It's especially convenient to click on some participant having 6 successful hacks to see which problems he hacked and look at an infinitely loading page with their list. Codeforces hacking system is 20th century artifact. To be honest, I'd send more money to codeforces crowdfunding campaign being guaranteed that hacking system will be rewritten using some modern technologies.On the subject: making so much random in the last solvable (ha-ha) task is definitely the best way to ruin the contest. You are saying people can stress test their solutions with a bruteforce — OK, so they should agree that the contest is imbalanced as hell as don't try to solve the last two tasks, which were supposed to arrange participants at the top?
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 9 days ago +8 Ya Got Accepted no need of help
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 9 days ago +8 why my code is giving WA.http://codeforces.com/contest/948/submission/36241274
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 9 days ago 0 Since a long time, I have the opinion that the pretest system is un necessarily extremely harsh at times.There are situations where I have declared wrong array size, and lost as much as 1600 +  points in multiple contests for it. Sometimes, this is not good.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 10 days ago +5 Ok
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 10 days ago -8 No one cares :-"
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 10 days ago 0 Update: I seem to have fixed it by removing "remove node" function and lowering the node count while traversing the trie. Still not sure why the original function didn't work, though.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 10 days ago 0 Could anyone find out what is wrong with my program for Div. 2 D? I used a trie like the editorial, but I seem to be off by one for some answers and I have no idea why. Could someone help me out? thanks 36214710
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 10 days ago 0 I meant "Does intended solution use randomized algorithm?". Forgive my hastiness and English :P
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 10 days ago 0 Can you please tell me what do you mean when you say the intended solution was random?
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 10 days ago +7 Thanks ! :) majk
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 10 days ago +3 Thanks for your kind and honest opinion. I often say these to other people. But reality is a little different. I do enjoy competitive programming but i know that there will be a time soon in the future when i have to quit and focus on my livelihood. But I wanted to become CM as soon as possible for a different reason (not related to programming). The fact is sometimes you can change a system when you go a higher position. I want to do something like that for my situation.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 10 days ago 0 Honestly multiset does the job quite nicely, but c++ priority_queue is slightly faster, as it uses Fibonaccy Heap, which i have seen is better in practice, and also the code is simpler with pqueue. But i would say use whichever you feel confortable with.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago 0 Haha, yes. But I was just pulling OP’s leg — I guess kids are too bored with that joke.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago +2 I think you are in a good position now to see for yourself. :P
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago +3 No offense taken. I'm glad for the discussion!Wish you luck in next contests!
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago 0 Hi majk, I completely understand that. I did not mean offence to you. I made that comment out of frustration. Thank you for hosting a contest :)
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago +19 `but leave the tricky one for systest and or hacks.`What for? I hate hacks because it depends on your room. For example, some rooms doesn't have any wrong solutions of the problem B, but in some another rooms there are teams who have made 4-6 hacks on it. It's like extra problem for them. I also think that making weak pretests are very bad idea for div1+div2 contests because people from div2 often submit naive solutions and it will make a lot of hacks and disbalance in scorboard. `If you have twenty minutes left and are nowhere near finishing E or F, a reasonable strategy is to revisit problem D`Another problems also have weak pretests. I saw how a lot of people passed pretest of problem F and it was very quickly. So I thought it's real to solve it faster than 15 minutes. But it was not true because these solutions were wrong. I tried to solve it and my solution of problem D was hacked 30 seconds before the end of contest.I think hacks are the best way for tasks when autor's test can't cover all cases for all solutions(for example tasks with hash), but hacks should not be in every problem.`on AIM Tech Round 4, where I got WA on systests`Unfortunately, a lot of rounds on codeforces have weak pretests and a lot of hacks recently. But I think it's not a reason to make weak pretests again and again.Anyway, I think problems were intresting and with good pretests this round would be very good. Thank you for the round and I hope next your round will have less hacks.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago +3 I am sorry you feel that way. I am especially not happy that you came back to CF after such a long time and got beaten this way. I've read the discussion about the problem D and hacks in general, and I have sympathy for the cries. I fell victim to pretests a few times as well. Most notably, on AIM Tech Round 4, where I got WA on systests because std::random_device was deterministic on MinGW. That night I though I don't have what it takes to be red and would never become one. The problem was initially suggested as somewhere between Div1A and Div1B. During testing we realised that some of the cases are really difficult to spot, and hence it navigated all the way to Div1C (I purposefully do not call it D, as the intention was that Div1 has an extra problem at the beginning, not at the end). The idea was to put the main cases in the pretests, but leave the tricky one for systest and or hacks. Depending on whether I would notice the tricky case in D myself or not, and was hacked or not, I might have been upset too. It was an unusual problem, but I don't consider it to be a mistake the put the problem in the set.Sure, some people took the risk. They locked the problem that evidently had a lot of cases without having a proof that their code is correct. Later they realised that there was a case they didn't cover, either by noticing it in someone else's code, or getting hacked themselves. Risks sometimes don't pay off. Some people were lucky to get hacked early enough. Everyone was, however, able to look at the scoreboard 20 minutes before end of contest and see that it is full of hacks. If you have twenty minutes left and are nowhere near finishing E or F, a reasonable strategy is to revisit problem D, perhaps try to come up with a more formal proof or write a brute force solution to compare with. I view competitive programming a challenging leisure activity that gives us a balanced mix of two feelings — frustration that I cannot solve a problem, and happiness that I was able to solve one. It's okay to be upset if you do badly, it's okay to be mad at the problemsetter who caused this. You'll do better in next contest. Remember that there is also another goal of CP for many people, and that is to prepare themselves for future employment. In the software engineering world, you also have pretests and system tests. The difference is that you sometimes get a wrong answer on systest few years after submission. And the consequences may be much more severe than a few rating points.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago +3 It actually has happened before. But honestly speaking we should stop this sensationalising tendency of ours.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago +3 it feels so good
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago 0 Thanks for giving me another problem which can be solved with trie.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago 0 Problem D was beautiful, respect to majk for it
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago +3 ``````if(a[i][j-1]=='S' || ... ``````When j = 1 you compare 'S' and not initialized value. Not initialized value is usualy a random value. So the result of this compare is random too. When you are lucky your random solution gets AC :)
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago 0 Me :P
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago 0 i got plastic glasses thinking they were harder to break but it didn't help, instead of the glass breaking the frame broke. LOL
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago +13 I like the volatile formula. Imagine being gone for two months, then doing well on a contest, only to find you gained 15 rating...Nobody really assigns that much weight to ratings anyway. Everyone still agrees tourist is the best in cf.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago 0 But now the same code is getting AC. Why?
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago 0 cjtoribio, Thanks for taking time in explaining me... P.S: Your solution is beautifully coded. :) Update1: Is there benefit of using priority queue over multiset?
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago 0 Maybe because you defined the array "a" in the main function.Arrays defined in functions may not be initialized.Try memset(a,0,sizeof a); Or you can define arrays out of main function (they'll be initialized by 0).
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago 0 948A — Protect SheepThe code that i submitted during contest got WA on case 49.But the same code got AC when i submitted it after contest.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago +53
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago +103 I always believe that old rating formula was much better than new rating formula. Before this round everyone agree that he is the best in CF — but he falls to the 4th place just because he fails a single round? In one round everything can happen. It puts too much weight on the newest round.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago +8 hope for him.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago -30 It's amazing to see the fall of tourist.
 On majk → VK Cup 2018 Round 1 and CF Round #470 (div. 1 & 2), 11 days ago 0 OMG, I know why!When using the multiset, the "erase" function does not act like the set.Example: multiset b; b := {3,3,3,5,6,6,7} // just a example, do not mind the grammar.. b.erase(3); And then : b := {5,6,6,7}erase a number in the multiset will actually erase all of them.It's my first time to use multiset. Maybe I still have some problems. But finally I learned something useful.