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

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

omg hi!

I am pleased to invite you to participate in Codeforces Round 712 (Div. 1) and Codeforces Round 712 (Div. 2)! You will be given 6 problems and 2 hours 15 minutes to solve them. I'm happy to announce the theme of this round is déjà vu!

I would like to thank the following people:

Make sure you read all problems, and I'm happy to announce the theme of this round is déjà vu! Good luck, have fun!

The score distribution will be announced immediately because you deserve it ❤️:

Div. 1: 750 — 1000 — 1250 — 1750 — 2500 — 4000

Div. 2: 500 — 1000 — 1750 — 2000 — 2250 — 3000

UPD: Editorial

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

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

As a useful tester, give me contribution!

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

As a tester, this bit is getting old.

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

As a useful tester, I can confirm that the problems are very high quality and have short and clear statements. All hail lord 1-gon! Also, contribution pls, thx.

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

As a useful tester and loyal Monogon supporter,

Reddit may have GME Stock, but we have Monogon's contribution! TO THE MOON, COMRADES!!!

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

As a tester, Its my first round I have tested, so please give me contribution :)

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

As a tester, is anyone else tired of as a tester comments?

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

omg Monoannouncement! Will you reply to this comment :pleading_face:

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

.

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

As the first person to register, I spent 5 minutes waiting for the registration to open. :( That's a 5 minutes I'll never get back, so give me contribution!

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

Why do I feel like, I've been here before ?

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

as a future participant to this contest, i wish to everybody good luck!!1!! I hope you all get rating increase!1!!

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

I hope the deja vu plot isn't a part of April Fool's Day,lol!!

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

How to become tester?

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

I would like to see a trend where every Monogon's blog's comments will have crazy high upvotes (even is it rated? comments).

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

Having a weird feeling that 712 has happened before :)

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

How to become a contestant?

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

I'm happy to announce the theme of this round is déjà vu!

So there will be problem on recursion

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

oh man when we select the statement antontrygubO_o for accepting all of my problems we see antontrygubO_o for accepting all of my problems at gunpoint

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

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

I was very confused about how Anton accepted all the problems.

Then I double-clicked on the line and I was relieved.

Then I clicked on Anton's profile link and I was relieved again.

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

.

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

I am going to be green after this round. Give me Contribution.

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

My first CF round

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

Hope to solve at least one problem :)

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

do you guys noted this thing?

Screenshot-2021-04-02-at-1-24-39-AM

for those image is not loading : image

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

As a person I love the CodeForce community. Give me a contribution ..

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

How to be a useful tester

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

Why is 3rd question 1250 in Div1 and 1750 in Div2? In score distribution

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

Great! I'm going to participate in this wonderful round((

I hope everyone here gets high rating!(at least higher than me)

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

[deleted]

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

Deja vu

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

1-gon orz

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

Really excited for the theme xD

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

As a useful tester, I am certain Monogon deserves to have more than $$$200$$$ total contribution for this round is just perfect.

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

Me trying my luck for the contribution giveways.

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

Will Déjà vu! theme challenge this equation?

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

Its funny, the first thing that hits my head when I see a Monogon contest is not his penchant for contribution but that his first contest was made unrated cuz of queueforces. And now that he announced that the theme is deja-vu ... <cold face emoji>

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

the enthusiasm in this blog is on another level 0:)

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

Monogon + déjà vu == Unrated contest?

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

after a long leave , i' back,I will participate the contest,hope a nice problem,ovo~

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

Is it rated contest?

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

Sadly it is clashing with leetcode biweekly

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

Monogon orz

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

Solid A I guess.

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

I didn't expect that SecondThread will make a video to upvote the post. That's great!!! I had already upvoted the post before watching the video .. DOUBLE CHECK!!!!!!

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

https://youtu.be/Oqew3Y2CNqg 1-gon please reply if it's you ?? Thank you!!

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

I'm happy to know that the theme of this round is déjà vu!

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

So excited to know that the theme of this round is déjà vu!

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

USA is an actually a good country :D

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

I like problems selected by antontrygubO_o

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

The first time I jion into Div.1 !

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

Monogon problems so great so antontrygubO_o couldn't reject any of them! orz

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

Пересекается с открытием и пробным туром nerc(

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

All the best guys. I hope to reach pupil.

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

My 200th round is going to be monogon round.

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

Hope the questions stand up to my vote.

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

I think C will be much more difficult than B, as there is large point difference between B and C.

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

Can I have my upvote back ..

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

Good round and interesting problems time to upvote the blog and the tester's comment's ")

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

[deleted]

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

I'm going to become Specialist First time. :) what a feel !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :)

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

Nice problems. But was D really tougher than C?

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

why isn't there any stream after contest today? Isn't stream always there after a Div2 contest?

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

C and D were nice problems. Although I did find D easier than I thought.

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

Electricity gone contest start after 3 minutes and come back almost after 30 minutes but i stil come back of monogon sir contest. uuhhhhhhh

Thanks Monogon sir for the nice problem-set. ;-)

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

Maybe a silly question: why did D2 have empty lines between the inputs?

Even with the sample input, I think this should be clearly mentioned in the statement. Specially for interactive problems that are not as easily testable before submitting.

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

just about to submit D , Message pops out contest is over :(

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

I could not solve C. I solved A and B.

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

Can someone explain how the interactor script was written for problem B? This is the first time I encountered an "adaptive interactor". It will be interesting to know how exactly it works. BTW, cool problem, although it felt waaaaay easier than Problem A.

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

    The input to the interactor is described in the "Hack Format" section. It sees a list of colors that Alice plans to say in order.

    However, if at any point the interactor sees that Alice can win by saying the same color for the remaining turns, it will deviate from the list of colors and just win the game. Since this check is a bit expensive, it doesn't check for this case as often in larger grids.

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

In my opinion, I think D is easier than C

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

What "wrong output format Unexpected end of file — int32 expected" this warning means for my solution for problem D? My Submission: https://codeforces.me/contest/1504/submission/111928362

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

Need help in problem C. Apparently tried n number of test cases but it says WA on test 2 :(((( https://codeforces.me/contest/1504/submission/111936720 this is my link to submission. Please help me out.

Thank you

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

Can Anyone Explain me logic behind Problem-B?

I use the following approach but I don't understand where my code goes wrong???

Please Help...

                ll n;
		cin>>n;
		string s1,s2;
		cin>>s1>>s2;
		bool f=0;
		ll k=0;
		vector<int> v,xr;
		v.pb(-1);
		int z=0,o=0;
		int z1=0,o1=0;
		for(int i=0;i<n;i++)
		{
			if(s1[i]=='0')z++;
			else o++;
			if(z==o) v.pb(i);
			xr.pb((s1[i]-'0')^(s2[i]-'0'));
			k^=((s1[i]-'0')^(s2[i]-'0'));
			if(s2[i]=='0') z1++;
			else o1++;
		}
		// cout<<xr<<endl;
		// cout<<v<<endl;
		if(z1!=z or o1!=o) 
		{
			cout<<"NO\n";
			con;
		}
		bool b=0;
		for(int i=1;i<v.size();i++)
		{
			ll prv=xr[v[i-1]+1];
			for(int j=v[i-1]+1;j<=v[i];j++)
			{
				if(prv!=xr[j])
				{
					b=1;
					break;
				}
			}
			if(b) break;
		}
		if(b) cout<<"NO\n";
		else cout<<"YES\n";
»
5 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Worth upvoting!

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

Resubmited D because I had a simple test on which my solution wasn't OK, but it turns out that the testcases are weak.

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

To not keep you waiting, the ratings updated preliminarily. In a few hours, I will remove cheaters and update the ratings again!

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

Got the idea of D when there were still 30 minutes left, but failed to finish it because of ignoring the case of multiple runs needed. However, if I finished it, maybe I would see my code fail on the simplest n = 1 case in the system test...so Madamashi maybe :)

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

Can someOne Please explain ,why I'm getting WA :( 111939707

UPD: Got it :)

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

jhfuy

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

Weak system tests in D.

I took the following approach: assume $$$1,2,...,n$$$ appear in distinct cards. Sort the cards by $$$\min(a_i,b_i)$$$ and let $$$x_i=\max(a_i,b_i)$$$ in the sorted sequence. If $$$i \lt j$$$ and $$$x_i \lt x_j$$$, exactly one of $$$i$$$ and $$$j$$$ should be on the front. So, if the length of the LIS of $$$x$$$ is $$$\geq 3$$$, there is no solution. Otherwise, construct an undirected graph with edge $$$(i,j)$$$ iff $$$i \lt j$$$ and $$$x_i \lt x_j$$$. The resulting graph will be bipartite and we can decide the number of flips individually for each connected component.

This undirected graph can have $$$\Theta(n^2)$$$ edges in the following test case. (Assume n is an even number and m=n/2) (nuip told me about this case)

1 3m
2 3m-1
...
m 2m+1
m+1 4m
m+2 4m-1
...
2m 3m+1

My submission 111924355 did not consider this and made every edge so it should get TLE, but it passed system tests. To avoid this I should have used two segment trees to reduce the number of edges checked in the BFS. 111942077

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

include<bits/stdc++.h>

define int long long

define fi first

define sc second

define pii pair<int,int>

define vi vector

define mii map<int,int>

define msi map<string,int>

define si set

define all(v) v.begin(),v.end()

define sz(v) int((v).size())

define rep(i,a,b) for(int i=a;i<b;i++)

define dep(i,a,b) for(int i=a;i>=b;i--)

define isinarr(i,n) ((i>=0)?((i<n)?1:0):0)

define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);

define pb push_back

define ppb pop_back

define lb lower_bound

define ub upper_bound

define present(container, element) (container.find(element) != container.end()) //set,map etc.

define cpresent(container, element) (find(all(container),element) != container.end()) //vector

define hell 1000000007

define PI 3.14159265

define mp make_pair

define inparr(a,n) rep(i,0,n)cin>>a[i];

define strwspaces(s) getline(cin,s)

define give(x,y) cout<<x<<" "<<y<<endl;

define setp(n) cout<<fixed<<setprecision(n);

define endl '\n'

define inp(n) int n;cin>>n;

define inps(s) string s;cin>>s;

define setmem(inde,k) memset(inde,k,sizeof(inde))

define tr(a,m) for(auto a=m.begin();a!=m/end();a++)

using namespace std;

void solve() { int t;

cin>>t;
while(t--){
    int n;
    cin>>n; 
    string a,b;
    cin>>a>>b;
    bool check=0;
    int count0=0,count1=0;
    for(int i=0,j=0;i<n,j<n;i++,j++){
        if(a[i]!=b[j]){
          (a[i]=='0')?++count0:++count1;   
        }
        else if(a[i]==b[j] && count0!=count1){
        //    cout<<i<<" index";
       //    cout<<count0<<" "<<count1<<endl;
          check=1;
            break;
        }
        else{
            count0=0;
            count1=0;
        }
       //     cout<<"i="<<i<<" j="<<j<<endl;
         //   cout<<count0<<" "<<count1<<endl;
    }
    if(count1==count0){

           cout<<"YES"<<endl;
    }
    else{
        cout<<"NO"<<endl;
    }
}

}

signed main() { // fastio

solve();
return 0;

}

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

What is the approach for problem C?

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

for problem A: ans is NO when there's only 'a's in the string, otherwise maintain left half count(let say l) and right half count of 'a' (let say r). Then insert 'a' in the beginning if (l > r) else insert at last.

I am not able to find out the flaw in this logic. Can somebody point out please? :// My WA submission

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

Is C solvable if $$$c_i$$$ can be negative?

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

why java code for problem C(Balance the bits) is giving TLE on test case 3??? the same code in C++ is running fine

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

Can someone tell me what is Test 64 (Test case 2) in problem C.

Thanks

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

Editorial???

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

Can someone please check my code for problem D, why am I getting (wrong output format Unexpected end of file — int32 expected). https://codeforces.me/contest/1504/submission/111982923

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

no contest in coming two weeks ,why!!

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

say along with me , "Hail monoGon"

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

why is there such a long gap in constest now ??

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

I made a video for up solving the round ( div2 without F ) with Arabic commentary here

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

Can someone help me with Problem D Div 2? I am getting WA on test case 6. 111982213

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

Attention!

Your solution 111886576 for the problem 1504B significantly coincides with solutions NO-COMPETITION/111886576, thegreat_6459/111901841. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details. More information can be found at http://codeforces.me/blog/entry/8790. Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked. MikeMirzayanov recently i got a message from system I srsly dont know how my solution coincided with that person solution you can check submission times my submission is way too early than that guy submission its clearly a mistake

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

As a useful tester and loyal 1-gon supporter

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

Nut for a jar of tuna.