Блог пользователя cyand1317

Автор cyand1317, история, 7 лет назад, По-английски

418 I'm a teapot

Hi everyone! >///<

I'd like to invite you to Codeforces Round #418 which begins at 15:05 MSK on 7 June. Please note that the timing is unusual.

This is my first round here! KAN reviewed the contest and helped me through the preparation process, while Alladdin, FalseMirror and Tommyr7 tested all the problems, and MikeMirzayanov and the awesome Codeforces and Polygon platforms made all this happen miraculously. This wouldn't have been possible without your efforts!

The round is rated for the second division, and participants from the first division can take part out of competition. As usual, there are five problems and two hours to solve them. The problems will feature... Well, let's wait and see :)

The scoring distribution will be announced later.

Hope everyone few bugs and fair ratings. Looking forward to seeing you then!

UPD 1 Scoring will be 500-1000-1750-1750-2500. It's recommended to read all problems' statements so as to find the problems that suit you — we tried quite hard to make them clear and interesting.

UPD 2 The round is delayed for 10 minutes due to technical issues. Apologies.

UPD 3 System test is done. Congratulations to the winners!

Div. 2 Top 5

  1. memanon
  2. marmoset
  3. liu_runda
  4. yieldar
  5. Krydom_Yuudachi

Overall Top 5

  1. xumingkuan
  2. HellKitsune
  3. natsugiri
  4. yancouto
  5. irkstepanov

Hope you all enjoyed the contest. You all did a great job! The editorial is on the way, please be patient :)

UPD 4 For the impatient, here are the tutorials for problems A to C. More are coming!

UPD 5 The complete editorial is out. Cheers!

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

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

Is it rated?

»
7 лет назад, # |
  Проголосовать: нравится -13 Проголосовать: не нравится

выйду в div1, скриньте

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

Just in case anyone is scratching their head: https://httpstatuses.com/418

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

Возьму 156 место скриньте

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

why always scoring distribution is announced later ?

»
7 лет назад, # |
  Проголосовать: нравится -43 Проголосовать: не нравится

Hmmm... It seems like Alladdin and amethyst3 are brazzers

»
7 лет назад, # |
  Проголосовать: нравится -18 Проголосовать: не нравится

Hope to see a

NORMAL CF ROUND

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

As a tester, wish everyone good luck and have fun!

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

Haven't seen a Chinese round for ages. Cool.

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

Hope it could be easier than last Chinese Round

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

418 I'm a teapot so for this round you will enter as a normal water(current rating )and exit as hot water(current rating+154).

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

The time when the contest will be started it is 'Iftar Time' (Fast Breaking Time) for Muslim in southern Asia. It will be better and helpful to us if the contest starts an hour later from that time. cyand1317

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

    Meanwhile it would be quite late for participants from eastern Asia, it's just difficult to meet everyone's needs... :( If the timing does create difficulties, you can try virtual participation later. Apologies for this.

    (It would be great if authors have a list of different regions' occupied time intervals...)

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

Auto comment: topic has been updated by cyand1317 (previous revision, new revision, compare).

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

Have you noticed that the round number is the reversed contest number ?

Contest number is 814 and the round number is 418.

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

Problem C and D have the same score!Amazing!

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

A 1750 C always makes me upset :(

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

Data structures and Constructive algo related problems may be exist in today's round...mathematical term too :)

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

10 min extensions seems to be a template.

»
7 лет назад, # |
  Проголосовать: нравится -9 Проголосовать: не нравится

Contest extended by 10 mins ... :)

»
7 лет назад, # |
  Проголосовать: нравится -11 Проголосовать: не нравится

contest delayed?

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

10 minutes fact!!!!!!!!!!!!!!!!!

Coding ended(Ramadan and Iftar fact).

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

Everytime :(

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

Contest Delayed , Maybe a good time for more contribution .

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

It won't be a normal Codeforces round if it is not delayed :D

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

Auto comment: topic has been updated by cyand1317 (previous revision, new revision, compare).

»
7 лет назад, # |
  Проголосовать: нравится -9 Проголосовать: не нравится

10 minutes delayed???

»
7 лет назад, # |
  Проголосовать: нравится -16 Проголосовать: не нравится

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

A Codeforces contest really cannot be regular without a 10 minute delay, can it :)

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

clicked 'ok' to go to contest arena and then 10 minute delay!

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

Show the time of the contest 10 minutes later so then u don't have to delay it every time !

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

why there's always 10 minutes delay?

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

10 mins again

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

10 minute delay is a tradition now in Codeforces

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

May I ask, what kind of of technical issues causes delay by 10 mins?

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

A ten minute delay for me to make a beverage, thank you!

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

6000 People registered for the contest. 10 minutes delay means 6000*10 minutes = 1000 hours = 41 days of their life. Just saying. Waiting sucks.. :(

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

normal codeforces round = The round is delayed for 10 minutes due to technical issues

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

It's about Monogatari! Now it is somewhat interesting. 8-)

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

    There's some spoilers in task statements lol(but I had already completed mongatari series).

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

      I am only mid-way through the series, and I am pretty sure I got spoiled by B,C,D — but who cares! I should be fine as long as if I don't lookup for the characters' name in English.

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

        Actually you don't) Especially B, C and D, they have nothing to do with the plot. While E is taken from the first episodes you would watch.

        I kept that in mind while writing statements so as not to contain spoilers to the anime.

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

          lol, after reading A and E I assumed that the others are about the actual plot as well.

          Good job for not spoiling the amazing series. :)

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

Anyone else facing the issue of getting logged out constantly? I had to login at least on five separate occasions during the contest. Not complaining, genuinely want to know whether mine was an isolated case or not.

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

this B made me crazy
waiting for the end of contest to see test 6

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

In problem C, n*q should pass but my solution got TLEd on pretest 10. :/ why?

I used sliding window, total operations 2 * 1500 * 200000 = 6 * 108

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

What is intended complexity of B solution? I solved it in O(n) and now i'm scared that i've missed something.

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

    My complexity is same. P.S. 70 lines of code...

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

    I think it's solvable in O(n) but there's a simple O(n^2) solution: find the two positions in the first array which has the same value(there will be exactly two of them). Replace one of those two positions with each of 1~n and verify if it's valid.

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

And how to solve D?

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

    Not sure if I will get AC, but I constructed a tree, where x is parent of y if circle y is inside x. Then dp: f[u][x]=maximum area of subtree u if there are x nodes in the first set.

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

what is generator command line argument ??

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

Is the following solution to D correct? It passed pretests, but I'm not entirely convinced. If circle is inside odd number of circles or 0 circles add its area, else subtract its area.

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

Great round!

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

I must be misunderstanding problem C. Can someone explain to me why this solution is wrong?

For each subsequence of s and each character c:

  • moves = count of c in subsequence
  • best[c][moves] = max(best[c][moves], length of subsequence)

Then for each query (m,c) just output best[c][m].

I'm pretty sure my code has no bugs but I keep getting WA on pretest 7.

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

    I did the same and passed pretests, maybe you are forgetting best[c][moves]=max(best[c][moves],best[c][moves-1])

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

    maybe forget best[c][moves] = max(best[c][moves], best[c][moves — 1]) ?

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

    best[x][y] can't be greater than n.

  • »
    »
    7 лет назад, # ^ |
      Проголосовать: нравится -6 Проголосовать: не нравится

    Haha nevermind, it was a stupid bug where I mixed up the indices of i and c at one point. Good thing this round is unrated for me. :)

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

I solved B but i'm interested how did you guys solve it??

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

    You didn't XD

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

    Let res be the permutation we need to find. Now it is easy to observe that there can be only at most 2 numbers missing in res according to given a and b arrays. Now find those missing numbers and assign those numbers in missing places in res and check if the res is valid or not.

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

Yeah, it's time to compile error in 20 seconds before the contest ends(27649694).

The reason was that locally I have kotlin 1.1, but cf has only 1.0. Comp error appeared twice in this contest. So sad =(

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

What is solution of Task C? I think there is pre-calc and DP, but what is rule for dp of this problem?

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

Thank you Chinese for this round :D

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

Как решаеться задачa С

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

    Всего есть 26 * n вариантов запросов, для каждого из них нужно заранее посчитать ответ. Это можно сделать использовав метод двух указателей на строке. Сложность будет 0(26 * n * n).

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

    Но я не уверен на все 100. Мое решение еще не проверено на систестах.

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

Very fast System testing!!!

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

I was logged out several times (using google account) which is not nice. Please fix it!

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

What's the intended solution for E? I drafted a O(n^4) (roughly) DP solution for it yet somehow it fails me even on the sample test cases. :/

http://ideone.com/kOBovo

Edit: nvm, I am completely off the track.

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

RIP B

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

What is f**cking going with cf? Why I'm loosing task because of compilation error with "M_PI" in GNU C++14, although it's work on my compiler, which is GNU C++14 too?

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

I can't understand why Reyna solution 27632209 for problem A got WA?!!!

Checker comment Can't find file C:\Contesters\Work\invoker-prod\work\codeforces2\e034999a3f1f1dd18b018c40c84c8c46\check-f7e8e87d48909eaa32eeaee49e520cf4\run\output.fd0138e687.txt.

What is the meaning of that?!!

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

Auto comment: topic has been updated by cyand1317 (previous revision, new revision, compare).

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

why i got a wrong answer like this?

Can't find file C:\Contesters\Work\invoker-prod\work\codeforces2\838e4a3610786f013367ecfa30b8ac63\check-b58f02c6459228487139e47a79e2e72e\run\output.fd0138e687.txt.

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

What was the approach to solve problem B?

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

    Just split in two cases, one with only one number who differs, and another with two, use a set in the first case (you need to know the number who is missing) . And in the second case, generate the two possible vectors and use two sets, insert each vector in a different set, and print the one with setsize == n.

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

      Thanks for your reply, I also read the editorial and your approach is different and also interesting. I think your approach is more efficient, is it O(n)? The editorial approach is O(n^2) I think

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

    ok, at first, there is a simple observation. a and b can only have at most 2 different positions where the numbers aren't same. So you should think of these 2 cases.

    Case 1 : Only 1 different position(Sample testcase : 3) Here, u should check which is the missing number from 1 to n, and put that into that position

    Case 2 : 2 different position (Sample testcase : 1, 2) Here, there should be 2 missing numbers from 1 to n. try putting them into those positions and see if the permutation is valid. One of them will be valid and that's your answer

    • »
      »
      »
      7 лет назад, # ^ |
      Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится
      there should be 2 missing numbers from 1 to n
      

      How so? I think even in case 2 there can will be only one number that differs ?

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

        I think u don't understand what did I mean with missing numbers. ok, look at these.

        4 4 2 3 1
        5 4 5 3 1
        ? 4 ? 3 1
        

        so we know for sure, 1 3 4 is in the permutation and 2, 5 hasn't been used yet. So these are 2 missing numbers which should be used in these two (?) positions

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

After seeing the system test, I wish I worked on hacking B. I saw no one was hacking B and thought maybe those pretests were quite good. Alas!

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

Why does greedy approach work in D? In each step of dfs(start from outer circle) try to put new circle to part where it gives positive area. http://codeforces.com/contest/814/submission/27649536

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

    Well, if we put a new circle (call it "Ci") to part where it gives negative area instead of part where it gives positive area, we lose 2 times of circle Ci's area. No matter how we divide the circles in circle Ci into 2 parts, each part will contribute less than circle Ci's area, so the sum is less than 2 times of circle Ci's area. So it's better to put new circle to part where it gives positive area.

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

What was wrong with test case 22 in B? My output seems to be correct? :/

http://codeforces.com/contest/814/submission/27638764

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

    your output differs from sequence b in more than 1 position (first and last positions)

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

      Then Test Case 21 would have given WA as well! Same goes for 18!

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

        in tc18: your output mismatches sequence a in only one position (third position) and mismatches sequence b in only one position (first position) so it is correct

        in tc21: your output mismatches sequence a in only one position (fourth position) and mismatches sequence b in only one position (first position) so it is correct

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

        nope. look closely. your output should differ exactly in 1 position. Test case 21, 18 is alright.

      • »
        »
        »
        »
        7 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится
        please help me to understand the below solution has loop as (in main()) for(w=1;w<=9000000000000;w++)  {  r=r+2;  } even then why its not giving TLE? 
        link here
»
7 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

How my code for Problem C got accepted? I made ans[2000][26] in my code and i was using ans[x][26] in my code. (Due to linear storage of data in cpp? )

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

Can anyone tell why my C fails? Thanks a lot.

Basically for each alphabet I created a vector of <Cost, Profit> where Cost number of color is to be recolored and that would result in a subsegment of that color of at least length Profit. And for each query I just find the upper bound base on m and calculate the answer.

http://codeforces.com/contest/814/submission/27647932

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

    28 aaaabbbaaabbbbbbbbbbaaaaaaaa 1 3 a

    You'll choose to fill change it into aaaaaaaaaabbbbbbbbbbaaaaaaaa (gives 10) wheareas aaaabbbaaabbbbbbbaaaaaaaaaaa is better (gives 11)

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

Rating update please. I will be expert for the first time :)

It is really very good feeling!

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

Auto comment: topic has been updated by cyand1317 (previous revision, new revision, compare).

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

didn't know CF compiler was so fast that it would support complexity of O(2e5 * 1e3) or O(n * q) for C

»
7 лет назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится
please help me to understand the below solution has loop as (in main()) for(w=1;w<=9000000000000;w++)  {  r=r+2;  } even then why its not giving TLE? 
link here
»
7 лет назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

Pretest so weak, FST so much . TnT...

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

Please note that the ratings are not final now and are going to change a bit because of the issue with a couple of submissions. We will rejudge them and update the ratings, don't worry.

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

Did anyone else assume the garland to be circular. :(

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

    Yes, it's my carelessness not to mention that it's linear... Though the word "garland" in CF has been used to refer to linear lists quite a few times. Apologies for this. T^T

»
7 лет назад, # |
Rev. 3   Проголосовать: нравится +16 Проголосовать: не нравится

This is the biggest increase of rating ever in codeforces Right ???

This is the biggest increase even after he was hacked on A and B.

(If you can't see the photo click here)

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

    Well this is weird ... on Mhammad1's profile it shows that his rating change is 803 but on the friend's rating change list it shows that his rating change is 681 ... is this a bug ???

    On the friends rating change list it shows that his rating before the contest was 100 but it actually was -22 ???

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

Please Help! Why does testcase 6 fail? Submission

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

    You are expected to output a permutation of first n number with given condition. Your output have 4 repeated.

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

Ребят обьяснити почему во 2 задаче к тесту 4 3 2 1 3 4 2 1 2

не подоходит вариант 4 2 1 3

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

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

    Ответ 4 2 1 3 правильный, но решение, которое ты посылал, выводит 3 2 1 4, что неверно.

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

I solved the D without DP and it worked. code

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

For question B, I ran my code in c++14, it gives the wrong answer on test 39 but the same code i tested on c++11 (also on my machine), it gives the correct answer. If is a cf bug? here is my code http://codeforces.com/contest/814/submission/27655109.

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

    In the function findNum, you check temp[i] != 1 without previously initializing the temp array. So it's up to the compiler to initialize that array with anything (even 1s). The same solution with explicit initialization passes in C++14: 27657207

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

The first letter of the second word of the problems' name are "aeiou", and prepositions are also different. Interesting name ~ :).

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

Auto comment: topic has been updated by cyand1317 (previous revision, new revision, compare).