Автор vovuh, 8 лет назад, По-русски

Привет, Codeforces!

12 декабря в 18:05 по Москве начнётся Educational Codeforces Round 34.

Продолжается серия образовательных раундов в рамках инициативы Harbour.Space University! Подробности о сотрудничестве Harbour.Space University и Codeforces можно прочитать в посте.

Этот раунд снова будет рейтинговым для Div. 2. Соревнование будет проводиться по немного расширенным правилам ACM ICPC. После окончания раунда будет период времени длительностью в один день, в течение которого вы можете попробовать взломать абсолютно любое решение (в том числе свое). Причем исходный код будет предоставлен не только для чтения, но и для копирования.

Вам будет предложено 7 задач на 2 часа. Мы надеемся, что вам они покажутся интересными.

Задачи вместе со мной готовили Михаил awoo Пикляев и Иван BledDest Андросов.

Удачи в раунде! Успешных решений!

У меня также есть сообщение от наших партнёров, Harbour.Space University:

Информация об обучении

Мы предлагаем записаться на курсы по одной из трёх наших программ, связанных с IT: Data Science, Computer Science и Cyber Securityзаполните форму для того, чтобы принять участие в программе, начинающейся в январе или в сентябре 2018 года. Мы свяжемся с вами вскоре после заполнения формы. Надеемся увидеть вас среди участников наших курсов!

Перейти к форме

Поздравляем победителей:

Rank Competitor Problems Solved Penalty
1 dotorya 6 209
2 JustasK 6 228
3 dreamoon_love_AA 6 248
4 ivan100sic 6 273
5 Shayan 6 308

Поздравляем лучших взломщиков:

Rank Competitor Hack Count
1 Artmat 109:-9
2 gigabuffoon 81:-1
3 ssor96 61:-1
4 Danylo99 61:-8
5 AkiLotus 63:-18

Было сделано 1528 успешных и 786 неудачных взломов.

И, наконец, поздравляем людей, отправивших первое полное решение по задаче:

Problem Competitor Penalty
A AkiLotus 0:01
B MrDindows 0:04
C Kitorp 0:02
D mdippel 0:20
E dotorya 0:27
F step_by_step 0:38
G dotorya 1:03

UPD Разбор

  • Проголосовать: нравится
  • +52
  • Проголосовать: не нравится

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

Rated round again with lots of problem :) .Hope good rating to all

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +20 Проголосовать: не нравится

I hope that the statements will be as short as those from last div2 and as interesting

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

Thanks for another rating round for div2 :)

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

Hope the queue is fixed.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +72 Проголосовать: не нравится

Since registration opened before the previous contest's rating changes, this bug happened again. Will this guy be rated?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +25 Проголосовать: не нравится

really rated again??? I just Love CodeForces

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How do these help educate differently to normal contests? is there solution descriptions afterwards or something?

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    Well these rounds were unrated before and thus were 'educational'. You could participate without your ratings being changed and learn from the contest. (How to attempt the real Div contests or learn to hack etc). Or its just a fancy name for it anyways it looks like they'll be rated now which isn't too bad too :P. But I'd rather know how the ratings change for these contests as last time there was a lot of confusion.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

Unrated educational rounds please!

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

I hope the computation speed of the evaluation system could faster.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

a chance to recover from yesterday

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +11 Проголосовать: не нравится

WasylF, Can you fix it so that the predictor will work well for the Educational rounds?

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +3 Проголосовать: не нравится

    Yeah, I suppose it's not very complicated & I'll fix it for the next educational round. BTW, it is a bit weird that div 1 participants doesn't marked as "unofficial" like always in div2 only rounds.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

A fast queue plz.

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

There will be any points on hacking?``

»
8 лет назад, скрыть # |
 
Проголосовать: нравится -32 Проголосовать: не нравится

You said it is rated for Div 2. But is it rated for Div 1???????

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +4 Проголосовать: не нравится

How Div. 2 participants of this educational round will be sorted in "Standings"?
Is there the algorithm description available?

I tried the related (New: Educational Rounds on Codeforces!] blog post but I failed to find this information there.

My guess (based on the Educational Codeforces Round 33 results):

  • First, sorted by = (the number of problems solved), descending.
  • Second, sorted by Penalty, ascending.
  • Penalty is the sum of penalties for each problem.
  • Penalty for a problem is the sum of:
    • the number of minutes after beginning of the round when the last successful submit was sent;
    • penalty for additional submissions (20 minutes for each).

Is this information available somewhere?
What am I missing?

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +4 Проголосовать: не нравится

    Ranking is exactly as per ACM rules. You've got it right except for the penalty part

    User's penalty: sum of penalty of all 'accepted' problems

    Penalty of an accepted problem: Time taken to get the problem accepted + 20 mins penalty for each wrong submission

    You can check ACM style ranklist rules here

    • »
      »
      »
      8 лет назад, скрыть # ^ |
      Rev. 2  
      Проголосовать: нравится 0 Проголосовать: не нравится

      Thank you very much!
      A subtle point is still this one:

      + 20 mins penalty for each wrong submission

      As I understood,

      • there is no penalty for re-submit (several Accepted solutions from one participant for one problem),
      • of multiple Accepted solutions the earliest one counts, the others are not considered.
      • »
        »
        »
        »
        8 лет назад, скрыть # ^ |
         
        Проголосовать: нравится +1 Проголосовать: не нравится

        I believe submissions only till the first accepted solution is considered when calculating penalties. Actually in an ACM styled contest, submission verdicts are generally final, if you get an AC then it is indeed AC, and does not change later on. Since it's not the case here, I believe it is as you say, and if a previously correct solution is hacked, penalty is changed to reflect the next correct solution (maybe, not so sure on this one)

»
8 лет назад, скрыть # |
 
Проголосовать: нравится -14 Проголосовать: не нравится

I hope every girl will downvote this :(

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

Why you don't made div-1 participants out of competition like normal div-2 contests ?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +15 Проголосовать: не нравится

CF rated rounds are just like addiction.. If you try it once,you would want them again and again and even more frequently.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

Rating baadme surakshit hogi pahle Codeforces Servers surakshit karwao :p

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +151 Проголосовать: не нравится

That moment you know you are fucked up and you also know everyone is fucked up.

image

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I literally spent 41 minutes to do this
int->long long in exactly one place -_-
I guess I can't trust my own template

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

В задаче D надо было использовать длинную арифметику?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

exclude the ans > 10^18 tests maybe?

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +40 Проголосовать: не нравится

We're extremely sorry for requiring BigIntegers in D, we didn't really mean it firstly. Neither authors, nor testers pointed this bug to us. :(

We would like to apologize for that. I hope codeforces will be able to process all the hacks...

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Did need a BigInteger in the problem D?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

When I'll be able to submit code if I didn't participate in the contest?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Should we talk about solutions in this phase (hacking) ? Because I have idea for D so I just wanted to ask if anyone solved it that way.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hello :D

Can someone see my code in problem E and tell me why am I getting TLE ?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

Nice problems, I really enjoyed the contest.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve E ???

»
8 лет назад, скрыть # |
Rev. 4  
Проголосовать: нравится 0 Проголосовать: не нравится

I'm sorry, I made a mistake. How to write a 65-bit signed integer?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится

It isn't guaranteed that the answer doesn't exceed 10^18 by absolute value.

You didn't know that before the beginning of the contest, right ? :D

»
8 лет назад, скрыть # |
Rev. 16  
Проголосовать: нравится 0 Проголосовать: не нравится

Well, nice troll for D :D

BUT, NO PANIC! max answer is 2666666666600000 which fits long long. RIP who resubmitted

I got this value with greedy test case, but I see hacks, not sure T_T

Seems like answer fits in long long but we should do — operations first, still not sure.

OK GUYS! SAY GOODBYE TO YOUR RATINGS AND GO TO SLEEP. WE ARE FUCKED UP :(

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Ох сейчас взломы по D полетят

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve D??? :(

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

I just read the clarification about D :(

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

I thought i had solved D with this alghorithm,but it failed on first test.It was right on sample cases too.Whats the problem with this?

First,i thought threre were no rules at all,for every i<=j you increment your answer by a[j]-a[i].You compute beforehand how many times you add and subtract one element,so you can get answer for no rules in O(n)

We now have to think about rules.They only say that for any a[i] you have to consider a[i]-1, a[i] and a[i]+1 values beforehand.Their counts are important here,so we have to store them in a place.Arrays arent suitable since a[i] can go up to 10^9 so i used multiset and even map to update their counts as i iterated through the values.

Even after the warning i used long long values.They could overflow in C++ as maximum ans could be 10^5*10^5*10^9 for an input consisting half zeros and 10^9s after

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hack for D?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +18 Проголосовать: не нравится

why you are so bad in problem D ? why long long in c++ isn't enough for you ?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

lmao that D

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

I just realized that problem E had a O(nk) solution, but isn't O(n2k) supposed to get AC as well?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Hints for E please.

  • »
    »
    8 лет назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится 0 Проголосовать: не нравится

    maybe dynamic programming with bitmask

    UPD: i mean about problem F sorry

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    First of all frequency of all the strings should be same. Then imagine your initial ans is the first given string. Now generate all the possible strings by swapping two characters of that string. Now you have to calculate the hamming distance with all other strings.If the calculated hamming distance for all the given string is 2 or 0(if there is a duplicate character) then you got your ans.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится

A language-dependent problem in a rated contest, sounds ridiculous tbh.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится -26 Проголосовать: не нравится

Yo , please make it unrated dudes, i solved D at the same time as C and B and it so correct but because of the fact that you wrote unclear only about 100 people from 1300 will get AC on D. Please don't atleast decrease the rating of others not cool.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится -35 Проголосовать: не нравится

Strongly suggest make it unrated

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I look at the statusboard and I found there're a lot of people get a WA in the 29th case of the D problem,and I also found that nearly all of them have a same wrong answer, so is anybody able to detail the test data? I want to know where I'm wrong? please?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I look at the statusboard and I found there're a lot of people get a WA in the 29th case of the D problem,and I also found that nearly all of them have a same wrong answer, so is anybody able to detail the test data? I want to know where I'm wrong? please?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +32 Проголосовать: не нравится

D D everywhere

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Oh, no its rated. I was heedless about the name. As usual seeing the name as Educational round I start contest though 30 minutes left. I saw this part (Rated for Div. 2) while its 10 minutes left only. :( :( Then there's left a cheap situation for myself. :/ :/

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

Are you people really asking to remove test cases from D or declare it unrated because you didn't know how to solve it? C++ is good for somethings and bad for other things. It's normal... Python sometimes gives TLE in a solution that is ACP in a c++ implementation. Should I complain when it happens? If you didn't get the correct answer next time try harder and learn more.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +21 Проголосовать: не нравится

Nice language-dependent contest...

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +4 Проголосовать: не нравится

    Granted its nice to have problems not dependent on specific languages. But when you have so many languages with different characteristics, its very hard to design such problems. Yeah it was not the author's intention to include big integers, but that doesn't make the problem wrong. I have seen plenty of problems requiring big integers but not mentioning explicitly in the statement. Sometimes you should be able to figure out what data types you need and in this problem it was quite straightforward to do so.

    If its unfair for C++ users, think how many problems are unfair for python or java users? I know some of you are pissed, but put aside your personal feelings and think neutrally.

    And its also not that it can't be solved in C++ at all...

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    All you C++ coders complaining, you've never coded competitively in other language... many many many contests are 'language dependent' in favor of C++, but nobody complains, because we are used to it. This is the first contest where C++ is at a disadvantage and there's so much complaining. (and it's still very possible with c++, while sometimes other languages are literally too slow to pass)

»
8 лет назад, скрыть # |
 
Проголосовать: нравится -19 Проголосовать: не нравится

If you think (like me) that answer on D > 10^18 is a bit unfair for c++ users, upvote this in the idea that CF responsalbes will see this and will see how many we are. It was a nice contest, short statements and beautiful problems, but this thing on D deteriorate the value of the contest.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +21 Проголосовать: не нравится

random_shuffle(ranklist.begin(),ranklist.end());

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Should've ensured that answers were less than 1e18. Sorry to say, but very careless question making.

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +3 Проголосовать: не нравится

    Did they change the statement for D? It doesn't say in the statement that the answer would be less than 10^18. I don't see why it would be the fault of the problem setter instead of a fault of an assumption of the solver.

    • »
      »
      »
      8 лет назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      I'm not saying I'm not at fault, but I feel such variables should not been involved in such contests. The fact that they had to clarify mid contest clearly indicates that they had not prepared to trick people and instead it was something they overlooked, which I repeat, is very careless

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve G?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

Anyone solved D with index compression + segment tree? I had this idea, I know its much harder than other solutions, but its just the opposite way of what everyone did. If anyone solved this way, please write me.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится -24 Проголосовать: не нравится

So next time I read a problem, I first decide what language to use, then learn the language from scratch in contest time, and then if time permits, find out the logic and eventually code the solution. Thank You CF for teaching me a new approach today :)

»
8 лет назад, скрыть # |
Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

The hack been used to for D is incorrect I guess, cause it shows answer to be -9999999990000000000 =-9.9 * 1018. Please check.

Update: My bad. The update post mentions "It isn't". I overlooked.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

All contests are language-dependent... A lot of times the same solution implemented in Python gives TLE while solutions in C++ don't... Is that unfair too for you? Or that next_permutation exists in c++ but not in java. Is that unfair when a contest requires it?

I think you all have the conception c++ is the best in everything but it has its limitations too obviously... You are a good coder if you know them and can adapt. Congratulations to all who solved D. If you didn't better luck next time. Keep improving everyone!

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

The announcement "the output > 1e18" doesn't make sense because LLONG_MAX > 9e18.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

AC in D with long double 33191777

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +30 Проголосовать: не нравится

Everyone's switching to Python on D after getting hacked

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

Why you announced like "Output can exceeds 10^18"? You should use maximum range of long long data type instead of 10^18. Making this round rated will really unfair to many contestants.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

AkiLotus

anyone higher than this?......

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +67 Проголосовать: не нравится

Why was the clarification "isn't" instead of "is NOT"?

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

my algorithm for D is first sorting the given array and then keep a map for every i and then use a fenwick tree for find the answer. To compute the number of elements 1 greater and 1 less than this element and update the answer. Also insert in fenwick tree. My submission is 33181133. Is there an easier method to solve this. Although i got hacked for not using big int of unsigned ll.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится -15 Проголосовать: не нравится

Будет ли раунд для второго дивизиона рейтинговым, ведь реально не справедливо к задаче Д

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve E ?

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    Someone mentioned calculating hamming distances for string, idk if that's true.

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    my idea inside the contest was using hashing , first in O(k*n^2) find the hashes of all the strings except for the 1st one and store all the hashes in a set for that string.. (make a set s[K] , k == no. of strings)..

    After this , for the first string , in O(n^2) find all the swaps , get the hash corresponding to the NEW first string in O(1) ( we calculate the hash from the 1st string's orignal hash,because SWAPPING 2 characters means we have to just add and subtract 2 values ).. So for all possible swaps of 1st string , check in O(klogn) for all the other (k-1) strings if they have the hash in their set.... if they do have the hash , then print the current NEW(after swap) first string...

    Implemented this in contest because had 1:30 hours on hand but somehow gave segmentation fault , then I quit , it was getting very late,went to sleep..I havent corrected my bug yet .. so if please someone finds fault in my way please correct me , I am learning, also I would like to know how others did this.. , again , if my way is wrong please correct me and tell me why :)

    TOTAL COMPLEXITY = O(k*n^2)

»
8 лет назад, скрыть # |
 
Проголосовать: нравится -10 Проголосовать: не нравится

Wanted to know rating predicted by CF-Predictor: Predicted <= Rating_Increase (Because Div1 would be removed), Predicted > Rating_Increase (As seen in last round)

Which would be true. If 2nd one, why is it so?

»
8 лет назад, скрыть # |
Rev. 3  
Проголосовать: нравится -9 Проголосовать: не нравится

Wanted to know rating predicted by CF-Predictor:

Predicted < Rating_Increase (Because Div1 would be removed)

Predicted > Rating_Increase (As seen in last round)

Predicted = Rating_Increase

Which would be true. If 2nd one, why is it so?

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +1 Проголосовать: не нравится

I hope that the problem about problem D ended, but I prefer to share an idea with you as a lesson to us: let us assume that the function d(x,y) give 1 instead of y-x when the condition |x-y|>1 is setisfied. Then the problem come up to be: [calculate the number of pairs ai,aj (where 1<=i<=j<=n) that setisfy the condition mentioned upove]. In this case, we, as problem solvers, will say in our minds: [the upper bound of the answer is the number of all that pairs ai,aj, so it is n*(n-1)/2+n, and since n can be equal to 2×10^5, we surely need to use long long int data type.]. All what we said was a result of our habit that the answer is either int or long long, but this is not enough for a problem solver.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

when the rating update will be published ?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Errr, may I ask why my rating haven't changed? I'm sure I'd played this game.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

the answer in problem d can exceed 10^18 It is very unfair for c++ coders

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

When will the editorial be published?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +75 Проголосовать: не нравится

lolpic

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Thanks for problem D! I got to learn something new from it. If anyone knows any problem related to it can they please comment the link? Thanks!

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

How to solve F?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

The integer overflow problem in Div2 D can be solved by using long double instead of long long in c++.

My solution

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

I am surprised that there are so few discussions about how to solve problem G.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +28 Проголосовать: не нравится

I feel like the statement about ans exceeding 10^18 should not have been made public. As a programmer, it's our responsibility to estimate ans and use data types accordingly. That announcement assisted all the hackers who were unaware about it at first. Only the one's who actually knew that the ans would exceed long long were the ones who deserved the points gotten by hacking.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

when will rating change take place?Hacking period is over

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

RIP rating :'v

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

Problem D reminded me the painful memory with problem Prize from IOI 2017. I made the same mistake in both of these problem: making false assumption because of 'it has never happened before'. For this problem, I made an assumption that BigInteger is not needed because 'Codeforces problem rarely required that'. For the IOI, I made the assumption that the checker is not adaptive because 'I haven't seen an IOI problem with an adaptive checker before'.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I got AC in D with c++ without bigint.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится

Will you make a list of the top Div 2 competitors? :D

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

In problem D, why double gives WA on test 13 while long double gives AC ?

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +8 Проголосовать: не нравится

    because double can not represent numbers up to 10^18 with precision of at leat one (that is, the diference starts to be, for example 2 or more, if the current number is 99...93 the next can be 99..95, skipping 99...94), long double, due to its bigger representation, has a better precision

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Can someone please explain F ? I do not understand it from the editorial.