KAN's blog

By KAN, 9 days ago, translation, ,

Hi!

Tomorrow, at Feb/07/2019 16:35 (Moscow time) we will host Codeforces Global Round 1.

It is the first round of a new series of Codeforces Global Rounds. The rounds are open for everybody, the rating will be updated for everybody.

The prizes for this round:

• 30 best participants get a t-shirt.
• 20 t-shirts are randomly distributed among those with ranks between 31 and 500, inclusive.

The prizes for the 6-round series in 2019:

• In each round top-100 participants get points according to the table.
• The final result for each participant is equal to the sum of points he gets in the four rounds he placed the highest.
• The best 20 participants over all series get sweatshirts and place certificates.

The problems of this round were developed by a team of authors: aitch, simonlindholm, grphil, V--gLaSsH0ldEr593--V, GreenGrape, Nebuchadnezzar, _kun_ and me. Thanks arsijo and _kun_ for their help in the round's coordination, and also majk, pashka, Jeel_Vaishnav, Ashishgup and UnstoppableSolveMachine for testing the round!

Good luck!

Congratulations to the winners!

Announcement of Codeforces Global Round 1

•
• +639
•

 » 9 days ago, # |   +132 Among reds and yellows, there is GreenGrape too. :D
•  » » 9 days ago, # ^ |   0 Upvotes? Great community!
•  » » 8 days ago, # ^ |   +42 They did surgery on GreenGrape
 » 9 days ago, # |   +18 I hope the difficulty gap between problems will be proper.
 » 9 days ago, # | ← Rev. 2 →   -71 Just love the unstable contests. GreenGrape is here so we can hope for hell of an unstable contest!I mean contest with weak pretests O_o
•  » » 9 days ago, # ^ |   +2 maybe the purpose is to encourage us to hack others...
•  » » » 9 days ago, # ^ | ← Rev. 2 →   +22 I don't understand why people give down vote in almost everything. Everyone can tell their opinion. Now a days, if someone is asking for help they also get down voted.
•  » » » » 9 days ago, # ^ | ← Rev. 2 →   +14 There is no disadvantages(at least I think) for downvoted comments unless you are posting something spam, illegal, NSFW, or whatever. So don't keep those downvotes in your mind :)
 » 9 days ago, # |   +56 how many problems will be there?
•  » » 8 days ago, # ^ |   0 eight
 » 9 days ago, # |   +11 What is the number of problems? And round duration???
•  » » 9 days ago, # ^ |   +6 in the previous blog they said every global round will be 7-9 problem
•  » » » 8 days ago, # ^ |   0 Exactly!
 » 9 days ago, # | ← Rev. 2 →   +222 Me in this round.
•  » » 8 days ago, # ^ |   +165 How I spent two hours on problem D...
•  » » 8 days ago, # ^ |   +7 Also, me using DSU for B.
•  » » » 8 days ago, # ^ |   0 Same
 » 9 days ago, # |   -22 It's not like I am going to get any GP score, but it seems a bit unreasonable to rank 4 out of 6 contests, especially with the fact that rounds are not announced weeks ahead of the schedule for participants to allocate time slot for the contest.
•  » » 9 days ago, # ^ |   +85 Ranking 4 out of 6 is a good idea because of the reason you wrote.
•  » » » 9 days ago, # ^ |   0 They clearly meant that 4 out of 6 is still unreasonable.
•  » » » 9 days ago, # ^ | ← Rev. 3 →   -9 Not if they are announced only half a week beforehand IMO, at this point I can't even tell if the time slot is fixed. I'd imagine I can't participate 1 or 2 of them later into the year since they are midnight rounds for me, and another 1 or 2 of them because it clashes with other activities that I could have possibly adjusted my schedule for it had it announced earlier.
•  » » » » 9 days ago, # ^ |   +18 But "4 out of 6" only helps you, compared to "6 out of 6".
•  » » » » » 9 days ago, # ^ |   0 I don't mean it's dragging me back, but it's just not good enough to be viable for everyone.
•  » » » » » » 9 days ago, # ^ |   +6 What I agree with is that they should announce rounds earlier if we must compete for some total score.
 » 9 days ago, # |   +10 Nice contest after chinese new year :D Good luck all !
 » 9 days ago, # | ← Rev. 2 →   -16 wishing ** Good luck** to everyone who is going to participate. - !NOOB :|
•  » » 8 days ago, # ^ |   0 Thanks, everyone who did devote me :)
 » 9 days ago, # | ← Rev. 5 →   -9 Why am i getting negative contribution without doing anything.
•  » » 8 days ago, # ^ |   0 This is life.
•  » » 8 days ago, # ^ |   0 That's how codeforces comments works.
•  » » 7 days ago, # ^ | ← Rev. 2 →   -9 dhur bedi
 » 9 days ago, # |   +28 I'm not so sure if this is just me or the case for others too, but I feel like weekends would be more convenient for such rounds, people might be more busy during weekdays. Just an opinion I might be wrong :) Best of luck to those participating in this one!
•  » » 9 days ago, # ^ |   +36 On saturday there will be atcoder.On sunday will be opencup.So, it is quite reasonable why it is not on weekends.
•  » » » 9 days ago, # ^ |   0 Oh true! Seems quite logical now. It's impossible to please everyone anyways so that's alright. Thanks!
•  » » » 9 days ago, # ^ |   +54 Counterpoint: The Atcoder round isn't for reds and Opencup isn't public either.
 » 9 days ago, # | ← Rev. 3 →   -21 There used to be a time when questions at the level of C were thought-provoking. Now the contests are like type first 3 fast and sometimes the transition in difficulty is so drastic that as you move from 1 level to another, the difficulty increases manifold. I believe A should be solved by 80%, B should be solved by 60%, C by 20% and D by like 7-8%. And C level questions need to level up.
•  » » 8 days ago, # ^ |   0 I thought today's C was quite challenging and B was not so straightforward to implement. If you are able to solve C's easier than before, it's because you are getting better. None of the first three problems were typing questions, because they all required some thought. (Easy or difficult, depending on your level).A typing question is like this is the scenario — implement it. All the first 3 questions required some deductions.
•  » » » 8 days ago, # ^ |   +6 This comment was made before the contest.
•  » » » » 8 days ago, # ^ |   0 Ah I see.
•  » » » 7 days ago, # ^ | ← Rev. 3 →   -12 None of the first three problems were typing questionsLol. C was a typing challenge and you wrote so much code. No wonder you took so long to solve it.Is that what you call "competitive" programming? LMAO.See my submission here
•  » » » » 7 days ago, # ^ |   +5 Your solution is essentially the same. I prefer writing code which is clean and makes the logic clear.Get a life, man :)Surely stalking what time I make code submissions and tracking down every single comment I make on here isn't the highlight of your life.
•  » » » » » 7 days ago, # ^ | ← Rev. 2 →   -12 I prefer writing code which is clean and makes the logic clear.Rewriting functionality that the STL already provides for you doesn't make your code cleaner. It makes it worse.LMAO. Shame on you to call yourself a programmer.
•  » » » » » » 7 days ago, # ^ |   +5 Shame on you to call yourself a human being.
 » 9 days ago, # |   -22 What is the reason for randomly giving T-shirts to 20 people, instead of top 50? Just wondering...And what is the random generator?
 » 9 days ago, # |   +4 Well shit. I can't participate again because the time is too early.
 » 9 days ago, # |   0 How many problems and duration ?
•  » » 9 days ago, # ^ |   -14 7-9 problems for 2-3 hours
 » 9 days ago, # |   +10 Getting One T-shirt can make your motivation level rise to the moons! Best of luck everyone.
 » 9 days ago, # |   +27 Will it be in ACM-rules? Or in CF rules?
 » 8 days ago, # | ← Rev. 2 →   +15 There was(thanks for the correction!) a 'и' in the English post. Now that I learned Russian a little, I do know it means "and" in Russian, but for those who don't know Russian, it's a bit confusing (especially when it's in the problem statement -- which I've encountered long ago, though it was clear from the context that it means "and" ;)
•  » » 8 days ago, # ^ |   +92 Codeforces has its own variant of the language. Its people can gradually learn extra words like «и» и «Разбор».
•  » » » 8 days ago, # ^ |   +113 Great, I've finally learned something other than сука блять.
 » 8 days ago, # |   0 Should we expect an interactive problem?
 » 8 days ago, # |   +8 seem difficult for practicer like me to compete t-shirt...
•  » » 8 days ago, # ^ |   0 its impossible
 » 8 days ago, # |   +2 Feb 7, 2019: Day of emancipation div2 and div3....
 » 8 days ago, # | ← Rev. 2 →   -122 Hi everyone! I got my old PC fixed just in time to do the contest. Excited to do this contest and this is such a nostalgic feeling. Let us enjoy it together, everyone. Also, 1 like for getting my main PC fixed. or my PC dies. Your upvotes are really needed. Who wants a poor PC that went through such a harsh life of having 50 chrome tabs open every moment to die? Your likes are needed people.
•  » » 8 days ago, # ^ |   -36 Oh, at this rate you guys are gonna even kill my old computer and I won't be able to do the contest. Keep it up everyone, 100 downvotes and my battery will blow up.
•  » » » 8 days ago, # ^ |   0 Too late guys, I already finished the contest. There's no point in blowing up my battery anymore.
•  » » 8 days ago, # ^ |   +8 Protip: you can put a whole persistent OS on a USB drive, and boot from it anywhere (except where BIOS is locked). You don't need your own PC at all.
•  » » » 8 days ago, # ^ |   -13 Oh that's actually really cool. If I had something like that, I could be using an updated Chrome with an updated IOS which I could really use for a VPN. I could also use my main vimrc. But I still needed a repaired PC to use at my home. If I didn't have one, I would either give up the contest, or try to use a smartphone which is kinda ridiculous (has anybody done that?), or do the contest at a place with a PC which would work actually, but I don't know of a place like that off the top of my mind. tl dr; thank you for the protip.
 » 8 days ago, # |   0 It really is Chinese-friendly. I hope that I'll be not so green after this round.
 » 8 days ago, # |   +4 Good luck everyone :D
 » 8 days ago, # |   -7 Happy Rose day to all...
•  » » 8 days ago, # ^ |   -23 Chup re, Majnu Kahin Ke!
 » 8 days ago, # |   +15 Will the round be sorted by penalties or will points be awarded?
 » 8 days ago, # |   +35 10,000+ registration is now become common for codeforces ):
 » 8 days ago, # |   0 Are the problems sorted by ther difficulty ?
 » 8 days ago, # |   0 Wish you good pretests and high rating!
 » 8 days ago, # |   +46 Traditional randomization scripts!The second script is used to feed random places into the first script. Seed will be the score of the top1 contestant of today's contest, length is the number of people with ranks 31..500 (likely 470) and nwinners is 20. get_ranklist.pyimport requests contests = [1110] def is_eligible(contest, party_name, rank, points, problems, last_submission_time): return (31 <= rank <= 500) def get_party_name(party): if 'teamName' in party: return party['teamName'] else: return party['members'][0]['handle'] class Party: def __init__(self, contest, name, rank, points, last_submission_time): self.contest = contest self.name = name self.rank = rank self.points = points self.last_submission_time = last_submission_time def __lt__(self, other): if self.contest != other.contest: return self.contest < other.contest if self.rank != other.rank: return self.rank < other.rank if self.last_submission_time != other.last_submission_time: return self.last_submission_time < other.last_submission_time return False eligible = [] for contest in contests: rows_to_fetch = 20000 r = requests.get('https://codeforces.com/api/contest.standings?contestId=%d&from=1&count=%d&showUnofficial=false' % (contest, rows_to_fetch)) if r.status_code != 200 or r.json()['status'] != 'OK': print('Error: failed to fetch results of contest %d.' % contest) exit() results = r.json()['result']['rows'] if len(results) == rows_to_fetch: print('Error: results are too long in contest %d, increase limit.' % contest) exit() for row in results: party_name = get_party_name(row['party']) rank = row['rank'] points = row['points'] problems = 0 last_submission_time = 0 for problem in row['problemResults']: if problem['points'] > 0: problems += 1 last_submission_time = max(last_submission_time, problem['bestSubmissionTimeSeconds']) if is_eligible(contest, party_name, rank, points, problems, last_submission_time): eligible.append(Party(contest, party_name, rank, points, last_submission_time)) eligible = sorted(eligible) for i in range(1, len(eligible)): if not eligible[i - 1] < eligible[i]: print('Error: unable to sort eligible.') exit() for idx, party in enumerate(eligible): print('{} {} {} {}'.format(idx + 1, party.contest, party.rank, party.name)) print('Total %d eligible.' % len(eligible)) exit() # comment to see winners winners = list(map(int, input().split())) print() print('Winners are:') for place in winners: print('{} {} {} {}'.format(place, eligible[place - 1].contest, eligible[place - 1].rank, eligible[place - 1].name)) print() print('| List place | Contest | Rank | Name |') print('|--|--|--|--|') for place in winners: print('| {} | {} | {} | [user:{}] |'.format(place, eligible[place - 1].contest, eligible[place - 1].rank, eligible[place - 1].name))  randgen.cpp#include "testlib.h" #include using namespace std; int main(int argc, char *argv[]) { if (argc < 4) { cout << "Command line arguments are: seed length nwinners" << endl; return 1; } int seed = atoi(argv[1]); int len = atoi(argv[2]); int nwinners = atoi(argv[3]); rnd.setSeed(seed); set winners; while (winners.size() < nwinners) winners.insert(rnd.next(1, len)); for (auto winner: winners) cout << winner << " "; cout << endl; return 0; } 
 » 8 days ago, # |   +1 I think wery0 liked this round wery much. Thanks, problemsetters (especially Mr GreenGrape) for good tasks and fast editorial. Also, I want to say thanks to MikeMirzayanov for great(grape) platforms: Codeforces and Polygon!!!!
•  » » 8 days ago, # ^ |   +34 grapeforces?
 » 8 days ago, # |   +3 How to solve E
•  » » 8 days ago, # ^ |   +25 Look at what happens to aj - aj - 1 (i.e., the difference array) after an operation.
•  » » » 8 days ago, # ^ |   0 Can you elaborate more, I did similar approach but obviously wrong since I got WA :D
•  » » » » 8 days ago, # ^ |   0 I think sum of squares of difference array remains constant
•  » » » » » 8 days ago, # ^ |   +21 when you make an operation, you actually make a swap in the difference array so you just have to check if the two arrays are the same
•  » » » » » » 8 days ago, # ^ |   0 Oh yeah, so that would be wrong. The correct approach would be to sort the difference arrays and check if both are same.
•  » » » » » » » 8 days ago, # ^ |   +5 by "the two arrays are the same" i meant the two difference arrays. You obviously have to sort them because if not any good test would have two identical vectors ;)
•  » » » » » » » » 8 days ago, # ^ |   0 Sorry, I was not saying that your approach is wrong. I was pointing out the mistake in my approach where I said that the sum of squares of difference array remains constant
•  » » » » 8 days ago, # ^ |   +8 Seems to me that you can shift the difference array arbitrarily around, since you can swap any two positions. Also, the first and last position of c and t must be the same anyhow. Hence, you just need to check if t can be made.
•  » » » 8 days ago, # ^ | ← Rev. 2 →   0 Did we just have to check if there exists cj - cj - 1 = ti - ci - 1 such that j ≥ i?
•  » » » » 8 days ago, # ^ |   +2 Actually we just need to sort the difference arrays and check if they are same.
•  » » » 8 days ago, # ^ | ← Rev. 2 →   +3 Wow! That's a great observation.How did you notice that? :)
 » 8 days ago, # | ← Rev. 2 →   +8 Many people used pow function in A which will overflow but those ran fine. Can someone provide a test case on which these overflow solutions will be wrong if any?
•  » » 8 days ago, # ^ | ← Rev. 2 →   -9 [deleted]
•  » » » 8 days ago, # ^ |   +7 99 ^ 100.000 it's 200.000 digits long, no way it will fit
•  » » » 8 days ago, # ^ | ← Rev. 2 →   +15 10099999 is not equal to 1010.
•  » » » 8 days ago, # ^ |   +16 That's wrong. 1e2^1e5 = 1e200000.
•  » » » 8 days ago, # ^ |   +10 Its not multiplication, hence do-not add powers
•  » » » 8 days ago, # ^ |   +10 it's 1e(2*1e5) not 1e10. ((a^x)^y) = (a^(x*y))
•  » » » 8 days ago, # ^ |   +8 I guess everybody is doing their part...sir, (102)105 is not equal to 1010.
•  » » » 8 days ago, # ^ |   +15 my part: 100105 isn't equal to 1010 sir
•  » » 8 days ago, # ^ |   0 91 11 1 1 1 1 1 1 1 1 1 1 1
•  » » 8 days ago, # ^ |   +11 I hacked two solutions with pow using 99 99 1 0 0 0 ... 0.
•  » » » 8 days ago, # ^ |   0 Is overflow treated as error? Values mod2 will be fine even after overflow, right?
•  » » » » 8 days ago, # ^ |   +5 pow doesn't operate on integer. You will get a floating point number, that is very unprecise and converting it to an integer will return something bad.
•  » » » » » 8 days ago, # ^ |   +8 Feelsbad then, bcs i saw 3 people using this :(
•  » » » 8 days ago, # ^ | ← Rev. 2 →   +3 Is this for just the precision problems with the function pow?If yes, so what about the result being not fitting in long long? how to hack it, please?
•  » » » » 8 days ago, # ^ | ← Rev. 4 →   0 When pow(x,y) is very large then it will become inf which will make result inf.In C++ inf%2 is 0 which means they have defined it as even.So using any big number for which answer is odd will break the normal solution.
•  » » 8 days ago, # ^ |   0 Luckily overflow results in values modulo 2^31 or 2^63 so it doesn't change the parity.
•  » » 6 days ago, # ^ |   0 Overflow solution will not be wrong because overflow will preserve parity. (Because it happens in cycles of 2^{32} or 2^{64})
 » 8 days ago, # |   +20 A was more interesting than usual. :)
 » 8 days ago, # |   +30 How to solve D?
•  » » 8 days ago, # ^ |   0 Did not solve it, but if im not mistaken you can decrease each value to ={1,2,3}. And then apply DP.
•  » » » 8 days ago, # ^ |   +57 Nope. You should set that value to {1,2,3,4}. Consider the following testcase: 12 4 1 2 3 1 2 3 2 3 4 2 3 4.
•  » » 8 days ago, # ^ | ← Rev. 3 →   +27 Just note that you don't need to remove the same consecutive triplet more than 2 times, because otherwise you could have just gotten the same result by removing each number separately. This in turn allows for a DP solution. Just go through the numbers in sorted order and keep track of how many consecutive triplets the previous number and the previous previous number have been a part of.EDIT: Some clarifications. The dp state is how many you have left of the previous number and how many you have left of the previous previous number. And because you only want to remove the same consecutive triplet at most twice you can assume that you have at most 2 of the previous previous number.
 » 8 days ago, # |   +15 Very nice problem C!
•  » » 8 days ago, # ^ |   +1 how to solve it?
•  » » » 8 days ago, # ^ |   0 Hint: Brute force f(a) for small values of a and look for a pattern.
•  » » » » 8 days ago, # ^ |   0 i don't know how to deal 2^even-1
•  » » » » » 8 days ago, # ^ |   0 just brute force it for all the 2^even-1
•  » » » » » 8 days ago, # ^ |   +4 I guess you can prove that the largest divisor is always the answer
•  » » » » » 8 days ago, # ^ |   +16 After I brute forced them, I hard coded them into my solution.
•  » » » » 8 days ago, # ^ |   0 where i can see the all solutions
•  » » » » » 8 days ago, # ^ |   +54 For a = 2k - 1,the binary form is 11111....Consider a 1 ≤ b < a,we will find that ,so the gcd is .Its greatest value is a's largest divisor(not including a itself).Iterating divisor can be done in .
•  » » » 8 days ago, # ^ |   0 I am not submitted yet but what i get is basically what XOR is — odd number of ones gives you set bit.example 0001 1110 gives you 1111 so take the first case -all the bits is not setso first you need to check whether the given number having all the bits is set or not if they are not then just add those bits which are not set. example — a given number is a= 5 — its binary representation is (101).its given that you need to take a number which is less than current number(a) so you just need to take b as sum of those whose bit is not set in current number (a) a=5 binary = 101, b=2 its binary=10 when you xor it you will get all bits set means when you xor (a^b) (101 ^10)=you will get 111 and the and of those ( and the and of (a&b) is zero so when you compute gcd of(aXORb ,a and b) you will get a^b itself as (a and b) is zero so here is the first case2 nd case -suppose all the bits is set example 15 its bits representation is 1111 so you just need to check what highest number is divisible by a examplejust run a loop max int out=1; for(int i=2;i*i<=in;i++){ if(in%i==0){ if(out
 » 8 days ago, # |   0 how to solve B?
•  » » 8 days ago, # ^ |   +1 Note that if we are allowed n pieces of tape (when k = n), we can end up using a minimum total length of n cm. (We would use 1 cm for each broken segment).Consider the case where k = n-1. Then we need one piece of tape to cover (at least) 2 broken segments. We want to minimize the total length, so we want this piece of tape to cover the two adjacent segments that are closest. In general, if we have k pieces of tape, then we will have to merge (n-k) adjacent segments.Let's define the adjacent difference of segments i and (i+1) as (b[i+1] — b[i] — 1).So for b[i] = 3 and b[i+1] = 4, the adjacent difference would be 0 and we can tape over both with 1 piece of tape of length 2.We can generalize this by sorting all adjacent differences then taking the sum of the (n-k) smallest ones and adding n to that sum to get our final answer.
•  » » » 8 days ago, # ^ |   0 I'm very bad at ad-hoc problems but this particular one seems to offer two general observations that are worth for me to learn: (1) applying the pigeonhole principle to constrain the solution: "if you can use only n-1 tapes than at least two of the broken segments must be joined together by one tape"and more importantly (2) adding up the results in a special order: in this case, adding the in-between lengths separately from the n target segments. I was of course trying to add up all contiguous things together.Great problem. If anyone can think of ad-hoc problems with a similar flavor, perhaps where you have to apply idea #2, I would love to know.
 » 8 days ago, # |   +87 Best problem C I've ever seen~
•  » » 8 days ago, # ^ |   +156 Guess, who is the writer!
•  » » » 8 days ago, # ^ |   +12
•  » » » » 8 days ago, # ^ |   0 lol :
•  » » 8 days ago, # ^ |   -7 what about d ,e ,f , g, h . they are not good ?
•  » » » 8 days ago, # ^ |   0 Well I meant among all the contests I've ever seen this is the best C problem.All the problems are good!
•  » » 8 days ago, # ^ |   0 Can you explain the approach for it? I am not getting it :(
 » 8 days ago, # |   +2 Can someone explain why binary searching for the answer (minimum length) with a greedy function wrong in case of B problem? I kept on getting WA on pretest 7. A hint would suffice.
•  » » 8 days ago, # ^ |   0 What is your greedy function?
•  » » » 8 days ago, # ^ | ← Rev. 2 →   0 For a fixed length, i did a sliding window, starting from a broken point and covering as many points as I can until the total used length is <= maximum length in current call to the greedy function. Then I would start from the next index and do the same until either all points are covered or can't be covered.
•  » » » » 8 days ago, # ^ | ← Rev. 2 →   +1 How do you decide whether to start a new piece of tape at the next broken point vs extending the current piece of tape to cover the next broken segment?I added the description of my solution to B here.
•  » » » » » 8 days ago, # ^ |   +3 Understood the mistake. Thanks.
•  » » » » » » 8 days ago, # ^ |   +1 Can you please give some test case where the binary search approach will fail... I also wrote solution using Binary Search but WA on pretest 7
•  » » » » » » » 8 days ago, # ^ | ← Rev. 2 →   +6 10 500000 41 30003 61255 101250 141246 171244 202492 242483 282475 305289Correct Ans: 185309 with these indices forming groups [1,2,3][4][5,6,7,8][9,10]
 » 8 days ago, # |   0 B was harder than C for me. LOL
•  » » 8 days ago, # ^ |   0 i found c to be easier than a and b !
 » 8 days ago, # |   0 how to solve B?no idea :(
•  » » 8 days ago, # ^ |   0 you need to find k minimum difference pairs from neighbourhoods
•  » » 8 days ago, # ^ |   +3 the problem is almost similar to atcoder beginner contest 117 problem C which i solved just today . find the maxx sum = arr[last] — arr[first] you need to find the gap between each array elemets , sort them , and then start sweeping them k times . subtract difference[i] each time from maxx sum .
 » 8 days ago, # |   +12 Well...I think the pretest of problem A is too weak because I passed the pretest while writing x&1 wrong as x^1...
 » 8 days ago, # |   +46 E is one of the best problem E ever on Codeforces, until I realized that one can fail system test because they forget to check if c[1] ≠ t[1] or c[n] ≠ t[n].
•  » » 8 days ago, # ^ |   +27 GreenGrape influence is always real.
•  » » 8 days ago, # ^ |   +64 Hmm, you don't really have to check c[n] ≠ t[n]
 » 8 days ago, # |   -34 Does this count as cheating? I saw a submission for C where the user created a map of all the possible input a's to the answer. Probably these answers were brute forced earlier and logged?
•  » » 8 days ago, # ^ | ← Rev. 2 →   +14 Nope, in some problems that's the actual intended solution
•  » » 8 days ago, # ^ |   +16 If you say this then tourist is cheating.
•  » » » 8 days ago, # ^ |   0 haha , why ?
•  » » » » 8 days ago, # ^ |   0 As what a considerable amount of people have done, he also hardcoded the answer for input in form 2n - 1.
•  » » » » » 8 days ago, # ^ |   0 yes .
•  » » 8 days ago, # ^ |   0 Almost everyone did this
•  » » 8 days ago, # ^ |   +11 Precomputation is a very legitimate strategy. ICPC World Finals 2018 Problem J solution used precomputation.
•  » » » 5 days ago, # ^ |   +4 Spoiled >:(
 » 8 days ago, # |   +15 What is test case 35 in D? Many people including me are failing on that
 » 8 days ago, # |   +98 Problem E was on AtCoder: link.
•  » » 8 days ago, # ^ | ← Rev. 7 →   0 good that's why i like mokoto , his mind is awesome , problem b was also similar to abc 117 cthanks to mokoto i solved it !
•  » » 7 days ago, # ^ |   +3 That's how I solve pE within 5 minutes lol
 » 8 days ago, # |   -10 Any idea how to solve D .
 » 8 days ago, # |   +5 even the submission that i didnt have time to submit is WA .. now I can rest in peace
 » 8 days ago, # |   +37 I love this contest, where the difficulty is in ideas not just complex code.
 » 8 days ago, # |   0 When can we konw the final result ?
•  » » 8 days ago, # ^ |   -10
 » 8 days ago, # |   0 Just for curiosity, why are there no hacking session for this contes_- _t? The contests I participated since were rated for Div2 so... just curious.
•  » » 8 days ago, # ^ |   +9 Hacking sessions are only available for Educational Rounds and Div.3 contests. ;)
•  » » 8 days ago, # ^ |   0 thanks :) glad to check ACs right after!
 » 8 days ago, # |   0 So I was using ideone for this contest since I'm not home and I didn't want to install codeblocks on this pc and I got a message that bruce_knight copied my code for B. The message said I could be getting banned for this ? What are my options ?
 » 8 days ago, # | ← Rev. 2 →   -29 Even tourist couldn't solve H ?There must be something wrong with tourist or that question...
•  » » 8 days ago, # ^ |   -8 There must be something wrong with tourist...
•  » » 8 days ago, # ^ |   0 You should know that the author might prepare it for more than 2 hours. But tourist just have less than 1.5 hours
 » 8 days ago, # | ← Rev. 2 →   +41 I think there are some problems that have appeared in another place. For example: E: BZOJ5071 I'm sorry that the language for this problem is Chinese, but this problem is similar to Problem E （My English is not good）
•  » » 8 days ago, # ^ |   0 that is the strategy of tourist
 » 8 days ago, # |   0 Can someone explain the logic behind E?
•  » » 8 days ago, # ^ |   +88 Consider the difference array d, i.e, di = ai + 1 - ai, then any operation is swapping two elements in the difference array.
 » 8 days ago, # |   +8 In api expected rating change shows +34 but in rating changes it shows -4
 » 8 days ago, # |   0 I had almost solved problem G but there was not enough time.... It's an interesting problem to me though.
 » 8 days ago, # |   0 This was my 2nd contest solved A,B. Initially afraid of submitting the solution but finally submitted it and got accepted. Aiming to solve more in coming contests. Thanks to the organizing team.
 » 8 days ago, # |   +13 Can F be done with centroid decomposition ? For each leaf ,go up to root via centroids storing in each centroid ,distance of leaf from it and its index. For each centroid we keep this list sorted on the basis of indices. While answering a query, we go up to root from vertex v via centroids, at each centroid, we need to query min dist of leaf from this centroid whose index lies in L to R(simple RMQ).Take this minimum across all centroids in my path to root .Is this approach correct ? will it fit the TL ?
•  » » 8 days ago, # ^ |   +5 Correct, but I guess too slow: 49601147
•  » » 8 days ago, # ^ |   +10 It is correct and my solution passed. https://codeforces.com/contest/1110/submission/49592451
 » 8 days ago, # |   +6 I think the rating changes for today's contest were not correct. As the "CF Predictor" extension showed something else and the rating changes were different.Kindly look into the matter.
•  » » 8 days ago, # ^ |   +1 +1
 » 8 days ago, # |   +20 Problem C was a great question. The only case you had to take care of was when a was of the form 2^x-1. The trick involved was gcd(a&b, a^b) = gcd(b, a-b) = gcd(a, b). So we need to find the greatest proper divisor of a. Kudos to the writers!
 » 8 days ago, # |   0 Can D be solved using a recursive approach without running into "Memory limit exceeded"?
•  » » 5 days ago, # ^ |   0 Yes, refer to 49598852. Very elegant.
 » 8 days ago, # |   0 Hey,guys.I have a problem on 1110D — Jongmah. I passed the test 1 locally on my machine,however get WA on the net. Here is running ID #49593747 Help me please!!!QAQ
•  » » 8 days ago, # ^ |   0
 » 8 days ago, # |   +5 When will the editorial be published?
•  » » 8 days ago, # ^ |   +5 Well,I have already seen it in the Recent actions
 » 8 days ago, # |   +1 Thanks to this contest, I have become a candidate master. I'm so happy.
 » 4 days ago, # |   0 KAN, Why 2 links to the same editorial are added to contest page?