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

Автор TadijaSebez, 4 года назад, По-английски

Hello, Codeforces community!

I'm glad to invite you to Codeforces Round #758 (Div.1 + Div. 2), which will be held on Dec/11/2021 13:05 (Moscow time). The round will be rated for both divisions. Note the unusual start time.

The problems were taken (mostly) from the ByteDance — Moscow Workshops Online Contest, which is happening at the same time. Tasks from the Online Contest are prepared by TadijaSebez and oversolver, additional tasks brought to you by Um_nik and gen. We are very thankful to the testers: Monogon, 74TrAkToR, AmShZ, DeadlyCritic, errorgorn, oolimry and icypiggy for their time and great feedback. Also big thanks to authors of other problems of the Online Contest snarknews and teraqqq for cooperation, Bytedance instructors EvenImage, Syloviaely, Gromah, Claris for testing and reviewing the Bytedance online contest, the contest coordinator antontrygubO_o for the great help in setting up that round and MikeMirzayanov for testlib.h, Polygon and Codeforces.

ByteDance is a global technology company operating a range of platforms that allow people across languages, cultures, and geographies to create, discover and connect. ByteDance has partnered with Moscow Workshops and Codeforces to organize a top-tier and exclusive training camp for the International Collegiate Programming Contest. The upcoming Programming Camp will be held in Beijing from February 17th to 23th, 2022.

ByteDance — Moscow Workshops Online Contest is an opportunity to participate as teams onsite in this camp. Due to COVID-19 restrictions, mainly teams from China can participate onsite this year. For the international teams, the opportunity of online participation is considered.

You can find more information about this training camp at https://programcamp.bytedance.com/.

UPD: The scoring distribution is 250 — 750 — 1000 — 1500 — 2000 — 2500 — 2750.

UPD 2: Editorial

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

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

3 contests in a day! CF, atcoder ABC, then CC starters.

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

I loved the problems.

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

Note The Unusual Timings

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

Will it be based on ICPC style scoring or problems will have separate points like in normal div 1+2 rounds?

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

I think div.1 + div.2 always be a big challenge and it means large rating increasing or decresing. Hope everyone can gain more rating!

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

After 10 days of break, finally a codeforces round. Hope this round will be good.

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

    After 10 days of break, finally

    Wait until you get to Div. 1 if you think 10 days is long.

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

      For div 1 coder, like you, the word should be "long long long long".

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

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

      Nothing prevents you from doing unrated participation in Div.2 rounds. That is if you want to have fun solving problems together with the others and then discuss interesting solutions after the contest is over. Also in an unrated round you are free to start solving problems in reverse order if wasting time on Div.2 A/B/C/D is not enjoyable.

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

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

          I participated in an unrated Div.3 contest on Codeforces when I briefly became expert. And I participated in a few unrated Div.3 / Div.2+3 CodeChef contests too. Not to mention AtCoder AGC contests (unrated for a different reason). All of these contests were fun and challenging, even though they didn't affect my rating. So what exactly would I not get?

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

        Then the original commenter still shouldn't complain because nothing prevents them from doing HackerEarth contests and geography homework.

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

          I have nothing to say about your "geography homework" claim, because it's a total nonsense. I'm putting the rest of my reply under a spoiler, because it's a bit too long:

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

            You are overthinking it.

            • The meaning of my first comment: Div. 1 contests are more sparse than Div. 2 and it is kinda funny to see Div. 2 people complaining.
            • The meaning of my second comment: A Div. 2 contest is not the same as a Div. 1 contest, just as a Div. 2 contest is not the same as a HackerEarth contest.

            That's it. That's the meaning of these two comments. Extracting anything else from there is a bit silly.

            Here is my reply to your essay
»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How many problems?

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

Why is the round combined division?

Personally, I hate combined division rounds with a passion. Even if they are very nice, I find that adding two easy problems to Div. 1 makes the round less enjoyable, at least for me. What is more, I find it horrifying that every scheduled, rated for Div. 1 contest until the end of the year is combined division. I can sort of understand why Global round is combined division, and I suppose that it is somehow traditional that the Good Bye round is combined division (especially if it is sponsored and therefore may have prizes) but what is the reason for this round? Just that it is a copy of some other contest?

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

    Why though?
    From what I understand (admittedly having never been in div 1), shouldn't combined rounds ideally be, for div 1 participants, a 30 mins or so speedtyping contest and after that a normal div 1 round?

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

      Do you find a 30 min speedtyping contest fun?

      Further, getting stuck on one of the easy problems is the worst feeling in the world and is a major tilting factor for me.

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

        Yeah, understandable. Separate div 1 and div 2 rounds seem much better then for div 1 participants, since they take away the speed-typing part of it.

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

        Agree, when I solved A,B and saw over 1000+ people have passed,the feeling is really bad :(

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

        Good thing this contest was just a regular div1 with an extra easier problem :clown:

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

        This is a tangent. If I face trouble solving a problem, I don't call it easy. Actually I try to refrain from labeling problems "easy" and observations "obvious". I don't like people doing that either, NGL. By calling something "easy" we undermine the observations which were required to solve it whether we meant it that way or not. Not at all saying its right or wrong, just felt this viewpoint should be out there.

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

      Normally, I wouldn't worry too much about 30 mins of speedtyping, but the fact that this combined round is just 2 hours long makes me nervous, since it leaves only 1.5 hours for Div 1 problems. That is, if we do not fuck up and waste more time on the easy ones...

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

    Combined rounds and easy problems are the reason why I'm at 2800 and not 2500 and I'm not very proud of this

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

    A 2 hour combined round sounds really scary to me. Div 2 people tend to like combined rounds because they can gain a lot of ratings with a good performance. It sucks for us but we are the minority after all.

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

      is it true div2 people can gain more rating in combined rounds? based on my experience the gains are exactly same as div2 rounds

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

        If you over performs and beats some Div 1 participants you're not supposed to, you will gain more than you do in a normal Div 2 round (because you won't get a chance to beat them under this circumstance). This of course only applies to very few people each round but it does generate a mental effect for a lot of people.

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

    There is a benefit to combined rounds, though. In many Div 1 only contests, if people don’t like the look of problem A they just bail out to stay unrated, which means that those who actually try are penalised for it. There was a very recent example of this in round 745 Div 1 — problem A was hard so over half the registered competitors submitted nothing. I think having a problem A and B doable very quickly kind of forces your hand — you’re either in or you’re out, you don’t have time to play the system.

    This is not to say that you don’t make many valid points; just to point out one benefit which I actually consider quite significant.

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

Imagine not upvoting this blog.

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

Nice

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

lol

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

So, my plan is to solve as many problems till 13:00 and then instead of despairing at the last 3-4 problems, I'll switch towards ABC contest to keep up that sense of achievement. #ICheatMyself

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

the best round because it's written by the best programmer

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

No testers are begging for contributions (specially 1-gon) XD.

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

    Idk maybe ill just rant about testers commenting in blogs here since the round is over. Why is it normal that testers are commenting things such as "I loved problems", "Problems are beautiful". Why is everyone fine with people saying that? Would people be fine if I commented "I didn't enjoy the problems, they were boring"? Should we normalize testers saying "I hated the problems" in future contests now?

    I honestly find it hard to believe that the guy who only solved ABC in VC and didnt upsolve anything else commented "I loved problems" because he genuinely loved the problems. You really looked at ABC and went "I love these problems"?

    Can we as a community just stop pandering these types of testers, please. Make testing be a job of ensuring contest quality, not a contribution farmer for those with the right connections.

    Thank you for listening to my TED talk.

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

      There really is nothing wrong with testers saying "I loved problems", "Problems are beautiful" as a tester if you really enjoyed the contest. In fact, I think its a good way to encourage others to take part in a round that you believe they will enjoy, as well as a public compliment to the setters

      But of course if you recommend the contest and people didn't like it otherwise, then you're at fault for misleading the participants who hoped for a good contest, and also making future "I loved problems" recommendations by testers less credible for actually good rounds. If they're an outlier who thinks it's good while others thinks it's bad then whatever, but outliers are rare (and should know when their opinions aren't aligned with what others think)

      Anyways, if no tester comments anything, it probably says more about the round than if testers are commenting if they enjoy testing

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

if any of you are interested in cheating, send a message to nitin_05 or ashokesen02. they both became experts in codeforces by buying solutions and adding many comments in the codes.

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

What may be the difficulty level for the problems?? If I could know, I could decide whether to participate or not as I only can solve up to 1200 difficulty level, anyone please have idea??

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

I have a gut feeling we are going to face problems of Byteland

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

contestfull day it is...

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

Give me some delta ...

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

Hope to gain some non-negative delta!

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

The difficulty gap between C and D

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

Before starting of the round : "I am gonna try to get to 1100 this time" After implementing problem B : "Ahh !! Shit, Here we go again"

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

Thank you very much for a disgusting round.

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

Me after rating changes.

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

Hmm this is weird my solution for C is n*Log(n) but it's TLE I can't see what did I do wrong

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

It was so difficult that I sat down in two minutes

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

I'm gonna have nightmares about B. Daaamn it took me so long to to get it.

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

thank you for the worst contest i've ever seen , and f**k problem B

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

My solution to E is nlogn*24, was it intended to fail? I have used ordered_sets which could have been avoided using fenwick but didn't have time to implement.

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

Why did problem C have 1sec time limit instead of 2?

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

What the fuck was problem B

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

Hint for B?:(

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

Why only 2 hours???

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

What an unbalanced problemset!

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

worst contest I've ever competed in

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

Fst'd C because I didn't clear the adj2(graph) in each test.Pretests are very weak

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

Why would that TLE in C I'm not looking at any number twice right ?

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

    When using sets you appear to use (correctly) set::lower_bound, but with maps you use std::lower_bound instead of std::map::lower_bound. If you fix this does it solve your problem?

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

      i called them mp1,mp2 as a reference that they represent the two maps in problem C but they're vectors I should write the code clearly there're several stupid things but i didn't waste time during contest to make the code better but that's not the TLE reason though or can i use that sort on vectors ? Or you mean i should use maps I'm confused

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

lots of people getting wrong on test case 21 on problem C. :( me also

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

Ideas for problem D?

I think it might be Qpow+NTT, but 10^5 seems to be a bit big for that...

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

    It's easy to see that the coloring is valid only when the number of 'BB' and 'WW' is the same,except for when there is only 'BW' and 'WB'. The first case can be calculated by using generating functions.(Hint: $$$[x^k](1+x)^n=\dbinom{n}{k}$$$ ) The second case is quite trivial, then the complexity is just $$$O(n)$$$ or $$$O(n\log n)$$$ if you calculate the reciprocal using quickpow.

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

Any hints for Problem D?

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

look at their submissions.

nexoxogoc ouhtek robot_bobot ybgbsydvh

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

.

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

What is the non-convolution solution for D?

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

Even this code could pass the pretests of C:

#include<bits/stdc++.h>
//#define int ll
#define pb push_back
#define mp make_pair
#define sec second
#define fir first
#define pii pair<int,int>
#define piii pair<int,pair<int,int> >
using namespace std;
typedef long long ll;
const int N=300005;
const int inf=1<<30;
const ll inff=1ll<<60;
inline int read(){
	int x=0,f=1;char c=getchar();
	while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}
	while(c>='0'&&c<='9'){x=(x<<1)+(x<<3)+(c^48);c=getchar();}
	return x*f;
}
int n,o[N];
pair<int,pii>a[N];
int main(){int tests=1;tests=read();
while(tests--){
	n=read();
	for(int i=1;i<=n;i++)a[i].fir=read();
	for(int i=1;i<=n;i++)a[i].sec.fir=read(),a[i].sec.sec=i;
	sort(a+1,a+n+1);int mx=0;
	for(int i=1;i<n;i++){
		if(a[i].sec.fir > a[n].sec.fir) mx=1;
	}
	if(mx)for(int i=1;i<=n;i++)printf("%d",1);
	else for(int i=1;i<=n;i++){
		if(i == a[n].sec.sec) printf("1");
		else putchar('0');
	} puts("");
}	return 0;
}


So crazy. I cannot understand.

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

Main Test 21 on C killed a lot of us :(

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

Didn't expect problems like B and E in an anton contest.

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

wow I can't believe it!

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

C is the worst problem I've ever seen.Weak sample,weak pretest and stupid problem

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

Why is there no obvious corner cases in D's pretests?

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

~700 system test fail on C. Nice pretests you got there.

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

C has a lot of failed system tests because of weak pretests.

This actually made me realize something. It is for sure an unpopular opinion, but I think weak pretests can be a good thing.

C is exactly the type of problem that a lot of people solve by guessing: there are a lot of feasible-looking greedy-strategies, people implement one of them without knowing whether it actually works, get AC and move on to the next problem.

Weak pretests disincentivize guessing and make contestants more careful. It puts more weight to mathematical thinking and less to just quickly implementing something that might be correct.

The bad thing is that people expect "pretests passed" to mean "accepted" and get frustrated when they fail the system test. But if weak pretests were more common, people wouldn't have such an expectation and would be more careful from the start.

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

In problem D, how to calculate $$$\sum_{x = 0}^{t} \binom{a}{t-x}\cdot \binom{b}{x}\cdot 2^{b-x}$$$ for every $$$t$$$ from 1 to 1e5 ($$$a$$$ and $$$b$$$ are constants) in $$$O(n)$$$?.

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

    I realised it only 1-2mins before the contest end that you do not need to do that, you just need to make sure that the number of W cells = number of B cells. Forcing number of BB = number of WW while not caring the number of WB and BW, it is actually the same as the constraint number of B cell = number of W cells. Of course, you have to deal with the case where there is no BB or WW.

    Figuring that out too late and having my C fail systest means I will be back to candidate master :(

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

    You don't need to. The final answer is a single binomial coefficient if you ignore the edge case, which you can subtract out separately.

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

What the hell, just mistake cell for grid point in E :(

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

Very weak pretests on D

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

How to unregister after contest ends?

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

Codeforces round #745(Div.1)+Codeforces round #745(Div.2)=Codeforces round #758(Div.1+Div.2)

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

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

Problem A was too easy.

Problem B was too weird for B level.

Problem C and D had too much FSTs and I didn't like C a lot(personal opinion).

Did not enjoy the contest that much.

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

Weak pretests and there are cheaters from byte-camp. Nice problems but bad round.

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

How to solve B cleanly? I have a monstrous 100 line casework solution but I seriously doubt its the intended:

  • $$$abs(a - b) \gt 1$$$ or $$$a + b + 2 \gt n$$$ $$$\longrightarrow$$$ $$$-1$$$

  • $$$(a = 0, b = 0)$$$ $$$\longrightarrow$$$ $$$1, 2, ..., n$$$

  • $$$(a = 1, b = 0)$$$ $$$\longrightarrow$$$ $$$1, n, n - 1, ..., 2$$$

  • $$$(a = 0, b = 1)$$$ $$$\longrightarrow$$$ $$$n, 1, 2, ..., n - 1$$$

  • otherwise $$$\longrightarrow$$$ split into $$$(a + 1)$$$ low segments (elements from $$$[1, n / 2]$$$) and $$$(b + 1)$$$ high segments (elements from $$$[n - n / 2, n]$$$) which alternate (Starting segment type and which segment $$$\frac{n + 1}{2}$$$ goes to for odd $$$n$$$ depend on whether $$$a \gt b$$$ or not). Sort each segment internally to ensure only one endpoint is a local maxima / minima (careful about sorting order for endpoints)

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

For E, is it possible that every single submission that passed pretests get rejudged to AC? I recall only seeing 61 pretests, and after system testing, there are only still 61 tests, so I don't believe any new tests were added. My submission received TLE after system testing, but I submitted the same code after contest, and it received AC. Also with this AC, I would become grandmaster for the first time, instead of going back to International Master.

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

Is there any approach for solving C using C++ policy based data structures (PBDS)?

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

Share my solution to D:

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

Here is some feedback on the contest:

A: This is the easiest problem I remember having solved on codeforces. Ok problem.

B: Ok problem. Since it is a problem B and there are various cases to consider (as the infamous 1 0 0), I would have liked to have samples covering all possible cases.

C: Very nice problem. During the contest I did not prove the correctness of my solution.

D: Very nice problem. The first part of the solution (understanding which colorings are valid) is interesting and clean, the second part (i.e., how not to use FFT) is magical. Could have been better with higher constraints (and another modulo) to prevent FFT solutions from getting accepted.

E: Ok problem. Together with cip999 we proposed a problem very similar to this one for GR14 to antontrygubO_o, but he rejected it. Still, I messed up the implementation badly. I would have appreciated a higher time limit.

Thanks to the authors.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +16 Проголосовать: не нравится
17 Pages of WA *-*
»
4 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится
Spoiler

I've won, but at what cost? :(

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

The pretests for D were really bad. There were no pretests containing very obvious corner cases like all characters equal to '?'

»
4 года назад, скрыть # |
 
Проголосовать: нравится +54 Проголосовать: не нравится
Being really happy to make a successful hacking attempt on Problem C and then failed to pass system tests
»
4 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

I don't know why this happened.. during the contest prob-C passed all the pretests,,but after the contest was over and after system testing it shows that wrong answer on testcase 23...What is this? why this happened??????????????????????

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

Good contest full of adhoc problem. But I was not in good state..

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

I like F, but it would be better if the TL was more generous (I'm assuming my solution has the expected complexity). If you were afraid of $$$O(KN^2\log N)$$$ solutions with FFT, you could have used modulo $$$10^9+7$$$ to slow down such solutions.

G is a zero-idea implementation task. I really don't like it.

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

Bro bro wai petest so stronk??

int ma=0,mb=0;
forinc(i,1,n) a[i]=in,ma=max(ma,a[i]);
forinc(i,1,n) b[i]=in,mb=max(mb,a[i]);

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

Please can somebody say what's wrong with my approach? 138778827

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

Good contest! Interesting problems!

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

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

Ratings updated preliminarily. We will remove cheaters and update the ratings again soon!

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

How to solve problem C greedily

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

[Deleted]

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

TadijaSebez , oversolver by convention all cf div. 1 + div. 2 round has "Div. 1 + Div. 2" in the name where there's a space between Div. and the number. In this contest name there's no space between Div. and 1 so can you add a space as it is breaking CFTracker's categories. Thanks!

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

love this contest

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

Why dose the answer of sample #5 of F be 11? I can only find 8 arrays: [1,0,0],[1,0,1],[1,0,2],[1,0,3],[2,0,0],[2,0,1],[3,0,0],[3,0,1]

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

Hint for C.

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

Didn't understood C.