Aris's blog

By Aris, 3 weeks ago, In English

Hello! Codeforces Round #764 (Div. 3) will start at Jan/10/2022 17:35 (Moscow time). You will be offered 7-8 problems with expected difficulties to compose an interesting competition for participants with ratings up to 1600. However, all of you who wish to take part and have a rating of 1600 or higher, can register for the round unofficially.

The round will be hosted by rules of educational rounds (extended ICPC). Thus, solutions will be judged on preliminary tests during the round, and after the round, it will be a 12-hour phase of open hacks.

You will be given 7-8 problems and 2 hours and 15 minutes to solve them. One of the problems in this round is interactive. Don't forget to read the guide on interactive problems.

Note that the penalty for the wrong submission in this round is 10 minutes.

Remember that only the trusted participants of the third division will be included in the official standings table. As it is written by link, this is a compulsory measure for combating unsporting behavior. To qualify as a trusted participant of the third division, you must:

  • take part in at least five rated rounds (and solve at least one problem in each of them)
  • do not have a point of 1900 or higher in the rating.

Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600, then the round will be rated for you.

Thanks to MikeMirzayanov for the platform, help with ideas for problems and for coordination of our work. Problems have been created and written by ITMO University team: MikeMirzayanov, MisterGu, myav, Gol_D, Aris, SixtyWithoutExam and Vladosiya.

We would like to thank: itohdak, Yogi79, smtcoder, Ra16bit, Tlatoani, nigus, MrDindows, leaf1415, Kniaz, Alireza, mini4141, Jostic11, BitHashTech, An_yujin, Bugman и sodafago for testing the contest and valuable feedback. List of testers will be updated.

Good luck!

UPD: Here is a photo of our team answering your questions during the round:

UPD 2: Editorial

 
 
 
 
  • Vote: I like it
  • +678
  • Vote: I do not like it

»
3 weeks ago, # |
  Vote: I like it +26 Vote: I do not like it

I wish every gray, become green! Good luck!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hope this round will be so exciting!

»
3 weeks ago, # |
  Vote: I like it +10 Vote: I do not like it

Excited to participate in the first Div. 3 round of $$$2022$$$ and my first unrated round, yay!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hey Aris do you know Odin?

»
3 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Time to stand up on my name :D. Let's get it this year. Also hoping B to be a bit easier this time xD

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Good luck to everyone!

»
3 weeks ago, # |
  Vote: I like it +3 Vote: I do not like it

Interactive problems in div.3 round are epic.

Look forward to this contest!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Could we please have div3 rounds on the weekends? Most people in div3 probably have school Thanks

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    definite agree. i am in second period at the time and will not be able to participate.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    agree! I haven't had the contests on cf for a long time, although my score is low

»
3 weeks ago, # |
Rev. 3   Vote: I like it -30 Vote: I do not like it

[deleted]

»
3 weeks ago, # |
  Vote: I like it +17 Vote: I do not like it

I wish my cyan color become blue!

»
3 weeks ago, # |
  Vote: I like it +10 Vote: I do not like it

Another permutation or binary search on problem C

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    How did you know, is it a common theme for div — 3 contests?

»
3 weeks ago, # |
  Vote: I like it +10 Vote: I do not like it

Will there be div 4 contests in the near future

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hope i will able to solve any problem on this round :)

Good luck too all

»
3 weeks ago, # |
  Vote: I like it -13 Vote: I do not like it

So excited to solve a, b after my hard training this week

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

nowadays div 3 is very unpredictable.

»
3 weeks ago, # |
  Vote: I like it -16 Vote: I do not like it

I tried solving a few interactive problems but got the idle limit exceeded! how to solve them?

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    I don't think there is any interactive problem that doesn't warn about flushing the output. Read the problem statement carefully from now on.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    There is a link in the announcement of the round about interactive problems

»
3 weeks ago, # |
  Vote: I like it -14 Vote: I do not like it

Oh,no. I am very unhappy, because I will go to school on Tuesday. I want to have more rated, but I really won't have time. ):

»
3 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

The status of the problem I submitted 40 mins ago is still in queue. Is the same happening with all of you?

»
3 weeks ago, # |
  Vote: I like it -11 Vote: I do not like it

HopeToPupilForces

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

So excited to see blogs on Codeforces( this the second one). I haven't seen them for a year. (just a joke)

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Problems distribution a b c d e1 e2 f g and d is interactive

»
3 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

I wish my cyan color become blue!

»
3 weeks ago, # |
  Vote: I like it +2 Vote: I do not like it

I hope you done the best! Good luck for everyone!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

my first contest .wish me good luck.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hope this round will be interesting and make everyone happy :)

»
3 weeks ago, # |
  Vote: I like it -155 Vote: I do not like it

mother fucker bastard Mike mirzayanov son of a bitch asshole

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Here we go again...............

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

feels motivated today maybe i can solve a and b good luck every one

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

First Div. 3 round in 2022!

»
3 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

All the best :) everyone, stay hydrated.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I hope I do good ;)

»
3 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

wow you guys are having fun (photo)

»
2 weeks ago, # |
  Vote: I like it +10 Vote: I do not like it

Thank you for this amazing round!

»
2 weeks ago, # |
Rev. 2   Vote: I like it +70 Vote: I do not like it

G has more submissions let's solve it.

can't solve G -> move to F

can't solve F -> move to E

can't solve E -> back to G ;_;

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

In the photo are all of these guys also the setters of this round or just for answering the question asked by everyone?

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it +38 Vote: I do not like it

    All the people in the photo are also the authors of the round

    • »
      »
      »
      2 weeks ago, # ^ |
        Vote: I like it +2 Vote: I do not like it

      And which is you if it `s not a secret

    • »
      »
      »
      2 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Then who was behind the camera taking the photos?

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve problem D,

I just thought of putting all the occurances of each letter into a set , & do the process optimally for k times , can someone help me, I know my solution will fail at cases like aaaaaaa, k = 2.. :

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Hint — Binary search for the answer

    • »
      »
      »
      2 weeks ago, # ^ |
        Vote: I like it +16 Vote: I do not like it

      Binary Search is not necessary.

      Count freq of each character for i=1:26

      if (freq[i]%2==1) // one of the occurrences of this character can be part of a palindrome at the middle position

      the rest sigma(freq[i]/2) pairs of characters can be splitted evenly between each of the k palindromes.

      https://codeforces.com/contest/1624/submission/142239619

  • »
    »
    2 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Can be also solved greedily.

    Count occurences of letters in original string and count number of singles and doubles.

    (doubles — how many pairs of letters there are, singles — number of letters minus doubles * 2).

    Knowing singles and doubles values you can calculate solution.

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    There's no need for maintaining sets, you only need the counts of the possible number of pairs you can form for all the letters.
    This divided and then multiplied by k (integer division) will give the number of pairs that will be assigned to each color.
    If there are still other letters which have not been selected in any of the selected pairs yet, you can add 1 such char to the string of each color (eg: cac).
    My Submission.

»
2 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

DAAAMN, I had so much fun solving E (although I didn't quite finish it).

I thought that out of all solutions we were supposed to pick one that has least segments — which imo is even better problem (not sure if harder then original though).

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Actually my solution to that problems is O(n * m * n). Does anybody know how to solve this variant in better time?

»
2 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

I somehow frequently mess up the easier problems smh. Got 3 WAs on B when it was just basic implementation, and wasted a lot of time on D, when my first instinct was greedy with priority queue, but ended up trying to solve it with Binary Search unsuccessfully and finally solved it with my first instinct smh.

Great problems though.

»
2 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

It’s so great to solve all problems without a WA for the first time!

»
2 weeks ago, # |
Rev. 2   Vote: I like it +25 Vote: I do not like it

Solved C using Kuhn's algorithm... LMAO :D

If you are interested:
  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Same. The first thing that came to my mind after reading the problem is bipartite matching.

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    I solved it using priority queue :)

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Could you explain your approach, please? I just don't see how's this problem about bipartite matching...

    • »
      »
      »
      2 weeks ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      For each number a_i in the array, consider the set of numbers from 1 to n that appear when you keep doing floor(a_i/2).

      For example, a_i=25 and n=5, then the set is {1,3}.

      Then we have a bipartite graph of positions and the numbers that could go there. As we can only have one number in each position, this implies a bipartite matching in the graph.

      • »
        »
        »
        »
        2 weeks ago, # ^ |
        Rev. 2   Vote: I like it 0 Vote: I do not like it

        I understand that the nodes in the said graph will be floor(ai/2) such that they are >= 1 and < n. But what about the edges ? How will they be formed ?

        Update: I learnt what matching is now. We want to fill up permutation from 1 to N. so basically for each position i from 1 to N, we are linking it to all possible downgrades from ai that are >= 1 and <= n. And at the end we are just checking that n positions to fill and from 1 to N numbers to fill from, so our maximum bipartite matching should be N.

        Thanks santiago.slf. Got to learn new things, that I didn't know existed, what matchings are and Kuhn's algorithm for maximum bipartite matching.

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    me, too, the first idea that came to mind at this time. but failed to implement. everything is so simple but not obvious))

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Why you are creating edge to (n + a[i] — 1) not a[i] ? g[i].push_back(n + a[i] - 1);

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

how to solve F? Tried something close to a binary search but got WA.

»
2 weeks ago, # |
  Vote: I like it +27 Vote: I do not like it

I felt crippled at binary search in F :))

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it +13 Vote: I do not like it

    F made me realise that if my usual binary search implementation isn't suitable for the problem, then I am screwed :)

»
2 weeks ago, # |
  Vote: I like it +14 Vote: I do not like it

This round is amazing! I really enjoy the problems. Thank you very much :)

»
2 weeks ago, # |
Rev. 2   Vote: I like it +4 Vote: I do not like it

NOice:))

»
2 weeks ago, # |
  Vote: I like it +7 Vote: I do not like it

»
2 weeks ago, # |
  Vote: I like it +4 Vote: I do not like it

Why is G so simple, although I won't

»
2 weeks ago, # |
  Vote: I like it +9 Vote: I do not like it

Interactive problems and BinarySearchForces.

Name a more iconic duo. I'll wait.

»
2 weeks ago, # |
  Vote: I like it +23 Vote: I do not like it

Why? Just why??

Спойлер
»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Got the binary search idea for D but did not know how to handle the odd case

»
2 weeks ago, # |
  Vote: I like it +12 Vote: I do not like it

Don't know why but That photo looks like a team of hackers from some Hollywood movie lol :/

»
2 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

What I learned from this contest . Take all inputs before even thinking of outputting an edge case

How foolish can I be at times

»
2 weeks ago, # |
Rev. 2   Vote: I like it -14 Vote: I do not like it

Great round!

»
2 weeks ago, # |
  Vote: I like it +11 Vote: I do not like it
Then you can swap any two symbols painted in the same color as many times as you want.

Imagine not noticing this line in problem D.

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Are exceeded queries in interactive problems always tagged WA. I kept on thinking about issues with the logic when my solution was actually asking for an extra query than needed.

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    You can have something like this in your code. Now you get MLE if you ask more than 10 queries.

    if(asked>10){
         vector<ll> check(MAX*MAX);  
     }
    
    • »
      »
      »
      2 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Thanks. Looks like a very useful trick.

    • »
      »
      »
      2 weeks ago, # ^ |
        Vote: I like it +14 Vote: I do not like it

      You can just keep an assert statement which will give you a runtime error if you exceed the query limit.

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hi

»
2 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it

Great round. I really enjoyed solving the problems, especially problem G.

»
2 weeks ago, # |
  Vote: I like it +7 Vote: I do not like it

In F the condition that x < n was written on top, and I skip it so in 1h30m I can't reduce 11 queries to 10 queries lol :L rip everyone liked me :(

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    In the exact same boat as you lol. Hurts a lot since it's a rated contest for me.

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it -34 Vote: I do not like it

    yea but howcome the answer for the first testcase is 3, it should be less than n right Aris?

    • »
      »
      »
      2 weeks ago, # ^ |
        Vote: I like it +5 Vote: I do not like it

      How about you read the goddamned statement before trying to point fingers nowhere?

      Spoiler
      • »
        »
        »
        »
        2 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        well the statement wasn't clear for me, it hurts to be polite !?

        • »
          »
          »
          »
          »
          2 weeks ago, # ^ |
            Vote: I like it -9 Vote: I do not like it
          Spoiler because i won't flood the page with useless writing
          • »
            »
            »
            »
            »
            »
            2 weeks ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            lool, did you even read whatever you pasted? I didn't offend anyone, I was asking a question, I didn't complain about the problem during/after the contest, I also didn't blame the problem writer, nothing happened like that.

            what I really see is you trying to mimic um_nik's attitude, and it just doesn't look good.

            • »
              »
              »
              »
              »
              »
              »
              2 weeks ago, # ^ |
              Rev. 2   Vote: I like it 0 Vote: I do not like it
              Yet again
              • »
                »
                »
                »
                »
                »
                »
                »
                2 weeks ago, # ^ |
                  Vote: I like it +8 Vote: I do not like it

                Congratulations you're not illiterate, because you were able to read the problem statement.

                Try to have peace in your life, good luck ;)

»
2 weeks ago, # |
  Vote: I like it +4 Vote: I do not like it

Was problem G taken from somehwere? It has way too many submissions.

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

for question c can anyone tell me why my code gives tle for tc 2 https://codeforces.com/contest/1624/submission/142232813 Thanks in advance!!

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Nice Div.3 contest. Thank you!

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Does "wrong answer Jury has answer, but participant doesn't (test case 3648)" means my answer is -1 but Jury is not or my answer is empty? Moreover, I just touch the length of segment must be 2 or 3 in problem E, but I implement it so complex, and finally get a wa2 without anymore clue... https://codeforces.com/contest/1624/submission/142294335

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yes, it means that the jury was able to find an answer, but you could not. For example, consider this testcase.

    1
    
    2 3
    000
    000
    000
    

    The required phone number is just a duplicate of the existing numbers. Hence, an answer definitely exists. However, your code produces $$$-1$$$.

    • »
      »
      »
      2 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I get why my algorithm is fake. Thanks a lot~

»
2 weeks ago, # |
  Vote: I like it -14 Vote: I do not like it

Video Solutions for anyone looking

»
2 weeks ago, # |
  Vote: I like it +16 Vote: I do not like it

This round was very special for me because for the first time I have solved a problem in live contest. I loved it. I am happy and only I know how happy I am. We need more division 3 contest.

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Got a binary search solution for F, but it gets W/A on 6th test. Can anyone explain mistate or send a test that fails https://codeforces.com/contest/1624/submission/142288442 Thanks!

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it +3 Vote: I do not like it
    Participant Jury Interaction
»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

https://codeforces.com/contest/1624/submission/142255199 Can anyone tell me why my code for q.d is failing?

»
2 weeks ago, # |
  Vote: I like it +18 Vote: I do not like it

Amazing contest!

The problems were very interesting, especially problem G!

»
2 weeks ago, # |
  Vote: I like it -17 Vote: I do not like it

can someone plz explain this line

std::cout << std::max((n - odd) / k, v - (v + 1) % 2) << "\n";

from this sol of problem D?

#include <bits/stdc++.h>

using i64 = long long;

void solve() {
    int n, k;
    std::cin >> n >> k;
    
    std::string s;
    std::cin >> s;
    
    int cnt[26] = {};
    for (auto c : s) {
        cnt[c - 'a']++;
    }
    
    int odd = 0;
    for (int i = 0; i < 26; i++) {
        odd += cnt[i] % 2;
    }
    
    int v = (n - std::max(0, odd - k)) / k;
    std::cout << std::max((n - odd) / k, v - (v + 1) % 2) << "\n";
}

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    
    int t;
    std::cin >> t;
    
    while (t--) {
        solve();
    }
    
    return 0;
}
»
2 weeks ago, # |
  Vote: I like it +3 Vote: I do not like it

oops, I tried to do something more clever with F and figure out the bits one by one. was wondering why I was retarded for the past hour lol

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I'am gray. But it is showing under 'only unrated' in my profile's contest page.

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    maybe rating will be calculated after hacking phase? it seems that it didn't counted for anyone

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    just wait

»
2 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

Upsolved E by matching a string using extended patterns (with code) within regexes (DFS simulation). Perl: 142302044.

»
2 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Solution to Problem C using "Max Flow" :)142222070
Resource For Dinic's algorithm

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    If someday there will be an super-algorithm to solve all problems, everyone will be using that !

    • »
      »
      »
      2 weeks ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      That will kill the very fun of problem solving

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

can anybody tell , wts the bug for my D'th sollution https://codeforces.com/contest/1624/submission/142289003

solved it during test , it stuck on 10th test case , still cant figure out

»
2 weeks ago, # |
Rev. 5   Vote: I like it -15 Vote: I do not like it

nice contest

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Please help, For which TC I am getting WA (Problem C) Your text to link here... thanks in advance

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it +1 Vote: I do not like it
    Input
    Expected Output
    Your Output
    Comments
»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

O(32(n+m)) was not acceptable in problem G?

»
2 weeks ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

for E consider the following test case

2 4

1278

6935

7878

output->

2

3 4 1

3 4 1

I wanted to ask whether the output is correct? that is can we repeat a particular segment?

UPD-> Got it, read the announcement now:)

»
2 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Editorial?

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Can somebody please explain me why I didn't get any rating for participation in this contest?

I don't want to create a new post, so desperately hoping my comment here will get some attention.

I'm a newbie in competitive programming and just recently joined Codeforces. I hoped to start acquiring rating and earning experience by participating in Div.3 contests. Even if this contest (#764) is the second contest I'm participating (the first one was Hello 2022 where I solved just one problem), I assumed I'm qualified to be rated in Div.3 contests. However, this one didn't affect my rating at all.

Please, help me understand the rules of the system!

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Ratings haven't been updated yet. Normally in div3 rounds, there is a 12-hour hacking phase. When the hacking phase is done, ratings will be updated in a couple of hours.

    • »
      »
      »
      2 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Thank you! I didn't know that rating got updated within couples hours after the contest.

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    you can always wait until the record of this contest appears in your contest history.

»
2 weeks ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

Problem E, can anybody tell what might be the error in my approach or code? what iam doing is.. i store 2 digit numbers and 3 digit numbers from n phone numbers, because we can segment into substrings of length 2 and 3 if answer is possible. now i took dp[i][j] , where i=[1,n] and j=[0,1]. dp[i][0] means last segment is of length 2, and we have seen till i characters in s. dp[i][0]=dp[i-2][0]||dp[i-2][1] if substring s(i-1,i) present in any n phone numbers. similarly dp[i][1] means last segment is of length 3, and we have seen till i characters in s. dp[i][1]=dp[i-3][0]||dp[i-3][1], if substring s(i-3,i) present in any phone numbers. getting error in tc2. code link: https://codeforces.com/contest/1624/submission/142327596

Edit: got it, approach is right,but while solving , i stored 2 digit and 3 digit numbers as integers because of which some cases where 0 is present might be failing. i modified and stored 2 digit and 3 digit numbers as strings only which solved the issue

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I got wrong answer "wrong answer Jury has answer, but participant doesn't" in Problem E. I use greedy and kmp algorithm. I match target number as much as possible. Once match is one, i will backtrace one and rematch again. If it can't match target number or one of the segments is one, it will break and output "-1". My algorithm complexity would timed out. But is this algorithm is wrong? I try many tests and verify my answer is correct.

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    No, this is correct, you must have made a mistake somwhere.

    I've done something very similar and it fails only on big tests (tle).

    • »
      »
      »
      2 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Okay, I overestimated your solution. To make up for my mistake here is a test where your solution is failing :).

      1 1 10 abcxcdxdcx abcdcdcdcd

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Still rating is not updated

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    it's system testing. I guess too many successful hacks.

»
2 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Again! I turned into a zombie after solving 2 problems

»
2 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

can someone help me with my submission 142259904, it gives TLE although the time complexity is almost the same as the solution 142198142 I think.(newbie here) PLease correct me if I'm wrong

»
2 weeks ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

Are there any problems with the players ranked 212?Can anybody check it?

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I saw someone was gonna stream the solution of these but I could not find it now, do you have that link?

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Is this a rating contest. If yes, then how much time will it take for codeforces to give ratings?

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

wait for rating and wait .....

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I need to know why my rating is not increased. I am currently 1210 and i solved 3 problems of this contest. Is that normal?

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Why this contest is unrated for me? Wasn't it rated for all participant under rating 1600?

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    Instead of killing your nerve cells in waiting you can always use CF predictor (it is quite accurate)

    • »
      »
      »
      2 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      What is this?

      • »
        »
        »
        »
        2 weeks ago, # ^ |
        Rev. 2   Vote: I like it 0 Vote: I do not like it

        Browser extension which predicts rating changes on contest standing page.

      • »
        »
        »
        »
        2 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Extension for viewing predicted rating change .

      • »
        »
        »
        »
        2 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Carrot rating predictor You can add it as your chrome extension.

    • »
      »
      »
      2 weeks ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      cf predictor was showing a rating change of +32 but in real I got +15 Sometimes its not so accurate

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

rating changes when??

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hi,

I joined the contest yesterday. My first one :) It was really fun, thank you very much.

While the contest was running I was able to solve Part C and it went through. Even after the contest it was green. Now one night after the contest my rating got removed? Is that a bug? Duration was like 2.2 — 2.5s, not that great I know but limit was 3s.

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

where can I find the solutions ?

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    When the editorial publishes, you will find the solutions on the problem page at the bottom right corner!

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I know this isn't the intended solution of C, but can someone explain why this wouldn't work?
My Submission (WA on 5).

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it +4 Vote: I do not like it
    Input
    Expected Output
    Your Output
    Comment
»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

How can I get the solutions?

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    When the editorial publishes, you will find the solutions on the problem page at the bottom right corner! You can also check other solutions after your thinking the problem.

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Pls can somebody tell why this solution 142368820 is not giving TLE and what is its time complexity. IMO its time complexity is greater than O(n*m*m) (not sure). Thanks.

»
2 weeks ago, # |
  Vote: I like it +6 Vote: I do not like it

Time limit of Problem G is not java friendly ;(

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

This was my submission — 142369596 for 1624E - Masha-forgetful.

The checker log gives me the following message:
wrong answer Integer parameter [name=r] equals to 4, violates the range [1, 2] (test case 249)

Does this mean that my code prints r = 4 for some line while the length of the number is 2? (correct me if I'm wrong)

I can't seem to find my mistake. Any help would be appreciated!

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it +7 Vote: I do not like it

    No, it doesn't.

    You forgot to print the number of segments used if $$$m$$$ is 2 or 3.

    For example, one failing test case can be.

    1
    
    1 2
    00
    00
    

    A possible answer is

    1
    1 2 1
    

    but your code would produce

    1 2 1
    

    So, in the original testcase, the jury thinks that you're going to print $$$L$$$ segments, while you actually intended to print just one. Hence the WA.

    • »
      »
      »
      2 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Oops I missed that. Thank you very much!

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

This is my submission for problem E 142402622. The checker log gives the message wrong answer Answer phone is not "s" (test case 532). I am not able to understand the meaning of this message and also not able to find the bug in my code. Could somebody please help?

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it +3 Vote: I do not like it
    Input
    A Valid Output
    Your Output
    Comments
»
2 weeks ago, # |
  Vote: I like it +14 Vote: I do not like it

MikeMirzayanov my submission 142240970 coincides with 142233988 from bernardo_amorim, after looking at his code I think it was triggered because of the main, he have a similar style to mine and this problem is a classical 15 lines problem, I do not know this guy and I did not cheat in any way!!. Please remove the cheating accusation. I saw that he complained too here https://codeforces.com/blog/entry/8790?#comment-876676.

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

where are the editorials for this contest. if they are there, if provide one. It will help people like me who is doing cp alone.

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

The hardest problem of this round: Figuring out what the pun in problem F's name is.

I was like: "Interac-dive? But the problem has got nothing to do with diving"

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It's probably 'Interac-div-e' where 'div' stands for the division operation.

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

The girl on the bottom-left looks cute!

»
13 days ago, # |
  Vote: I like it 0 Vote: I do not like it

I don't understand why my code is wrong? link: https://codeforces.com/contest/1624/submission/142618684