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:
- antontrygubO_o for accepting all of my problems at gunpoint
- Nika_Tamliani, arvindr9, dorijanlendvaj, I_Love_YrNameCouldBeHere, ssense, _cherry_, TheDramaQueen, Jellyman102, SecondThread, Kuroni, nor, 300iq, evilbuggy, prabhAmbrose, and kpw29 for testing the round and being awesome
- Qualified and FlakeLCR for being the first users to register for the Div. 2 and Div. 1 divisions, respectively!
- MikeMirzayanov for the amazing platforms Codeforces and Polygon!
- You, for upvoting!
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
As a useful tester, give me contribution!
As a useful tester and your amazing user activity profile, you deserve lot of contribution.
The meme has failed
The picture is broken
UPD: now it's good
UPD2: OK
As an ancestor of the "gon" family, I wish Monogon all the best for the round!!
Can you please tell me solution of problem A-C.
yeah, it's here ;)
I want to see what's at the link(not the solution), but I don't want to get rickrolled.
I will upvote only after seeing the problems in the contest :)
Well be ready to click that green button then :)
As a tester, this bit is getting old.
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.
As a useful tester and loyal Monogon supporter,
Reddit may have GME Stock, but we have Monogon's contribution! TO THE MOON, COMRADES!!!
https://www.youtube.com/watch?v=FsQPMmRhUGA
As a loyal SecondThread supporter, I upvoted Monogon. Have you?
i wonder if monogon can ever beat mike in contribution.
nice thought Rudraksh
I made a video on my YouTube channel to Upvote Monogon... :- I Helped Upvote Monogon
As a tester, Its my first round I have tested, so please give me contribution :)
so did you found this round interesting
I can confirm that the round was awesome, well written statements and well balanced and interesting round
But bro when I hover over your name on the testers list, it says "Useless Tester prabhAmbrose" :(
In that case, you missed the real hovering
The blog does not have the only other hover text on this page ;)
Hmm, in that case
As a tester, is anyone else tired of as a tester comments?
As a tester, yes.
Wow!!! First time seeing a dog testing round for humans ORZ!!!
PS: Why downvote if you don't know the context, Nika helping me hard to get upvotes :(
omg Monoannouncement! Will you reply to this comment :pleading_face:
omg
omg Monohere
Omg Satan here :P
Now Hire Him !
Mono too richey rich to hire me :(
I like your new profile pic Satan
.
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!
While we sleep, he spams F5
While we eat, he spams F5
While we solve problems, he spams F5
While we spam F5, he spams F5...
give him contribution already
Why do I feel like, I've been here before ?
Cause it's déjà vu!
as a future participant to this contest, i wish to everybody good luck!!1!! I hope you all get rating increase!1!!
thats what she says, haaa
I hope the deja vu plot isn't a part of April Fool's Day,lol!!
How to become tester?
Step 1. Don't be a coordinator.
Step 2. Become the Authors best friend.
Correction*
Step 2. Don't be an Author.
Step 3: Don't be a participant
Step 4: Comment "As a tester..."
Step 5: Stand at the gunpoint.
Can we please have orz for Monogon that sir Anton liked the set so much that not even a single problem is rejected. Monogorz
Read the whitespace is all I'll say
antontrygubO_o Surely he had a lot of choices
I would like to see a trend where every Monogon's blog's comments will have crazy high upvotes (even is it rated? comments).
Having a weird feeling that 712 has happened before :)
How to become a contestant?
Ping Monogon to create new problems
Step 1. Don't test
I'm happy to announce the theme of this round is déjà vu!
So there will be problem on recursion
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
Nice Catch :)
You'll solve C so fast that you become The Flash?
If it fails on FST, you will have new kind of head pain added to your list. (>..<)
Your profile picture makes it even funnier XD
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.
post pictures
.
Happy birthday!
.
Happy Birthday, my friend!
I am going to be green after this round. Give me Contribution.
My first CF round
First cf round ,that too of mongon. All the best.
Hope to solve at least one problem :)
do you guys noted this thing?
for those image is not loading : image
.
My life is a joke now. Didn't Expect hidden characters on Cf blog in my wildest of dreams. (>..<)
As a person I love the CodeForce community. Give me a contribution ..
How to be a useful tester
Step 1: Become a tester
step 2 :You should be atleast rated higher than monogon(1-gon)
Wrong answer
Step 2 : Convince sir Monogon to make u useful tester (at gunpoint)
Why is 3rd question 1250 in Div1 and 1750 in Div2? In score distribution
Because the authors would like it to be that (Or maybe not?) .
Great! I'm going to participate in this wonderful round((
I hope everyone here gets high rating!(at least higher than me)
[deleted]
1-gon orz
Really excited for the theme xD
As a useful tester, I am certain Monogon deserves to have more than $$$200$$$ total contribution for this round is just perfect.
Me trying my luck for the contribution giveways.
Will Déjà vu! theme challenge this equation?
Multiply both sides by 0
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>
the enthusiasm in this blog is on another level 0:)
Monogon + déjà vu == Unrated contest?
after a long leave , i' back,I will participate the contest,hope a nice problem,ovo~
Is it rated contest?
If you see a contest named 'Codeforces Round #...' , then it must be rated.
Sadly it is clashing with leetcode biweekly
Who cares about leetcode biweekly lmao
Monogon orz
Solid A I guess.
750 score is for div1A, not div2A.
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!!!!!!
https://youtu.be/Oqew3Y2CNqg 1-gon please reply if it's you ?? Thank you!!
https://m.youtube.com/watch?v=dQw4w9WgXcQ Monogon plrase reply is this you ??
please reply ??
yes that's me
I'm happy to know that the theme of this round is déjà vu!
So excited to know that the theme of this round is déjà vu!
USA is an actually a good country :D
I like problems selected by antontrygubO_o
The first time I jion into Div.1 !
Monogon problems so great so antontrygubO_o couldn't reject any of them! orz
I wonder how many notifications orz gets per day bcoz of unnecessary tags.
Пересекается с открытием и пробным туром nerc(
All the best guys. I hope to reach pupil.
My 200th round is going to be monogon round.
Hope the questions stand up to my vote.
I think C will be much more difficult than B, as there is large point difference between B and C.
Can I have my upvote back ..
Good round and interesting problems time to upvote the blog and the tester's comment's ")
[deleted]
how can you say this without giving the test !! Strange
deleted
.
the good test case is 'a' (test case 5)
I'm going to become Specialist First time. :) what a feel !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :)
Hurrrahhhhhhhhhhhhhhhhhhhhhhh.. And now I'm Specialist !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :)
Nice problems. But was D really tougher than C?
Quite easier than C
Maybe this is why I should read all problems... Got stuck on C for so long :(
I think it was placed there because it was interactive
Yes probably. But given that almost every second contest nowadays has an interactive problem, I think most people are comfortable with them and just being interactive shouldn't increase the problems difficulty.
The idea was easier for D, but D took me longer to code up because there were more places to be careful about edge cases. Besides, putting an interactive problem too early in the contest may ruin it for some people.
why isn't there any stream after contest today? Isn't stream always there after a Div2 contest?
Probably cuz there is a concurrent div 1 at the same time.
C and D were nice problems. Although I did find D easier than I thought.
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. ;-)
SIMP
unrated clever
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.
I think it's just a mistake in the sample input. My solution was accepted and didn't read or write any additional newlines.
I had a runtime error in my first submission (I suspect due to attempting to parse the empty line into an integer), so I am pretty sure the pretests did include the empty lines (as can be seen in the sample input).
Empty lines in sample exist to distinguish the order of input and output. Not a mistake.
Could you explain? What would happen if there were no empty lines in the input?
That input means 'After reading all input, then print all output, including empty line.'
Basically, if you match the sample output and sample input, you can see that it is a perfect fit.
Might be I might be missing something... Can you help where I've gone wrong. Submission-111933010
you can't have ios_sync_with_stdio(0) and the other 2 lines in an interactive problem. And also try '\n' instead of endl for printing. And also the complexity can be a problem, i am not sure if 1e8 operations (because you have O(n^4)) in an interactive problem are done in 3 seconds.
Not sure about all that, but my code with fastio, endl, and 1e8 operations passed the main test also.:)
Is your code guaranteed to print something on every round? Structurally it looks like if the "if" condition isn't met you don't publish anything, and attempt to read the next input while the checker is still waiting for your output for this round.
According to me it should print in each round, but there might be some cases which are not covered, that can be a reason..
You can add exit or print random words in those cases that should be unreachable, and see if that idleness error turns into wrong answer.
just about to submit D , Message pops out contest is over :(
Unlucky, you will get D in your next contest, I am sure :))
Thank you. And I just submitted My solution of D and it got accepted, Now it hurts even more :(
same here buddy!
i submitted after sys test and got ac.
Now it hurts even more :( (2)
I could not solve C. I solved A and B.
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.
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.
In my opinion, I think D is easier than C
What "wrong output format Unexpected end of file — int32 expected" this warning means for my solution for problem D? My Submission: https://mirror.codeforces.com/contest/1504/submission/111928362
Need help in problem C. Apparently tried n number of test cases but it says WA on test 2 :(((( https://mirror.codeforces.com/contest/1504/submission/111936720 this is my link to submission. Please help me out.
Thank you
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...
maybe you are not checking, whether the remaining strings are equal or not(after the last point where number of 1's equals number of 0's)
Worth upvoting!
Resubmited D because I had a simple test on which my solution wasn't OK, but it turns out that the testcases are weak.
To not keep you waiting, the ratings updated preliminarily. In a few hours, I will remove cheaters and update the ratings again!
Anyone got lower delta like me after removing cheaters? :)
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 :)
Can someOne Please explain ,why I'm getting WA :( 111939707
UPD: Got it :)
jhfuy
N must always be even, so the test you mentioned is invalid
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<j$$$ and $$$x_i<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<j$$$ and $$$x_i<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)
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
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;
}
signed main() { // fastio
}
Can you at least put the code under a spoiler or something?
What is the approach for problem C?
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
Check test case with
baaba
Why don't you just check if 'a'+s is a palindrome?
Is C solvable if $$$c_i$$$ can be negative?
I thought about it but could not find a solution except for the special case where they are all negative, which is similar to the all positive case. If someone solves the general version, I would be interested to hear it.
Yes. This harder version is almost identical to IOI 2016's Railroad.
why java code for problem C(Balance the bits) is giving TLE on test case 3??? the same code in C++ is running fine
Strings are immutable in Java, unlike C++, either use a StringBuilder or maybe a char array.
oh yesss! thanks
Can someone tell me what is Test 64 (Test case 2) in problem C.
Thanks
Can someone please check my code for problem D, why am I getting (wrong output format Unexpected end of file — int32 expected). https://mirror.codeforces.com/contest/1504/submission/111982923
no contest in coming two weeks ,why!!
Soon educational round will be added
say along with me , "Hail monoGon"
why is there such a long gap in constest now ??
I made a video for up solving the round ( div2 without F ) with Arabic commentary here
Can someone help me with Problem D Div 2? I am getting WA on test case 6. 111982213
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://mirror.codeforces.com/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
the code is literally exactly the same: 111901841 and 111886576
kwangg Yeah,i agree to that but sad part is in previous contest i got penalised and other person whose submission was late and i dont know how or why he changed language and submitted didnt get any penalty .Atleast,the person who submits first shouldnt be penalised.
As a useful tester and loyal 1-gon supporter
I don't think you were a tester but as a supporter I am obligated to upvote you.
Nut for a jar of tuna.