### _kun_'s blog

By _kun_, history, 5 months ago, translation, ,

Hi, codeforces!

I am happy to invite you to the codeforces round #493, which happens at Jul/01/2018 17:05 (Moscow time).

This round writers are — Ildar 300iq Gainullin, Grigory gritukan Reznikov, Mike MikeMirzayanov Mirzayanov, and me, _kun_.

Big thanks for people, who tested round — Shiqing cyand1317 Lyu, Andrew GreenGrape Rayskiy, Ivan isaf27 Safonov, Alexey aleks5d Upirvitsky. Also thanks to Mike MikeMirzayanov Mirzayanov and Nikolay KAN Kalinin for help with round preparation.

And to Mike MikeMirzayanov Mirzayanov for codeforces and polygon systems.

Traditionally, there will be 5 problems for 2 hours. I hope you will enjoy the problemset, good luck and have fun!

Scoring distribution will be published before the round.

UPD: Scoring distribution is as follows:

Div1: 500 1250 1500 2500 3000

Div2: 500 1000 1250 2000 2500

You may also want to check this post for post-contest stream.

UPD2: The editorial was published!

UPD3: Congratulations to winners!

Div1:

Div2:

•
• +274
•

 » 5 months ago, # |   +159 Wow you've mentioned mike three times.
•  » » 5 months ago, # ^ |   +68 Then Mike declares this round is triple-rated
•  » » 5 months ago, # ^ |   +18 Holy Trinity of codeforces
•  » » 5 months ago, # ^ |   -13 because "Mike WiLL Made It"
 » 5 months ago, # |   -111 Are we allowed to code in Q#?
•  » » 5 months ago, # ^ |   -26 we are allowed to code in C# :p
 » 5 months ago, # |   0 5 problems in both divisions?
•  » » 5 months ago, # ^ | ← Rev. 2 →   +75 5 problems per division, 7 in total, 3 shared.
•  » » 5 months ago, # ^ |   -21 I love it when codeforces community downvote for no reason at all.
•  » » » 5 months ago, # ^ |   0 Me too XD
•  » » » » 5 months ago, # ^ |   -9 You are god _/_
•  » » » 5 months ago, # ^ |   -11 And Thats why i hate u
 » 5 months ago, # |   +82 Cool, we get to see 5 minutes of Spain-Russia.
•  » » 5 months ago, # ^ |   +5 Unusual time for World Cup. :'(Have to solve all problems within 55 minutes to watch second up fully. :P
 » 5 months ago, # |   0 Hope the problem statement is as short as announcement :)
 » 5 months ago, # |   +65 Finally Green GreenGrape!I see what you have done with HTML ( ͡° ͜ʖ ͡°)
•  » » 5 months ago, # ^ |   +45 The dream comes true!
•  » » » 5 months ago, # ^ | ← Rev. 3 →   +3 Actually there are also purple grape that matches your rating
 » 5 months ago, # | ← Rev. 2 →   -158 My solution for Problem 1000A -Codehorses T-shirts1000B — Light it uphttps://coolforces.blogspot.com/2018/06/1000b-codeforces-light-it-up-solution.html
•  » » 5 months ago, # ^ |   +58 Can you tell us, why do we need this information on page related to completely different round?
•  » » » 5 months ago, # ^ | ← Rev. 2 →   +74 I posted it here by mistake..I meant to post it in its round page,but i made a terrible mistake,sorry for that.
 » 5 months ago, # |   -95 hope this contest has a lot of hacking stuff...:)
•  » » 5 months ago, # ^ |   -21 nooo
 » 5 months ago, # |   -243 Q: Why did the student throw his watch out of the school window? A: He wanted to see time fly. Q: Why do they never serve beer at a math party? A: Because you can't drink and derive... Q: What do you say when you are comforting a grammar nazi? A: There, Their, They're Q: What's another name for Santa's elves? A: Subordinate Clauses. Q: Why did the student take a ladder to school? A: Because he/she was going to high school! Q: What is Grammar? A: The difference between knowing your shit, and knowing you're shit. Q: What three candies can you find in every school? A: Nerds, DumDums, and smarties. Q: What's a teacher's favorite nation? A: Expla-nation. Q: Why didn't the skeleton go to the school dance? A: He didn't have anybody to take. (any BODY) Q: Why didn't the quarter roll down the hill with the nickel? A: Because it had more cents. Q: What's the difference between a dead prostitute and school? A: School still sucks! Q: What happened to the plant in math class? A: It grew square roots. Q: What do you call a laughing jar of mayonnaise? A: LMAYO Q: What is a proof? A: One-half percent of alcohol. Q: Why did the chicken cross the moebius strip? A: To get to the same side. Q: Why did the cross-eyed teacher lose her job? A: Because she couldn't control her pupils? Q: What kind of school do you find on a mountain top? A: Heights school. Q: Why couldn't the moebius strip enroll at the school? A: They required an orientation. Q: How did the geography student drown? A: His grades were below C-level Q: What does a mathematician do about constipation? A: He works it out with a pencil. Q: Why is a math book always unhappy? A: Because it always has lots of problems. Q: Why don't you do arithmetic in the jungle? A: Because if you add 4+4 you get ate! Q: Why is 6 afraid of 7? A: Because 7 8 9 Q: What is a chalkboard's favorite drink? A: hot chalk-olate! Q: What do you get when you mix sulfur, tungsten, and silver? A: SWAG Q: What did the fish say when he hit the wall? A: Dam! Q: How does a math professor propose to his fianc�e? A: With a polynomial ring! Q: What's the longest word in the dictionary? A: Rubber-band -- because it streches. Q: If H2O is the formula for water, what is the formula for ice? A: H2O cubed. Q: How does Juliet maintain a constant body temperature? A: Romeostasis Q: What happened when the teacher tied everyones laces together? A: They went on a class trip. Q: Why don't farts graduate from high school? A: Because they always end up getting expelled! Q: Why did the scientist go to the tanning salon? A: Because he was a paleontologist. Q: Why wasn't the geometry teacher at school? A: Because she sprained her angle!! Q: What is the most erotic number? A: 2110593! Q: Why? A: When 2 are 1 and don't pay at10tion, they'll know within 5 weeks whether or not, after 9 months, they'll be 3. Q: What is the difference between a mathematician and a philosopher? A: The mathematician only needs paper, pencil, and a trash bin for his work — the philosopher can do without the trash bin. Q: What is non-orientable and lives in the ocean? A: Mobius Dick. Q: Why did the giraffe get bad grades? A: He had his head in the clouds. Q: What is the difference between a Ph.D. in mathematics and a large pizza? A: A large pizza can feed a family of four Q: How do you call the largest accumulation point of poles? A: Warsaw! Q: What do you call a music teacher with problems? A: a trebled man. Q: How did the Janitor Die? A: HE Kicked the bucket Q: What is the fastest way to determine the sex of a chromosome? A: Pull down its genes. Q: Did you hear they're changing the flooring in daycare centers? A: They're calling it infant-tile! Q: What do you get when you cross Sonic The Hedgehog and Curious George? A: 2 Fast 2 Curious Q: What gets white as it gets dirty? A: Chalkboard Q: Why did the music teacher need a ladder? A: To reach the high notes. Q: What do you call the leader of a biology gang? A: The Nucleus Q: Why did the two 4's skip lunch? A: They already 8 (ate). Q: Name a bus you can never enter? A: A syllabus Q: What did the mathematician's parrot say? A: A poly "no meal" Q: Why do chemistry professors like to teach about ammonia? A: Because it's basic material. Q: If H20 is water what is H204? A: Drinking, bathing, washing, swimming. . . Q: What did one math book say to the other? A: Don't bother me I've got my own problems! Q: why did the teacher write on the windows? A: Because he wanted it to be very clear. School is pointless. English: We speak it. History: They're dead. Math: We have calculators. Spanish: We have Dora. If school isn't a place to sleep then home isn't a place to study. I wish school was as easy as half the girls in it. Wishing your GPA looked like those gas prices. If teachers are so smart, why are they still in school? That awkward moment when an emo kid goes to McDonald's and orders a Happy Meal. Hey Google, why dont you sit next to me during my exam? If sleep is really good for the brain, then why is it not permitted in school? If you make a camp to help kids with ADHD, then is it a concentration camp? If a picture is worth a thousands words, then why shouldn't we judge a book by its cover? To steal ideas from one person is plagiarism. To steal from many is research. My homework brings all the Asians to the yard, and they're like, "It wasn't that hard." That awkward moment when you go to a new school and don't get a vampire boyfriend. 2 things you can learn in school: Texting without looking and teamwork on tests. C.L.A.S.S. = Come Late And Start Sleeping M.A.T.H. = Mental Abuse to Humans S.C.H.O.O.L. = Seven Crappy Hours Of Our Life S.C.H.O.O.L. = Sucks Children's Happiness Out Of Life Did you hear oxygen and magnesium got together? OMg! Teacher: If a chicken give you meat, a pig give you bacon, what does a fat cow give you? Student: HOMEWORK! Teacher: "Why are you talking during my lesson?" Student: "Why are you teaching during my conversation?" Teacher: "Simon, can you say your name backwards?" Simon: "No Mis." Mom: What did you learn in school? Son: Not enough I have to go back again tomorrow. Teacher: How can we keep the school clean? Student: By staying at home. Teacher: What is irony? Student: "Irony is when something has the chemical symbol Fe." Boy: At my school they won't let us have holes in our pants. Cheap Dad: "Yeah, but they let you have holes in your head." (1) Say "Eye" (2) Spell the word "Map" (3) Say "Ness". SCHOOL: 2 + 2 = 4. HOMEWORK: 2 + 4 + 2 = 8. EXAM: Matthew has 4 apples, his train is 7 minutes early, calculate the sun's mass. Catholic School A father who is very much concerned about his son's bad grades in math decides to register him at a catholic school. After his first term there, the son brings home his report card: He's getting "A"s in math. The father is, of course, pleased, but wants to know: "Why are your math grades suddenly so good?" "You know", the son explains, "when I walked into the classroom the first day, and I saw that guy on the wall nailed to a plus sign, I knew one thing: This place means business!" Library A Texan was visiting Harvard University, and was lost. He stopped a student and asked, "Do you know where the library is at?" "I sure do," replied the student, "But, you know, you're not supposed to end sentences with prepositions." "What?" "Prepositions. You ended your sentence with an 'at', which you aren't supposed to do." "Oh, ok," said the Texan, "Do you know where the library is at, asshole?" Grammar walks into a Bar Three intransitive verbs walk into a bar. They sit. They Drink. They Leave A comma splice walks into a bar, it has a drink and then leaves. A dangling modifier walks into a bar. After finishing a drink, the bartender asks it to leave. A Question mark walks into a bar? Two Quotation marks "walk into" a bar. A gerund and an infinitive walk into a bar, drinking a drink. The bar was walked into by the passive voice. The past, the present, and the future walked into a bar. It was tense. A synoynm ambles into a pub. A gerund and an infinitive walk into a bar, drinking to drink. A hyperbole totally ripped into this bar and destroyed everything. A run on sentence walks into a bar it is thirsty. Falling slowly, softly falling, the chiasmus collapsed to the bar floor. A group of homophones wok inn two a bar. Human Body The teacher asks, "Flora, what part of the human body increases ten times when excited?" Flora blushes and says, "That's disgusting, I won't even answer that question." The teacher calls on Johnny: "What part of the human body increases ten times when excited?" "That's easy," says Johnny. "It's the pupil of the eye." "Very good, Johnny," responds the teacher. "That's correct." She then turns to Flora and says, "First, you didn't do your homework. Second, you have a dirty mind. And third, you're in for a BIG disappointment." Applying For A Job There are three people applying for the same job. One is a mathematician, one a statistician, and one an accountant. The interviewing committee first calls in the mathematician. They say "we have only one question. What is 500 plus 500?" The mathematician, without hesitation, says "1000." The committee sends him out and calls in the statistician. When the statistician comes in, they ask the same question. The statistician ponders the question for a moment, and then answers "1000... I'm 95% confident." He is then also thanked for his time and sent on his way. When the accountant enters the room, he is asked the same question: "what is 500 plus 500?" The accountant replies, "what would you like it to be?" They hire the accountant. George W Bush George W. Bush visits Algeria. As part of his program, he delivers a speech to the Algerian people: "You know, I regret that I have to give this speech in English. I would very much prefer to talk to you in your own language. But unfortunately, I was never good at algebra..." Bathroom Boy: Can I go to the bathroom? Teacher: Only if you can say the alphabet Boy: OK abcdefghijklmnoqrstuvwxyz Teacher: Where's the p? Boy: "Half way down my leg." Little Boy Son: "My math teacher is crazy". Mother: "Why?" Son: "Yesterday she told us that five is 4+1; today she is telling us that five is 3 + 2." Wife or Girlfriend A physicist, a mathematician and a computer scientist discuss what is better: a wife or a girlfriend. The physicist: "A girlfriend. You still have freedom to experiment." The mathematician: "A wife. You have security." The computer scientist: "Both. When I'm not with my wife, she thinks I'm with my girlfriend. With my girlfriend it's vice versa. And I can be with my computer without anyone disturbing me..." Girlfriend "What happened to your girlfriend, that really cute math student?" "She no longer is my girlfriend. I caught her cheating on me." "I don't believe that she cheated on you!" "Well, a couple of nights ago I called her on the phone, and she told me that she was in bed wrestling with three unknowns..." Psychic Hotline A frog telephones the Psychic Hotline. His Personal Psychic Advisor tells him, "You are going to meet a beautiful young girl who will want to know everything about you." The frog is thrilled, "This is great! Will I meet her at a party?" "No," says his advisor, "in her biology class." Prostitute Teacher: Describe hydrogen Student: It is a prostitute element Teacher: Who taught you that? Student: You said it does not belong to a particular group and it reacts with almost all the elements in the periodic table. Water Teacher: What is the formula for water? Student: H, I, J, K, L, M, N, O Teacher: That's not what I taught you. Student: But you said the formula for water was...H to O. Cat Teacher asked, Why is your cat with u in school? Kid says (crying), "I heard daddy tell mommy, I'm eating that p*ssy when the kids leave!" Bad Student One day I went into school all puzzled and said to my teacher "Miss will i get into trouble for something i havent done ?" She said "No why" I said " Because I havent done my homework. Lab At the end of the semester, a 10th-grade chemistry teacher asked her students what was the most important thing that they learned in lab. A student promptly raised his hand and said, "Never lick the spoon." School Paper John wrote an article in the school paper about how this chemical, dihydrogenoxide, has killed over 100,000 people world wide, usually through inhalation. The story also went on that even if you wash your food you can never get this chemical off. No matter what you do you will be exposed to this very dangerous chemical every day of your life until you die. The story finished by claiming that there needs to be a government research group founded to find a solution. yada yada yada Anyway, the local newspaper reporter read this story in his daughters school paper and decided to do a follow up. If you haven't figured it out di-hydrogen-oxide is the correct name for H2O or water. The deaths that he was quoting were from drownings. Anyhow, this reporter ran the article in a paper and started a local push for a government study before they realized what the story was about. Late To School A student comes late to school. His teacher asked him "Why were you late to school?" Student: "My mom and dad were fighting." Teacher: "What does your parents fighting have to do with you being late for school?" Student: "One of my shoes was in my mom's hand and the other one was in dad's hand..... Do You Know Who I am? Boy: Your stupid! Girl: Do you know who I am? Boy: No. Girl: I'm the principals daughter. Boy: Do you know who I am? Girl: No. Boy: Good. (walks away)
•  » » 5 months ago, # ^ |   -50 down vote me too
 » 5 months ago, # |   -134 Upvote if you think the main characters of this contest should be Messi and Ronaldo.
•  » » 5 months ago, # ^ |   -82 Hey mate! I totally agree with you.
•  » » 5 months ago, # ^ |   -62 I want Mourinho and Guardiola
•  » » » 5 months ago, # ^ |   -60
•  » » » » 5 months ago, # ^ |   -26 super mems
 » 5 months ago, # |   -25 Hope the statement be as short as the announcement XD.
•  » » 5 months ago, # ^ | ← Rev. 3 →   +33 icpc_expert said the same and got a ton of downvotes,...It's a cruel world, isn't it? :D
 » 5 months ago, # |   0 Auto comment: topic has been updated by _kun_ (previous revision, new revision, compare).
»
5 months ago, # |
-62

# Is It Rated?

 » 5 months ago, # |   -22 Hope the statements is as short as the blog.
 » 5 months ago, # |   +15 remember, I'll hack you!
•  » » 5 months ago, # ^ |   0 and i won't let u do so
»
5 months ago, # |
Rev. 2   -30

# ?detaR tI sI

 » 5 months ago, # |   +1 I would like to know from the community that is it fair that a re-submission which has the passed pretest should be considered for deducting points in a contest?I had submitted one solution which i didn't think would pass the pretests so i re submitted with minor change before the result of first one but both the submissions passed the pretests, so i would like to know WHY or WHY NOT points should be deducted for the second correct re submission?
•  » » 5 months ago, # ^ |   0 Because there are system tests and only your second submission will be considered for system test.
•  » » » 5 months ago, # ^ |   0 I m sry but i didnt get ur answer's relevance to my question and nor the point why only second one would be considered for the system testing?Btw do u mean my second submission or second solution which has passed pretests?
•  » » 5 months ago, # ^ |   +1 The only situation when you actually have to resubmit is when you find a bug in your code after passing pretests. It's fair that you lose some points in this case since you didn't solve the problem correctly.In your case you were taking a conscious risk when resubmitting, since you hadn't seen the verdict yet for your previous submission.
•  » » » 5 months ago, # ^ |   0 Fair answerBut then why should the first solution that has passes the pretest be skipped? what if that solution had passed the main test cases...? why shouldn't i been given points according to that?
•  » » » » 5 months ago, # ^ |   0 cause there would be lots of such solutions, which CF would have needed to test, and that would take a lot of time.
•  » » » » 5 months ago, # ^ |   +1 Because then sometimes I would submit 5 different solutions to a problem hoping that one of them passes systest.
•  » » » » » 5 months ago, # ^ |   0 Whats the problem in that?U may deduct point for that during contest for multiple solutionbut if ur first ans is correct one out of those 5 then why shouldn't u be given points according to that? The system testing then can skip the rest of them.....
•  » » » » » » 5 months ago, # ^ |   +1 Here's another problem specific to CF. Some people can troll by intentionally making holes in their solutions and make a bunch of pretests passes, then other people would benefit a lot from just hacking their solutions.
•  » » » » » » » 5 months ago, # ^ |   0 Ya that can be difficult issue to deal with....I think that's it...Thank you all for your time
 » 5 months ago, # |   +61 MathForces
 » 5 months ago, # |   +7 Is it ridiculous to have two counting problems in one round?
•  » » 5 months ago, # ^ |   +34 3 in a row
 » 5 months ago, # |   -11 is hacking not there in this round
•  » » 5 months ago, # ^ |   0 Yep surely there was!
 » 5 months ago, # |   +44 Not the kind of problems that I hoped for
•  » » 5 months ago, # ^ |   -11 is hacking not there in this round
 » 5 months ago, # |   0 I finished A~D all within 31ms and 12KB...What a strange contest!
 » 5 months ago, # |   +70 omg just don't tell me that this actually solves div1B/div2D vector a = {0, 4, 10, 20, 35, 56, 83, 116, 155, 198, 244, 292, 341}; if (n < a.size()) return a[n]; else return a[12] + 49 * (n - 12); 
•  » » 5 months ago, # ^ | ← Rev. 3 →   +19 You only have to use the first 11 elements. I mean: vector a = {0, 4, 10, 20, 35, 56, 83, 116, 155, 198, 244, 292}; if (n < a.size()) return a[n]; else return a[11] + 49 * (n - 11); 
•  » » 5 months ago, # ^ | ← Rev. 2 →   0 It is correct, see editorial (coming soon) for proofs.
•  » » 5 months ago, # ^ | ← Rev. 2 →   +10 I hope not, because I did that but got WA on pretest 9 :(RIP forgot to cast to a long
•  » » » 5 months ago, # ^ |   +4 Me too. I used %d instead of %lld and got WA. FML
•  » » 5 months ago, # ^ |   0 int is too small
•  » » » 5 months ago, # ^ |   +10 I have #define int long long
•  » » 5 months ago, # ^ |   0 How did you get this equation?
•  » » » 5 months ago, # ^ |   +11 I found this by looking at the brute force and finding pattern
•  » » » » 5 months ago, # ^ |   +3 I watch at it and didn't find anything for about 1.5 hour.....
•  » » » » » 5 months ago, # ^ |   +3 Look at difference of f[i+1] and f[i] for first 30 numbers for example and you'll easily see the pattern.
•  » » » » 5 months ago, # ^ |   0 What is the brute force for this ??
•  » » » » » 5 months ago, # ^ |   0 Something like: set st; for(int i=0;i<=n;i++) for(int v=0;v+i<=n;v++){ for(int x=0;x+v+i<=n;x++){ int l = n - i - v - x, cur = i+v*5+x*10+l*50; st.insert(cur); } } cout << st.size() << '\n'; 
•  » » » » » » 5 months ago, # ^ | ← Rev. 2 →   0 Deleted
•  » » » » » » 5 months ago, # ^ |   0 Thanks!
•  » » » » » » 5 months ago, # ^ |   0 can you explain this in some simpler words? what are we trying to do here
•  » » » » » » » 5 months ago, # ^ |   0 We just enumerate every possible combination of I, V, X, and L, and count the number of numbers we can represent.
•  » » » » 5 months ago, # ^ |   0 Can you tell your approach? Did you know from the beginning that a pattern should be found out?
•  » » » » » 5 months ago, # ^ |   +27 I wasted about 30 minutes trying differences and things on OEIS. Then I just said "wtf" and input 100 to my brute force and I was surprised at how small it was. Then I tried incrementing by 1 and noticed that each time it was always 49 increase. So I got to this solution
•  » » 5 months ago, # ^ |   +1 I found that LIIIII && XXXXXV represents same number so, we need to subtract all the numbers containing them and then a got a weird recurrence relation but did not got the idea of find a pattern.
 » 5 months ago, # |   -29 Why are there 2 combinatorics problems in this round, and why can B be solved with brute force observations?
•  » » 5 months ago, # ^ |   +39 Because combinatorics is fun. Isn't combinatorics a very wide notion that can capture majority of CP problems?
 » 5 months ago, # |   -6 1908 solved C, 344 solved DThe problems were not measured correctly
 » 5 months ago, # | ← Rev. 2 →   +105 cheating ??
 » 5 months ago, # | ← Rev. 2 →   +19 div2E/div1C was a hard one, IMO...could somebody give a hint on its solution, please?
•  » » 5 months ago, # ^ |   +14 Use inclusion-exclusion principle.
•  » » » 5 months ago, # ^ | ← Rev. 2 →   +21 how do you reduce it to O(n) though? When I tried inclusion-exclusion I had to do cases on # of equal columns and # of equal rows which is O(n^2)..(for example when there is at least one equal row and one equal column, I got )
•  » » » » 5 months ago, # ^ |   +16 Fix r and use formula for (a + b)n
•  » » » » 5 months ago, # ^ |   0 sorry, but I'm a little bit confused :(shouldn't it be ?
•  » » » » » 5 months ago, # ^ |   0 oops, i replaced r,c with n-r and n-c (it doesn't change the value)
•  » » » » » » 5 months ago, # ^ |   0 makes sense ^_^thanks :)
•  » » » » » » 5 months ago, # ^ |   0 if you don't mind can you please give me some advise on how to think in such kinds of problems?thanks :)
•  » » » 5 months ago, # ^ |   +11 It makes me incredibly happy that I (probably) fixed all the sign and off-by-one errors in C at 18:07.
 » 5 months ago, # |   +22 Is there any way to hack consistently with regard to a segfault? There were a few times that I saw people accessing, say, s[n] when s only had n elements allocated to it, which should cause a segfault, but because of the magic of operating systems, segfaults only happen sometimes. These people will probably fail during systests, but I can't reliably hack because even if I submit a hack, the OS might not complain about a segfault and I'll get an unsuccessful hack. Is there any way around this or should I just not try to induce a segfault in a hack?
•  » » 5 months ago, # ^ | ← Rev. 2 →   +3 I also faced this issue. I think there is no way to hack such solution surely. I hope MikeMirzayanov may do something to handle the issue, for example, some cases may be added so that such solution don't get accepted. But by this way solution may not even pass the pretests and thus no way to hack — I am not sure though. By the way, you may create a blog post regarding this.
 » 5 months ago, # | ← Rev. 2 →   0 nice algorithmic problems :p
 » 5 months ago, # |   +23 Streaming now! Check out twitch.tv/ttocs45 for problem discussion.
 » 5 months ago, # | ← Rev. 2 →   +4 too much math
•  » » 5 months ago, # ^ |   +5 shouldnt be a problem for the great mathematician qkxwsm
 » 5 months ago, # |   +19 So much counting problem :(
 » 5 months ago, # |   +63 I bet a lot people tried oeis for div2D/div1B
•  » » 5 months ago, # ^ |   0 Yes I did. I took first 10 numbers as sample and that was a mistake.
 » 5 months ago, # |   +9 I misread problem A, and I thought it was asking about a split in which the sums are equal (instead of unequal). So, I asked them about the second sample why there is no answer for such case and their response was: They said "that one is also OK" and the correct answer should be -1, that made me confused for a lot of time at the beginning of the contest.
•  » » 5 months ago, # ^ |   +14 Ouch, it is my mistake.I misread you question as regarding first sample, I am very sorry.
 » 5 months ago, # |   0 constraints of div2 B should be bigger
•  » » 5 months ago, # ^ |   0 i was trapped by the constraint i thought it's using DP. until the contest ended and i realize i could solve it using greedy approach which took 15 minutes earlier for me to code it :(
•  » » » 5 months ago, # ^ |   0 with these constraints it became a lot easier too .
•  » » » 5 months ago, # ^ |   0 It can be solved with DP too.
•  » » » » 5 months ago, # ^ |   0 i know, but it took me longer to solve it using DP. cuz i've just started learning DP hahaha
•  » » » » 5 months ago, # ^ |   0 what are the states for this? should I solve for every B (from 1->b) and in the end return?
•  » » » » » 5 months ago, # ^ |   0 States are [pos][bitcoins left][previous cut].http://codeforces.com/contest/998/submission/39832055
 » 5 months ago, # |   +12 Can anyone prove the function of problem div2_D / div1_B ? Please help me.
 » 5 months ago, # |   -7 What's wrong with Errichto?
•  » » 5 months ago, # ^ |   -8 and dreamoon
•  » » 5 months ago, # ^ |   -27 What's wrong with you? Why are you cyan?
 » 5 months ago, # |   +36 When will we get data structures, graphs, etc , and not only math problems?
 » 5 months ago, # |   +9 It's luck to compete in two math forces round 492 and 493... Lol, should run away from it for a short period.
•  » » 5 months ago, # ^ |   +10 Just find we can open the round, count number of math problems, then decide if we play it or not.
 » 5 months ago, # |   -15 Contest was completely Fine, But I honestly think codeforces should limit the math/geometry based problems to atmost 1..cause This is codeForces not MathForces
 » 5 months ago, # |   +4 Any reason why system testing has not started?
 » 5 months ago, # | ← Rev. 2 →   0 Always a common scene after 20-30 minutes it will be started judging. What is the problem? -->After two hours contest, contestant are waited more than two hours before got rating. Hopefully, it will be fixed soon.
•  » » 5 months ago, # ^ |   +31 There are many possible reasons why that happens. For instance, sometimes there are successful hacks on solution that is passing systests otherwise (note that if the load during the round permits, some or all solutions are run on systests during the round). As this is suspicious (it might happen that the hacked solution is in fact correct, and the reference one is incorrect), it needs some manual inspection before starting the systests.
•  » » » 5 months ago, # ^ |   0 I don't get it how the hacked solution could be correct?
•  » » » » 5 months ago, # ^ |   0 Sometimes the problem setter and tester do not aware that they also get into trap, say they get a straightforward idea, but do not prove it and unfortunately their idea was wrong. An example : http://codeforces.com/blog/entry/57192?#comment-408304
 » 5 months ago, # |   +8 Round was ended earlier than Russia vs Spain. What a surprise.
 » 5 months ago, # | ← Rev. 4 →   +19 In div1.B, we should count how many difference a+5*b+10*c+50*d, where a+b+c+d == n.We can notice that if b == 1 && c == 5, a == 5 && d == 1, then a+50*d == 5*b+10*c && b+c == a+d;if b == 9 , a == 5 && c == 4, then a+10*c == 5*b && b == a+c;if c == 9 , b == 8 && d == 1, then 5*b+50*d == 10*c && c == b+d;if we avoid all (b >= 1 && c >= 5) || (b >= 9) || (c >= 9), we can get the answer.the answer is C(n+3, 3) — C(n-3, 3) — 2 * calc(n-6) + calc(n-7) + calc(n-11) = 49*n-247sorry for my poor English :D
•  » » 5 months ago, # ^ |   +3 if b == 1 && c == 5, a == 5 && d == 1, then a+50*d == 5*b+10*c && b+c == a+d;if b == 9 , a == 5 && c == 4, then a+10*c == 5*b && b == a+c;if c == 9 , b == 8 && d == 1, then 5*b+50*d == 10*c && c == b+d;How did you find these relations? Did you use any specific technique?
 » 5 months ago, # | ← Rev. 2 →   +30 Can you explain 7s TL in D ?39833354 — O(n2k)39838295 — O(nk2)It was hard to distinguish?
•  » » 5 months ago, # ^ | ← Rev. 2 →   +3 Because we expected an solution, actually.
•  » » » 5 months ago, # ^ | ← Rev. 2 →   +18 Aargh, I wasted so much time trying to micro-optimise my O(n2k) solution which was within about a factor of 2 too slow (on my local machine at least), and then ran out of time when I saw how to do it in O(nk2). I had a working solution about 5 minutes after the end of the contest.
•  » » 5 months ago, # ^ |   +36 I am very disappointed that MrDindows didnt solve this problem :(.I wrote O(nnk) first, but didnt manage to make it run faster than 17s. I was also confused by this TL.
•  » » » 5 months ago, # ^ |   +18 Sorry, my bad :(
 » 5 months ago, # |   +4 Hackforces!!
 » 5 months ago, # |   +8 Does anyone like me WA on A,B,C and AC D :(
•  » » 5 months ago, # ^ | ← Rev. 2 →   +6 ATestcase23 10 Correct Answer11 BTestcase4 81 2 10 11 Correct Answer1 CTestcase5 10 111111 Correct Answer0
•  » » » 5 months ago, # ^ |   +3 Just a small typo in AShould be 1 1
•  » » » 5 months ago, # ^ |   0 Awwwew how careless i am, i printed 1 a[1] instead of 1 1 ... Arghhhhhh in B i missed a "=" in my if statement T_T rip me
•  » » » » 5 months ago, # ^ |   0 Same hea :(
 » 5 months ago, # |   -106 Why are there always math questions whenever greengrape is associated with any contest, be it testing or writing? Because of her, i am always fucked in the contests. My cumulative decrease in rating is now 400 in contests related to that idiot greengrape.
•  » » 5 months ago, # ^ |   +67
•  » » 5 months ago, # ^ |   +44 Can’t wait for people to start referring to me as “it”, lmao
 » 5 months ago, # |   0 What's the test 16 of Div2/C?
 » 5 months ago, # | ← Rev. 2 →   +33 I hope you enjoyed the contest!The editorial was published! Check it over there
•  » » 5 months ago, # ^ |   +2 The contest was nice.
 » 5 months ago, # | ← Rev. 2 →   0 The following submission for problem D in Python3 gives wrong answer:39842076Whereas the same submission in Python2 passed:39846023Why would this happen? Can somebody look into this?
•  » » 5 months ago, # ^ |   +9 I am not sure, but maybe because of division? In Python 2, "a / b" is integer division if a and b are both integers, but in Python 3 it instead performs "actual division" (i. e. returning a fraction without rounding).
 » 5 months ago, # |   +4 Really, that was my fix for C between pre-tests and AC...
•  » » 5 months ago, # ^ | ← Rev. 2 →   +3 Use scanf(" %c", &c) (note the space before the format) to read a character after skipping whitespaces. This might save you a lot of trouble in the future when it comes to input :)
•  » » » 5 months ago, # ^ | ← Rev. 2 →   0 I used getchar() in hope to "optimize" my solution. Btw, unwanted char wasn't space, it was \n` :D.
•  » » » » 5 months ago, # ^ |   +5 The term "whitespace" includes all characters such as spaces, endlines, tabs, carriage return, etc.
 » 5 months ago, # |   0 So good contest waiting div 3 :)
 » 5 months ago, # |   +4 Your crafting.oj.uz ratings are updated!
 » 5 months ago, # |   0 I was looking forward to rating changes in comparatively easier Div 3 contests coming up soon. Alas!!
•  » » 5 months ago, # ^ |   0 Aw. That's really unfortunate :/Knowing you irl, I knew something like this probably happened. Hope things work out for you, don't let it keep you down too much.
•  » » 5 months ago, # ^ | ← Rev. 2 →   +18 afaik codeforces won't block you, just disqualify from this contest. So you shouldn't worry much about this situation, as well as you shouldn't hope for not disqualify — it's your responsibility that someone was able to steal your solution. In your place I would say "okay, today I learned something new, will be more careful next time".
•  » » » 5 months ago, # ^ |   +8 I definitely learned something new, and I sure as hell will be more careful next time. P.S.: The purpose of this comment is not to hope any reconsideration or because of fear of disqualification. I understand that the ideone debacle is completely my fault and don't blame anyone else. I just wanted to clarify myself in this comment.
•  » » 5 months ago, # ^ |   0 You don't have to prove "I'm not cheating" , If you believe in your-self , then you haven't to care what are people thinking about you . Take it easy .
•  » » 5 months ago, # ^ |   0 I have seen people using two IDE's on their PC for this kind of situation. I myself use Code::Blocks and Visual Studio. nsf25, you can take note, brother. :)
•  » » » 5 months ago, # ^ |   +1 Thanks, vai. I never faced such a situation during an individual contest before hence the mishap. I'll use a secondary IDE if the need arises. :)
 » 5 months ago, # |   0 What a pity! Div2D was really feasible and enjoyable! Wish I had brute-forced it on the computer instead of losing time trying to figure it out from paper!
 » 5 months ago, # |   -43 Is it normal to show top 10 instead of top 5? :)
•  » » 5 months ago, # ^ |   -13 I think it was a good decision in this case.
 » 5 months ago, # |   0 Can anyone explain me fateice's B problem solution? how could it be that simple?
 » 5 months ago, # |   +5 duliu math problems
 » 5 months ago, # |   0 can anyone explain me div2 B cutting problems.if i cut at a position So i get two sections,So does the both section need to have same the numbers of odd number and even number.like :6 41 2 4 5 7 7 what's the output of this one?1 2 | 4 5 | 7 7 is it possible?
•  » » 5 months ago, # ^ |   0 The problem statement states"There is a sequence of integers, which contains the equal number of even and odd numbers."
 » 5 months ago, # |   0 Did the author intend any pun when writing problem B statement by writing 'cut "the rope"?
•  » » 5 months ago, # ^ |   0 Yep =).
•  » » » 4 months ago, # ^ |   0 Share the reference or joke please!! If you dont mind :)
•  » » » » 4 months ago, # ^ |   0 This is not exactly joke, but reference to the cut the rope game
 » 5 months ago, # |   0 It helps me a lot, I hope to get better and better.