### SlavicG's blog

By SlavicG, 3 months ago,

Hello Codeforces!

mesanu, flamestorm, MikeMirzayanov and I are glad to invite you to Codeforces Round #835 (Div. 4)! It starts on Nov/21/2022 17:35 (Moscow time).

The format of the event will be identical to Div. 3 rounds:

• ICPC rules with a penalty of 10 minutes for an incorrect submission;
• 12-hour phase of open hacks after the end of the round (hacks do not give additional points)
• after the end of the open hacking phase, all solutions will be tested on the updated set of tests, and the ratings recalculated
• by default, only "trusted" participants are shown in the results table (but the rating will be recalculated for all with initial ratings less than 1400 or you are an unrated participant/newcomer).

We urge participants whose rating is 1400+ not to register new accounts for the purpose of narcissism but to take part unofficially. Please do not spoil the contest for the official participants.

Only trusted participants of the fourth division will be included in the official standings table. This is a forced measure for combating unsporting behavior. To qualify as a trusted participant of the fourth 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 1400 or higher in the rating.

Regardless of whether you are a trusted participant of the fourth division or not, if your rating is less than 1400 (or you are a newcomer/unrated), then the round will be rated for you.

We would like to thank:

We suggest reading all of the problems and hope you will find them interesting!

Good luck!

UPD: Editorial is posted.

• +149

 » 3 months ago, # |   +28 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
•  » » 3 months ago, # ^ |   +12 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
•  » » » 3 months ago, # ^ |   0 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
•  » » » » 3 months ago, # ^ |   0 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
•  » » » » » 3 months ago, # ^ |   -6 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
•  » » » » » » 3 months ago, # ^ |   -9 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
•  » » » » » » » 3 months ago, # ^ |   0 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
•  » » » » » » » » 3 months ago, # ^ |   -13 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
•  » » » » » » » » » 3 months ago, # ^ |   0 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
•  » » » » » » » » » 3 months ago, # ^ |   0 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
•  » » » » » » » » » 3 months ago, # ^ |   0 dude wtf...
•  » » » » » » » » » 3 months ago, # ^ |   0 114 spoilers later: where are them upvotes at?
•  » » » » » » » » » 2 months ago, # ^ |   0 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
•  » » » » » » » » » 2 months ago, # ^ |   0 As a maprticipant, I am asking myself: "When will ratings change?"
•  » » » » » 2 months ago, # ^ |   0 are u tester seriously??
•  » » » » » » 7 weeks ago, # ^ |   0 wtf is a tester??
•  » » » » 3 months ago, # ^ |   0 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
•  » » 3 months ago, # ^ |   0 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
•  » » 3 months ago, # ^ |   0 thank you down!!! any tips for a beginner which may help me thrive in cp ? appreciate your work
•  » » 2 months ago, # ^ |   0 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
 » 3 months ago, # |   +17 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
 » 3 months ago, # |   +26 As a tester, I am happy to represent my fellow newbies. The round has good and enjoyable problems. Good luck!
•  » » 3 months ago, # ^ |   +4 "As a tester, I am happy to represent my fellow newbies." don't believe him, he is a lgm in disguise.
•  » » » 2 months ago, # ^ |   0 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
 » 3 months ago, # |   +4 As I tester, I'm sure you'll find the problems fun and interesting. I wish good luck and positive delta to everyone!
 » 3 months ago, # |   +1 Shouldn't this blog be in the main page?
 » 3 months ago, # |   +4 Looking forward to my first unrated round ever!
•  » » 3 months ago, # ^ |   +15
•  » » » 3 months ago, # ^ |   0
 » 3 months ago, # | ← Rev. 2 →   -8 As a tester I did nothing like (some) other testers.
 » 3 months ago, # |   0 Thank the maker
 » 3 months ago, # |   0 SlavicG Orz
 » 3 months ago, # |   -21 ()
 » 3 months ago, # |   0 Congratulations once again for putting div.4 round on Monday.
 » 3 months ago, # |   0 omg div 4 , will try to score high
 » 3 months ago, # |   +22
•  » » 3 months ago, # ^ |   0 Better, stronger and faster.
•  » » » 3 months ago, # ^ |   0 Yes bro ;)
•  » » 3 months ago, # ^ |   0 oh no cringe
•  » » » 3 months ago, # ^ |   0 OKAY, it's just a meme
 » 3 months ago, # |   +5 Yayyy ! Won't miss my first unrated contest ^_^
•  » » 3 months ago, # ^ |   0 Same xD
•  » » » 3 months ago, # ^ |   0 Same xD
•  » » » » 3 months ago, # ^ |   0 Same xD
•  » » » » » 3 months ago, # ^ |   0 🗿
 » 3 months ago, # |   -27 It would be nice to finally fix language selector issue and remove excessive use of flags.Sources with supporting arguments: fix language selector blog post flags are not languages, www.flagsarenotlanguages.com Codeforces Language Picker -- chrome extension to see how fixed codeforces language picker would look like.Please support the initiative and stop reinforcing poor UX practices.
•  » » 3 months ago, # ^ |   +1 Stop farming downvotes
 » 3 months ago, # |   0 As a div4. I appreciate this round
 » 3 months ago, # |   0 I just became pupil. How can I become a specialist? Should I learn new things? Please advise me. I want to reach there quickly.
•  » » 3 months ago, # ^ |   0 Hey, i reached pupil yesterday aswell, to reach specialist our goal is simple get A,B,C done as fast as possible.Try to do D,if not upsolve it
•  » » » 3 months ago, # ^ |   0 By doing A B C fast you can reach 1500+ easily maybe expert aswell.
•  » » » » 3 months ago, # ^ |   0 in div 3 right? i don't think you can get specialist just by solving A B C fast on div 4
•  » » » » » 3 months ago, # ^ |   0 i was talking about div 2 mate
•  » » » » » » 2 months ago, # ^ |   0 lol
•  » » » » » » 2 months ago, # ^ |   0 LOL
•  » » » » » 2 months ago, # ^ |   0 in div 3 solving a,b,c wont make you even pupil.
•  » » 3 months ago, # ^ |   0 In order to get to Specialist, I suppose you've got to solve AB(C) in Div.2 / ABC(D) in Div.3 / ABCD(E) in Div.4. () means that if your speed is fast enough, the () problem can remain unsolved.
•  » » » 3 months ago, # ^ |   0 Thanks for the insight,hoping to reach expert soon
•  » » » 3 months ago, # ^ |   0 Can we really become Specialist,by just solving AB fast??? In less than 30 minutes or more fast?
•  » » » » 3 months ago, # ^ |   0 In 5 minutes or something
 » 3 months ago, # |   0 good luck to everyone, I wish you to score a lot of points in this round :)
 » 3 months ago, # |   0 pov: in the comments memes about specialists
 » 3 months ago, # |   +1 omg cyan round
•  » » 3 months ago, # ^ |   0 omg blue circle
 » 3 months ago, # |   0 Best of Luck everyone hope many pupils become specialist today and newbies can also change their color.
 » 3 months ago, # |   0 OMG Green Round
 » 3 months ago, # |   0 I'm really looking forward to this game, it's going to be an interesting game
 » 3 months ago, # |   0 Good luck everyone!
•  » » 3 months ago, # ^ |   +1 Good Luck to you!
 » 3 months ago, # |   0 The funny thing that nobody pointed out is that all the testers are at least expert level. However, it does not have to mean that the problem difficulty was poorly judged, especially because many of the testers and setters are experienced in setting/testing rounds.
 » 3 months ago, # |   +1 As a Arch Linux user, how do I exit vim I am still in it since the Div. 3
•  » » 3 months ago, # ^ |   -10 :wq
•  » » » 3 months ago, # ^ |   0 or even easier: :x
•  » » 2 months ago, # ^ |   0 Well it's easy tbh, you just need to power off your PC. But its time to switch to neovim.
•  » » » 2 months ago, # ^ |   0 can somebody tell me, i am rated less than 1400, still why was the contest unrated for me?
•  » » » » 2 months ago, # ^ |   0 It's rated for u ....the rating haven't updated yet ..
•  » » » » » 2 months ago, # ^ |   0 Yes I can see the contest in unrated category in my profile even though I have 1007 rating but no rating changes till now, can someone explain this...?
•  » » » » » » 2 months ago, # ^ |   0 Patience is the key.
 » 3 months ago, # |   0 good luck guys <3
•  » » 3 months ago, # ^ |   0 shut up negra boy
•  » » » 3 months ago, # ^ |   0 You used "shut up" in every comment you have written. Be original, please.
•  » » » » 2 months ago, # ^ |   0 i-im so sorry WiseMythicalTree-chan~~ UwU
 » 3 months ago, # |   0 Good luck everyone ;)
•  » » 3 months ago, # ^ |   0 especially fools
 » 3 months ago, # |   -8 Best wishes for all.
 » 3 months ago, # |   0 I hope this is a round worth calling a Div 4 round.
 » 3 months ago, # |   0 it's my first round! hope it will be good and i will solve at least 4 problems ♥♥♥
 » 3 months ago, # | ← Rev. 2 →   0 aaaaaaaaaa
 » 3 months ago, # |   0 All the best everyone.
 » 3 months ago, # |   0 aw. I got so happy when i saw the "5 rated rounds" thing, but then i saw "one problem each".
 » 3 months ago, # |   -16 leetcode monthly contest fun
•  » » 2 months ago, # ^ |   -19 why downvote me??????????? wuwuwuwuwuwuwuwuwuwu T_T_T_T_T_T_T
 » 3 months ago, # |   0 solved 3 problems!!!
•  » » 3 months ago, # ^ |   +2 if you stay focused and don't waste time on looking at comments, you can probably solve even more
•  » » 2 months ago, # ^ |   0 did u get your ratings?
•  » » » 2 months ago, # ^ |   0 not yet??
•  » » » » 2 months ago, # ^ |   0 yeah i didnt do u know why is it so
•  » » » 2 months ago, # ^ |   0 My ratings were rolled back.I only get my last div.3 contests rating(Idk why they rolled our ratings)
 » 3 months ago, # |   0 SpeedForces
•  » » 3 months ago, # ^ |   0 manforces :)
 » 3 months ago, # |   0 I learned that solving from last to first is a very bad idea.
 » 3 months ago, # |   0 Nice Contest. Enjoyed solving the problems.
 » 3 months ago, # |   0 Can someone please tell for which test case my code for E is failing? https://codeforces.com/contest/1760/submission/182026503
•  » » 3 months ago, # ^ | ← Rev. 2 →   0 1 2 1 90 and 2 are valleys so the answer is "no", but your code says "yes".
 » 3 months ago, # |   0 Can someone please tell for which test case my code for D is failing? https://codeforces.com/contest/1760/submission/181970514
•  » » 2 months ago, # ^ |   0 19th token in second test case. Look at the 19th test case
•  » » 2 months ago, # ^ | ← Rev. 3 →   +1 Test case162, 2, 2, 7, 10, 4 OutputYES AnswerNOActually, before printing "YES", you again have to check whether $c>0$ or not. And also before the last for loop, change the conditions (if(v[1]>v[0]) --> if(v1[1]>v1[0])) and (if(v[n-1] if(v1[n1-1]
 » 3 months ago, # | ← Rev. 3 →   -14 This was my solution While submitting problem D, I was getting the right answer in my IDE as well as an online compiler, but wrong in code forces. Can anyone please look into this problem? MikeMirzayanov SecondThread Um_nik Olympia mesanu
•  » » 3 months ago, # ^ |   0 Code outputs different things based on the used compiler in your case. G++ 17 msys 2 works correctly on a test case, which I can't say for the other compilers. It may be great to run code in the launch tab right in the codeforces
•  » » » 3 months ago, # ^ |   0 thanks man
 » 3 months ago, # |   0 how to solve D? plz someone tell me.
•  » » 3 months ago, # ^ |   0 Hint: Think what happens when l=r ?;
•  » » 3 months ago, # ^ | ← Rev. 2 →   0 Hint:Draw i vs a[i] graph in 2d coordinate system and observe
•  » » 3 months ago, # ^ |   0 First think how would you detect a valley of length $0$ (i.e. $l == r$), by length $1$.Find an $i$ such that $a[i] < a[i-1]$ and $a[i] < a[i+1]$.Now you just have to think how can you turn a portion whose $a[i] = a[i+1]$ to something mentioned above.
 » 3 months ago, # |   0 What's wrong in my submission for E? Lots of people got testcase 7 WA too
•  » » 3 months ago, # ^ |   0 use long instead of int
•  » » » 3 months ago, # ^ |   0 Thanks
•  » » 2 months ago, # ^ |   0 int overflow. Convert your int to long long & get AC
•  » » » 2 months ago, # ^ |   0 is this round unrated for everyone?
•  » » » » 2 months ago, # ^ |   -10 No. Only rated for those, Who's rating below 1400.
 » 3 months ago, # |   0 Hope to become pupil this time.
 » 3 months ago, # |   0 Sample tests were really bad for E and G!
•  » » 3 months ago, # ^ |   0 I thought they were fine for E (I didn't attempt G). The only thing off the top of my head that wasn't tested for was using longs instead of int for the inversion count, but that is something that can be figured out. If you consider the amount of max amount of inversions of a binary array at any given time, it is 10^5 * 10^5 (10^5 1s and 10^5 0s). This gives us 10^10, which does not fit in an integer.That being said, I did not do it the first time, and it did stump me for a while. Thought it was fair enough though.
•  » » 2 months ago, # ^ |   0 Well, tests for G also seem to have sucked. Got TLE on system tests. Changed unordered_set to set and it got accepted. Welcome to cf I guess.
•  » » » 2 months ago, # ^ |   +11 You have exposed yourself to danger by using unordered_set. During the hacking stage in div3/div4/edu codeforces contests, such solutions are specifically targeted by hackers. See the https://codeforces.com/blog/entry/62393 blog for more details. Even if your solution wasn't hacked directly, all successful hacks become a part of the system test and still ruin your day.Python users are also in danger for exactly the same reason, see the https://codeforces.com/blog/entry/101817 blog. This made solutions like 182003822 vulnerable.
•  » » » » 2 months ago, # ^ |   0 So do you mean no one should use hash maps on cf because there will always be someone who can hack your solution and make the hash operations O(N) instead of O(1)?
•  » » » » » 2 months ago, # ^ |   0 You can use hash maps wherever they meet your needs. But you have to ensure that there is little to no possibility of constructing custom input data by abusing the hashing function, provided that an attacker knows it.Personally, I would not rely on out-of-the-box usage of unordered_map even at Div.1/Div.2 contests. Hash map hacks did happen there as well.
 » 3 months ago, # |   0 I'd really appreciate if someone could help me with the logic for F. My approach-> If we can't collect the coins when k = 0, answer is Impossible-> If any of the A[i] >= C, answer is Infinity-> Other than that, we can binary search on the possible kAm I somewhat close to the solution, or my approach is completely far off?
•  » » 3 months ago, # ^ |   0 This is exactly what I did, but I failed at test case 2. I do think this is one of the intended solutions however, it does seem like a very classic binary search problem.
•  » » 3 months ago, # ^ |   0 if days are 5 and coins =10 array = 1 2 3 4 , answer should be infinte while you will not give infinite.
•  » » 3 months ago, # ^ |   0 The answer can also be infinity : when the sum of a[i] over min(days,n) >= C
•  » » » 3 months ago, # ^ |   0 Oh, I get it now. I completely missed it.
•  » » 3 months ago, # ^ |   0 I think answer is Infinity if sum of min(n, d) greatest A[i] >= C since we still can do different tasks
•  » » 3 months ago, # ^ | ← Rev. 2 →   0 That is the exact approach I used.Hint: You can test if it's possible with a certain $k$ in $O(1)$ if you precompute some things.EDIT: Actually, for your second observation, it would be the sum of the $min(n,d)$ largest coins.
•  » » 3 months ago, # ^ |   0 Problem in your second condition, its not necessary that a single element should be >= c then the ans in infinity, for example the following case — 2 4 2 1 3The ans is infinity :)
 » 3 months ago, # |   0 D took more time to solve than solving E. I almost cross-checked by taking every valid test case but still got the first 3 WA in D but ac in E on the first try.
 » 3 months ago, # |   0 Can anyone help me with my submission for 1760G - SlavicG's Favorite Problem : 182028374.
•  » » 2 months ago, # ^ |   0 Take a look at Ticket 16547 from CF Stress for a counter example.
•  » » » 2 months ago, # ^ |   0 Thank you.
 » 3 months ago, # |   0 can someone share the idea and intuition behind G?
•  » » 3 months ago, # ^ |   0 One important property of XOR is that a^a = 0. So if you do two BFS, one rooted at A and one rooted at B, you can find nodes in the A BFS and B BFS where the XOR value is equal, so you can teleport from one path to another and reach B with XOR of 0. If this exists (there are some edge cases to consider), then it is possible.
•  » » » 3 months ago, # ^ |   0 oh thanks alot. sorry i have another question is applying dfs with the same concept you mentioned should fail? because i tried to do this using two dfs but it failled in test2 or its just an implementation issue?
•  » » » » 3 months ago, # ^ |   0 I think you forgot this case: You should not consider the vertices in A's DFS/BFS where B coincides with the (unique) simple path starting from A.
•  » » » » » 3 months ago, # ^ |   0 ok got it thanks alot
•  » » » » 3 months ago, # ^ |   0 Try this testcase (It's possible to teleport from node 1 to node 2. And then go '2 -> 3 -> 4', so the answer is YES):1 4 1 4 1 2 128 2 3 256 3 4 256 
 » 3 months ago, # |   0 solved all problems in div4 for the 2nd time. feels amazing.
 » 3 months ago, # |   0 What's the 53rd case of second test case in G?
•  » » 3 months ago, # ^ |   +1 It's about the fact that we can teleport from a too. That means if there exist any (prefix xor starting from b) == 0 then also answer is True.
 » 3 months ago, # | ← Rev. 2 →   0 can one explain why in D 10 10 8 10 10 4output NO ?
•  » » 3 months ago, # ^ |   0 because it has more than 1 valley. one at value 8 and another at value 4.
•  » » 3 months ago, # ^ |   0 Because there are $2$ valleys.For the first one $l = 2$ $and$ $r = 2$ and for the second one $l = 5$ $and$ $r = 5$
•  » » 3 months ago, # ^ | ← Rev. 2 →   0 you have 2 subarrays that satisfy the condition. (2, 2) and (5 , 5)
•  » » 3 months ago, # ^ |   0 thx
 » 3 months ago, # |   0 Did any1 else mess up F for the infinity case?
•  » » 3 months ago, # ^ |   0 yup
•  » » » 3 months ago, # ^ |   0 Lmao. I just checked if biggest element was enough instead of the biggest d-elements, or just all if d is big.
 » 3 months ago, # |   0 My solution (as following) gives wrong answer 2653rd numbers differ - expected: '4', found: '3' for 1760E — Binary Inversions.Can anyone help me with testcases that gives wrong answer on test 2. public void solve() { int n = in.nextInt(); int[] a = new int[n]; int tcount_0 = 0; for (int i = 0; i < n; i++) { a[i] = in.nextInt(); if (a[i] == 0) tcount_0++; } long inversions = 0, count_0 = 0; for (int i = 0; i < n; i++) { if (a[i] == 0) count_0++; else inversions += tcount_0 - count_0; } long ans = Long.MIN_VALUE; long count_1 = count_0 = 0; for (int i = 0; i < n; i++) { if (a[i] == 0) { count_0++; ans = Math.max(ans, tcount_0 - count_0 - count_1); } else { ans = Math.max(ans, count_1 - tcount_0 + count_0); count_1++; } } out.println(inversions + ans); } 
•  » » 3 months ago, # ^ |   +5 check once with input "10". I think you need to initialize with ans=0.
•  » » » 3 months ago, # ^ | ← Rev. 2 →   0 Yes, you got this. It passed now. Thank You!!
 » 3 months ago, # |   0 Tasks seemed very ROI
 » 3 months ago, # |   0 My rating is 1400 and my standings show that this contest is rated for me. So, I am a little bit confused that will my rating will change or not ...
•  » » 3 months ago, # ^ |   0 :)
 » 3 months ago, # | ← Rev. 2 →   +2 t seemed like mimemamomu warmuping
 » 3 months ago, # |   0 How to solve F?
•  » » 2 months ago, # ^ |   0 Binary Search on Answer(value of k)
 » 2 months ago, # |   0 TBH CodeForces comment section is quite addictive :p
 » 2 months ago, # |   0 Can anyone help in problem G? I'm getting MLE. My SolutionApproach: Starting bfs from 'a' and calculating zor as i move and checking if zor becomes equal to any edge weight that is adjacent to 'b'(so that i will teleport from here).
•  » » 2 months ago, # ^ |   0 There are too many statements during bfs. You can save the weight of not only the adjacent edge but from any point to "b", so that the amount of statement will be small.
 » 2 months ago, # |   +7 Apologies if this isn't the correct place to raise suspicions, I'm new here and couldn't figure out how to report users.There is something weird I noticed about this user — https://codeforces.com/submissions/9999999999/contest/1760You can see him making multiple submissions specifically designed to be hacked if there is a single testcase (on the first and trivial problem). He does it by hardcoding wrong input when there is only 1 test case like so: if(t==1) cout<<"500949585450"<
 » 2 months ago, # |   -17 gimme downvotes pls
 » 2 months ago, # |   +30 So, I promise that as soon as I become pupil, I will try to give my perspective of how I make my solutions, I don't think that my code is worth but maybe my perspective can give you help in the future. AThis one is the easiest, but I think that always that you read that you must give a number that is not the minimum or maximum of a list, you must think in make a vector, sort and print the position that you are interested. Like for example the second minimum would be a[1] or the second maximum a[n-2]. #include using namespace std; /* */ int gcd(int a,int b) { if(b==0) return a; else return gcd(b,a%b); } int lcm(int a,int b) { return (a*b)/gcd(a,b); } void solve(){ vector a(3); for(auto &x : a){cin >> x;} sort(a.begin(),a.end()); cout << a[1] << '\n'; } int main(){ ios::sync_with_stdio(0); cin.tie(0); //cout.precision(10); int t = 0; cin >> t; for(int p = 0; p < t;p++){ solve(); } }  BThe important thought that you must find is that if the maximum letter is 'a' you only need one and 'z' you need 26 and with only make in your mind the solution of two case you began to see what you need to do, I was a little nervous when I was writing the code and was thinking what is better if sort the string and see the last letter or used the function max_element, when you have dudes but you know that the code that you are in the middle of writing will work too, is best to commit to what you are writing in the moment that change to another solution in my experience. This work good in first or second problem for me because the solutions that you think probably will be right because they try to make easy for beginners like me, this is my way to be faster.Another useful type for the problems that want you to make a letter a number is remember that 'a'-'a' is 0 or a character minus the same character will return 0. #include using namespace std; /* */ int gcd(int a,int b) { if(b==0) return a; else return gcd(b,a%b); } int lcm(int a,int b) { return (a*b)/gcd(a,b); } void solve(){ int n; cin >> n; string s; cin >> s; sort(s.begin(),s.end()); cout << s[n-1] - 'a' + 1 << '\n'; } int main(){ ios::sync_with_stdio(0); cin.tie(0); //cout.precision(10); int t = 0; cin >> t; for(int p = 0; p < t;p++){ solve(); } }  CHere strike again the idea that we see in the problem A, in this problem you only care about the maximum and the second maximum so you make a vector, sort and use a[n-1] when the value x is not the maximum and a[n-2] if x is equal to the maximum, but I used a different method of only stored the two maximum numbers in a vector because I think a better version before beginning to write. #include using namespace std; /* */ int gcd(int a,int b) { if(b==0) return a; else return gcd(b,a%b); } int lcm(int a,int b) { return (a*b)/gcd(a,b); } void solve(){ int n; cin >> n; vector a(n); vector b(2); for(auto &x : a){cin >> x; if(b[1] < x){ b[0] = b[1]; b[1] = x; } else if(b[1] == x){ b[0] = b[1]; } else if(b[0] < x){ b[0] = x; } } for(auto x : a){ if(x != b[1]){ cout << x - b[1] << " "; } else{ cout << x - b[0] << " "; } } cout << '\n'; } int main(){ ios::sync_with_stdio(0); cin.tie(0); //cout.precision(10); int t = 0; cin >> t; for(int p = 0; p < t;p++){ solve(); } }  DIs curious because I have come across this kind of problems many times that they want you to search there is a "Valley" or a "Peak" in the vector I still don't have a good way of approach this kind, but they always give you the conditions that must meet so the idea is always searching in a for if the condition is meet and see what are the corners case.In this case you want to focus in every point because you can make L=R, the segments with same numbers but for example if you have a segment equal to {3,3,3,3} you don't want to waste your time with {3},{3,3},{3,3,3} because they will contradict the condition a[l−1]>a[l] or a[r] < a[r+1] other that this is good to keep in mind that l=0 or r = n-1 are free passes. #include using namespace std; /* */ int gcd(int a,int b) { if(b==0) return a; else return gcd(b,a%b); } int lcm(int a,int b) { return (a*b)/gcd(a,b); } void solve(){ int n; cin >> n; int i = 1; int l = 0; vector a(n); cin >> a[0]; int h = a[0]; int ans = 0; int cnt = 1; for(i;i < n;i++){ int x; cin >> a[i]; x = a[i]; if(x != h){ // cout << l << " " << i << " "; if(l == 0){ if(a[i-1] < a[i]){ans++;} } else if(a[l-1] > a[l]){ if(a[i-1] < a[i]){ans++;} } // cout << ans << '\n'; l = i; h = x; } } // cout << ans << " "; if(n == 1){ cout << "YES\n"; return; } if(a[n-1] == a[n-2]){ if(l == 0){ans++;} else if(a[l-1] > a[l]){ans++;} } else{ if(a[n-2] > a[n-1]){ans++;} } // cout << ans << " "; ans == 1 ? cout << "YES\n" : cout << "NO\n"; } int main(){ ios::sync_with_stdio(0); cin.tie(0); //cout.precision(10); int t = 0; cin >> t; for(int p = 0; p < t;p++){ solve(); } }  Ethis one is just in my reach of knowledge so when I find problems that seem difficult at the beginning, I always try to see what type of input I can solve and corner case to corner case I will build my solution. The first one is what happen if n == 1? in this case no matter why I do the answer will be 0 what happen if there are only ones? then the best is to make the last number a 0 and the answer will be n-1 if there are only zeros? make the first number a 1 and the answer will be n-1 Now it's apparent that the best is to make the last one a zero or the first one converted to one and see how much we gain or lost for each operation and after seeing if it is good to make a change, go for all the vector and every see how much it will give to the answer. Another tip is to use comments when you feel that you are confused about what you have done and what not.If you see my code is very inefficient but show that divide the problem in easy problems help you to see a solution. #include using namespace std; /* */ int gcd(int a,int b) { if(b==0) return a; else return gcd(b,a%b); } int lcm(int a,int b) { return (a*b)/gcd(a,b); } void solve(){ int n; cin >> n; vector a(n); vector pos; long long tots = 0; int i = 1; int fz = -1; int posz = 0; for(auto &x : a){ cin >> x; if(x == 1){pos.push_back(i);} if(x == 0 && fz == -1){fz = i;posz = i-1;} i++; } int n1 = pos.size(); int cntz = n-n1; if(n == 1){cout << "0\n";return;} if(n1 == 0 || fz == -1 || cntz == 0){ cout << n-1 << '\n';return; } int val1 = cntz-1-posz;// first z to 1 int val2 = (n1-1)-(n-pos.back());//last 1 to z // cout << val1 << " " << val2 << '\n'; if(val1 > val2){ a[posz] = 1; cntz--; } else if(val2 > 0){ a[pos.back()-1] = 0; cntz++; } for(int i = 0;i < n;i++){ if(a[i] == 0){cntz--;} else{ tots += cntz; } } cout << tots << '\n'; } int main(){ ios::sync_with_stdio(0); cin.tie(0); //cout.precision(10); int t = 0; cin >> t; for(int p = 0; p < t;p++){ solve(); } } I hope that was helpful this in some way, sorry if was not as good as you expect, when I became a better, I will make up for these bad tutorials.
•  » » 2 months ago, # ^ |   0 thank you very much
•  » » 2 months ago, # ^ | ← Rev. 5 →   +25 It's not a bad tutorial. For some formatting tips I would recommend enclosing variables in dollar signs to get the mathematical look of $x$. You can use a_{x}for $a_x$ and a^{x} for $a^{x}$. This is called latex and its quite commonly used in math. You should also use links for your codes instead of pasting them.For the solution themselves, you can use some advanced implementation tricks to make the code really simple and bug proof. For problem D for example, we see 2 phases. decreasing, then increasing.So we can define a phase function like vector a(n); ... auto walk_while_decreasing = [&](int start){ while(start + 1 < n && a[start] >= a[start + 1]) ++start; return start; //Similarly for increasing }; int reach = walk_while_increasing(walk_while_decreasing(0)); if(reach == n - 1) //the array consists of these 2 phases else // it doesn't You could also get the exact values of $l$ and $r$ using the intermediate values of this calculation.For problem E you need to only consider the change of inversion. This is the same as number of pairs $(i, j)$ such that $i < j$ and $a_i = 1$ and $a_j = 0$. If we consider what happens when we change a $0$ at index $x$ to a $1$ for example, we get more inversions from the $0$s to the right of $x$, and less inversions from the $1$s to the left of $x$. Therefore the best $0$ to flip would be on the left. But this also allows you to calculate the change in inversions from changing any index $x$.
 » 2 months ago, # |   0 Am I the only weirdo who used segment tree to solve C?
•  » » 2 months ago, # ^ |   0 How did you do it?
•  » » » 2 months ago, # ^ |   0 How do we easily calculate the maximum of all array elements excluding the i-th element? It's possible to just do two range queries in a segment tree (the array part before the i-th element and the array part after the i-th element) and use the largest of these two results. In submission 181925712 I have only written the "main" function. Everything else is a copy of the segment tree implementation from the atcoder library.
•  » » » » 2 months ago, # ^ |   0 Nice idea lol
•  » » » » » 2 months ago, # ^ |   0 Well, I just wanted to save time instead of inventing some original solution for this particular problem (and then proving that it correctly handles all corner cases). I'm not a particularly fast problem solver and taking care of A+B+C took me 13 minutes. Without segment tree this time could be even worse.Your solution uses sort and you have beaten me by solving A+B+C in only 5 minutes. But now imagine not having sort function in the standard library. In this case you would need to find some decent bug free $O(N log N)$ sort implementation and copy/paste it as a part of your solution. Implementing your own sort from scratch during the contest would be a fool's errand and waste of time. Segment tree is pretty much the same and the only difference is that it is typically not provided in standard libraries of programming languages, so I need to copy/paste the atcoder's implementation.My $O(N log N)$ segment tree solution implemented in D language can be even tweaked to remove all loops and branches 182184534 (except for the main loop iterating over testcases) and this reduces cyclomatic complexity. For comparison, a faster Wanderkind's $O(N)$ solution 182072909 also implemented in D language is more complicated. But both are fast enough and coding speed/convenience is IMHO more important during a contest.
•  » » » » » » 2 months ago, # ^ |   0 I agree with you on that. But most programming languages already have sort function. I personally read the problem quickly and the sample explanations and coded it. I know that I can't solve a lot of problems so I depend on speed instead. The problem doesn't really need proving but if you're looking for special cases and a full proven solution then yes Segment Tree was much better
•  » » » » » » 2 months ago, # ^ |   0 Is there a reason you didn't use the sort function in std.algorithm?I didn't because I am new to this language and I am not yet familiar with handling arrays.
•  » » » » » » » 2 months ago, # ^ |   0 Because segment tree just happened to be my first idea after reading the problem statement. But I used sort for solving problems A and F.
•  » » » » » » 2 months ago, # ^ |   0 I imagine not having sort and finding first and second maximums
•  » » » » » » » 2 months ago, # ^ |   0 This was exactly the point of my comment. Both sort and segment tree are not necessary for solving this problem. They both actually degrade time complexity. But they both are also easy to use and save time (tourist used sort 181903982 and the editorial suggests sort too). Sort is included in the standard library, while segment tree has to be copy/pasted.
 » 2 months ago, # | ← Rev. 2 →   0 For E, missed test case 7, just changed int to long after the contest, it got passed.
•  » » 2 months ago, # ^ | ← Rev. 2 →   +2 Rule 1 : No matter what, always use long intRule 2 : Always follow Rule 1.
•  » » » 2 months ago, # ^ |   +1 Or long long
•  » » » » 2 months ago, # ^ |   0 Ah yes, long long.
•  » » » 2 months ago, # ^ |   0 Rule 3: sometimes memory limit might be tight and you'll need to use int
•  » » » » 2 months ago, # ^ |   +1 Yet to encounter such problems. Thanks in advance, will remember this.
•  » » » » » 2 months ago, # ^ | ← Rev. 2 →   0 Rule 4:There can be more rules.
 » 2 months ago, # |   +22 My solutions (video):A. Medium Number SolutionThere are many ways to do this. I simply output $a + b + c - \max(a, b, c) - \min(a, b, c)$.B. Atilla's Favorite Problem SolutionThe answer is the letter with the largest position in the alphabet.C. Advantage SolutionIf we are the strongest person, the strongest opponent is the second strongest person. If we are not the strongest person, the strongest opponent is the strongest person. Store the strongest and second strongest opponent in two variables to compute the answer in linear time.D. Challenging Valleys SolutionPlay around with examples to find that the array must consist of a non-increasing segment followed by a non-decreasing segment. Anything else will create at least two valleys. So make sure there are no occurrences of $a_ia_{i+1}$.E. Binary Inversions SolutionFor each zero, the number of inversions containing that zero is the number of ones before the zero. So keep a running total of the number of ones to quickly compute the number of inversions of $a$ initially. Consider flipping each element. If we flip a zero, the number of inversions will increase by the number of zeroes after, and decrease by the number of ones before. If we flip a one, the number of inversions will decrease by the number of zeroes after, and increase by the number of ones before. Take the maximum possible increase, which is at least 0 if we do nothing, then add this to the number of inversions initially.F. Quests SolutionThe maximum number of coins we can get decreases or stays the same whenever $k$ increases. So binary search for $k$. The maximum number of coins can be made by choosing the $k+1$ greatest elements in decreasing order in cycles until $d$ days have passed.For example if $a = [1, 2, 3, 10, 5, 4, 3]$, $k = 5$, and $d = 16$, we choose $10, 5, 4, 3, 3, 2| 10, 5, 4, 3, 3, 2| 10, 5, 4, 3$. I put a bar where our selections start repeating.We can quickly compute the most coins we make by sorting $a$ in decreasing order then making a prefix sum array. Take the $k+1$th element in our prefix sum array, multiply it by the number of times we can fully cycle through our $k+1$ elements, then add the sum of our remaining incomplete cycle.G. SlavicG's Favorite Problem SolutionIf we revisit a vertex, the walk starting and ending from the revisited vertex must've crossed each edge an even number of times, because each edge in a tree is a cut-edge. So there's no point of revisiting a vertex, and a potential solution will consist of walking from $a$ to $c$ (without crossing $b$), teleporting to $d$, then walking from $d$ to $b$. The case where we don't teleport can be treated as teleporting from $c$ to $c$.The xor of the edges of the paths from $a$ to $c$ combined with the edges of the path from $d$ to $b$ must be $0$. So the xor of the path from $a$ to $c$ is equal to the xor of the path from $d$ to $b$. Using depth-first search, compute the xor going from $a$ to each vertex, and the xor going from $b$ to each vertex, and see if any two xor values match. Remember that $a=c$ is forbidden and when you start your depth-first search from $a$, don't go into $b$.
•  » » 2 months ago, # ^ |   0 aaron can you also do a virtual participation for .... CodeTON Round 3 (Div. 1 + Div. 2, Rated, Prizes!) when you're free .
 » 2 months ago, # |   +2 problem G： Your task is to go from vertex a to vertex b, but you are allowed to enter node b if and only if after traveling to it, the value of x will become 0.Why use "enter" instead of "arrive at" explaining the statement? I misunderstood when solving this problem and wasted 1 hour!
 » 2 months ago, # |   0 good luck to everyone!!!
•  » » 2 months ago, # ^ |   0 thenk you Jaxongir1
 » 2 months ago, # |   0 What does ios::sync_with_stdio(0); cin.tie(0); these 2 lines mean?
•  » » 2 months ago, # ^ | ← Rev. 4 →   +3 ios_base::sync_with_stdio(0); this code is used to make synchronization false. Because synchronization is initially true. And synchronization allows multiple objects to use a common resource (for example, Methods). cin.tie(0); tie(0) is a method which simply flushes before std::cin accepts an input. This is useful for interactive console programs which require the console to be updated constantly but also slows down the program for large input/output. Source: https://en.cppreference.com/w/cpp/io/ios_base/sync_with_stdio https://stackoverflow.com/questions/31162367/significance-of-ios-basesync-with-stdiofalse-cin-tienull
 » 2 months ago, # |   +1 is there any source apart from codeforces so that people from India and China communicate?
•  » » 2 months ago, # ^ |   0 Phones..XD!
•  » » » 2 months ago, # ^ |   0 how you can do that?
 » 2 months ago, # |   +8 Can someone give a test case for which my code for D is failing? https://codeforces.com/contest/1760/submission/182044338
•  » » 2 months ago, # ^ |   +15 Check this out: 1 6 2 2 3 3 2 2 The answer is obviously NO, whereas your algorithm prints YES. Seems like an issue with dealing with consecutive equal elements.
 » 2 months ago, # | ← Rev. 3 →   0 History repeats itself. Four hacking attempts (all are of the same submission) are now stuck either in "Waiting" or "In queue" state. MikeMirzayanov, can we do something about this?UPD: still in queue after the final testing. Déjà vu...
•  » » 2 months ago, # ^ | ← Rev. 3 →   -13 Ok cool
•  » » » 2 months ago, # ^ |   +11 Bro, why have you decided to use unordered_set, which has $O(N)$ worst case time complexity? It's like you made a special effort to be hacked.
•  » » » » 2 months ago, # ^ |   -8 Ohh.. is that why my solution got hacked? Damn, I thought they have O(1) in all cases. Well, according to the approach I have used what would have been a more preferred data structure ?
•  » » » » » 2 months ago, # ^ |   0 set would perfectly do it. Or even simpler: we may just sort all hashes and binary search over them.
•  » » » » » » 2 months ago, # ^ |   +11 I would argue that sort and binary search isn't simpler. This requires a bit more code to be written and there is a bit higher chance to mess it up.
 » 2 months ago, # |   +8 BTW what's a counterexample for binary inversions if I only flip either the first 0 bit, last 1 bit, or none?
•  » » 2 months ago, # ^ |   +8 there is none. thats the solution
 » 2 months ago, # | ← Rev. 2 →   0 181974444 ,181992465 are two submission for C.Advantage. second one got Ac but after some hours it show submission in queue.
•  » » 2 months ago, # ^ |   0 they retest on all hidden test cases plus other cases provided during hacking phase.
 » 2 months ago, # |   0 Hi everybody! How can i register for the competition?
•  » » 2 months ago, # ^ |   0 Go to https://codeforces.com/contests and you will find the list of future contests accepting registration.
 » 2 months ago, # | ← Rev. 2 →   0 After 4 long hours, the system testing finally finished. Maybe MikeMirzayanov should reset something like he's done before. The minor issue (for some people) is waiting to know whether they'll pass the system tests, and major being people not being able to submit in practice for that round as long as the testing is going on. I'm aware that it's a div. 4 round and there are lots more submissions to judge, especially after the hacks get added in the 12-hour hacking phase, compared to a regular div. 2 round for instance, but I believe some things can be optimized to make system testing faster, thus making it a better experience overall.
 » 2 months ago, # |   0 why the rating is not increasing? I wanna see myself cyan
•  » » 2 months ago, # ^ |   0 Same here bro!
 » 2 months ago, # |   0 When can I expect the rating changes?
•  » » 2 months ago, # ^ |   0 around 8:15 pm, 24 hours after contest for open hacking phase rounds.
•  » » » 2 months ago, # ^ |   0 Was this round unrated for everyone?showing unrated on my contest history
•  » » » » 2 months ago, # ^ |   0 Rating will be updated soon. Div-4 normally takes 23/24 hours to update rating.
•  » » » » » 2 months ago, # ^ |   0 yeah because there are just more people around 30k participants to calculate ELO O(n**2) ratings for each person in div3's and div4's i guess.
 » 2 months ago, # |   0 Codeforces Round #835 (Div. 4) i give this contest and my rating is not changed even by solving 3 question plzz help
•  » » 2 months ago, # ^ |   0 Same bro As it was rated for people below 1400 rating, our rating should have got increased
 » 2 months ago, # | ← Rev. 2 →   0 What is the difficulty of problems in this contest ??? I don't see any tag.
 » 2 months ago, # |   0 Why the problem E I can pass in 1980ms after the contest but get TLE in the review?
•  » » 2 months ago, # ^ |   0 There are some hidden testcases in system testing. I guess, your code failed there.
 » 2 months ago, # |   0 @Down Though my rating less than 1400 in whole codeforces rating history and I have given more than 5 contests still my rating has not been increased after securing 2000 rank.
•  » » 2 months ago, # ^ |   0 I'm looking into it
•  » » » 2 months ago, # ^ | ← Rev. 2 →   0 Please let me know once the ratings are updated, either by personal comment or general comment.
 » 2 months ago, # |   0 For the G Question it is giving me wrong answer on test case 2 . Whats wrong in this code . I am first storing the xor of path till all the node from a and b as root respectively , Then checking for common elements . https://codeforces.com/contest/1760/submission/182136945
•  » » 2 months ago, # ^ | ← Rev. 2 →   0 When starting from a, the dfs cannot cross b. Either arrive at b directly, or block at b because of the nonzero xor.
•  » » » 2 months ago, # ^ |   0 Thank you so much . Now i got what i was doing wrong . ;)
 » 2 months ago, # |   0 Have the ratings updated ?
•  » » 2 months ago, # ^ |   +8 No, not yet.
•  » » » 2 months ago, # ^ |   -8 Okay
 » 2 months ago, # |   0 why the rating havn't come out yet, why is it so late this time
 » 2 months ago, # |   0 Was this contest unrated for everyone because I didn't notice a difference in my rating after a day. I am grey.
•  » » 2 months ago, # ^ |   0 Yep, I was thinking the same. It's been more than 23+ hours. Still no Update!
 » 2 months ago, # |   0 There were good problems in this round. The contest is worth spending time on. All the setters and testers have put in a lot of work and effort. Good luck everyone !!
 » 2 months ago, # |   +4 mister I have given 7 contest in which I have solve more than 1 problems in almost all..Can you please check why my rating is not increasing.I am grey rated which means I have rating less than 1400.
•  » » 2 months ago, # ^ |   +1 Assuming you have no competitive programming exp prior to coming to codeforces. Solving 1 problem in div 2 rounds places u somewhere between 9k-12k in rank, for getting a better rating, you need to have a better rank, for getting better rank you have to solve around 3-4 problems depending on round difficulty, A and B are generally ad-hoc/implementation type. However, from C you need to practice problems of specific tags.
•  » » » 2 months ago, # ^ |   0 bro I am asking him why has my rating not changed from the last Div 4 round.In simple words I am asking him to check why under my contest section , it is not showing the rating change from last contest..
•  » » » » 2 months ago, # ^ |   0 xd, sorry for the misunderstanding
•  » » » » » 2 months ago, # ^ |   0 No problem man...I should have written more clearly.
•  » » » » 2 months ago, # ^ |   0 It's been shown under unrated contest list for all users maybe...it could be under the unrated list until cf figures lut ratings for all users...maybe, not an official answer
 » 2 months ago, # |   -8 When will the rating be given? Answer please! Or is it not rated? Когда дадут рейтинг? Ответьте пожалуйста! Или это не рейтинговая?
 » 2 months ago, # | ← Rev. 2 →   -7 DIV4 TAKES MORE THAN 24 HOURS TO UPDAATE RATING CHANGE, WHY MikeMirzayanov WHY?
 » 2 months ago, # |   0 I solved the same problems with another account because the other one made a lot of stupid mistakes, but the rating didn't increased.can you please accept it from this account and ignore the other
•  » » 2 months ago, # ^ |   0 No
 » 2 months ago, # |   0 I didn't receive my rating yet?? I solved 3 questions
 » 2 months ago, # |   0 Waiting for the rating to change.
•  » » 2 months ago, # ^ |   0 That was very unfortunate.
 » 2 months ago, # |   +1 Please Codeforces send Me a message said that "Your solution 181995500 for the problem 1760F significantly coincides with solutions Morad/181995500, Hussam-alwan/182013671, Rakhimov_Ans/182023461 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. " and skipped all My Solutions And I Have not Any conclusive evidence But Only i submitted My Solution on 18:58 and anthor Person submitted on 19:26 So I Haven't an account on Idone and didn't Use it and I should Be a Specialist in this Contest !!!! please Help Me! Thanks For Your Time
•  » » 2 months ago, # ^ |   0 Please MikeMirzayanov Review me issue
 » 2 months ago, # | ← Rev. 3 →   0 Different rank while checking unofficial common standing(477) and in unofficial friend standing page(767) , what is the reason behind this ?
•  » » 2 months ago, # ^ |   0 Only trusted ones show in common standing in div 3/4
•  » » » 2 months ago, # ^ |   0 oh thanks for informing.
•  » » » » 2 months ago, # ^ |   0 No problem
 » 2 months ago, # |   0 Guys I could not solve problem D could someone explain to me what we are supposed to do? Like what is the problem statement saying? How do we figure out the l and r?
 » 2 months ago, # |   0 Codeforces is became part of life.. even in busy day I have needed to enter at codeforces at least once as codeforces is the best online judge for me So i have so much expectation as well from codeforces. One thing I dont like about codeforces is it takes too much time to update the rating changes and atcoder is way ahead than codeforces at this matter.
 » 2 months ago, # |   0 I got a message from system that my submission 182022289 for the problem 1760E, has been found significantly similar to 181959036 this solution and a warning that my account may get blocked due to this. I wrote a very basic solution for that problem which was accidently similar to the other code. it may happens because it is only implementation problem... some code may be same like 1760A,1760B. you may check my previous submission I used same template and other variable. I submit this code 3 minute earlier from this submission then got wrong answer and realize that I missed a part of the of the solution then edit it and submit. I didn't copy any other code. it was accidently happened. I didn't use ideone or other online ide. So I request the community to help me out and make my solutions valid for the round and rated it.
•  » » 2 months ago, # ^ |   0 Same happened to me i submmited and got wrong answer, then i found the issue and after 2 munites i submitted and got accepted, every thing was normal about my code.MikeMirzayanov Please review our issue.
 » 2 months ago, # |   0 In the last div 4, my solution for the problem E Binary Inversions link to problemgot skipped due to the similarity of code from the user merahijalwa/181973274. first of all I don't know him and the similarity in code is due to code available in the geeks for geeks platform for counting the number of inversions in the array link to code from geeks for geeks website . please consider this as this is a legit case and this is fist time i am going to reach pupil rank. please MikeMirzayanov consider this case as my case is completely legit and nor i have use any online ides. If anyone know how to contact codeforces team..please comment.
•  » » 2 months ago, # ^ |   0 Me to on probelm F!! Please MikeMirzayanov review your decision
 » 2 months ago, # |   0 New rating still not updated..why??
 » 2 months ago, # |   0 I participated in this contest 835 div4 from my original handle — Ajayjeena but as i was thinking about switching to a new account so i make the same submissions from this id aswell as i was not aware that it would result in null submission so i want that the submission made by me from my original id-Ajayjeena should atleast be considered and i can provide the evidence for the same. Can anyone help me with this one ??
•  » » 2 months ago, # ^ |   0 same happened with me
 » 2 months ago, # | ← Rev. 3 →   0
•  » » 2 months ago, # ^ |   0 finally rated
 » 2 months ago, # |   0 Can anyone share dp approach for problem E? Or It can't solved by dp because I am thinking about dp approach,but getting wrong answer on test 2.
•  » » 2 months ago, # ^ |   0 I solved using prefix sum approach. I have maintained 2 dp array's from left to right for counting number of 1's and from right to left counting number of 0's and just calculated over these 2 prefix sum array's
•  » » » 2 months ago, # ^ |   0 can you share you code,if possible? Thanks in advance!!
•  » » » » 2 months ago, # ^ |   0
 » 2 months ago, # |   0 Ah screw my luck. I'm 1399 now
•  » » 2 months ago, # ^ |   0 You will be specialist by next contest hopefully!
•  » » » 2 months ago, # ^ |   0 Thanks. I hope so
•  » » 2 months ago, # ^ |   +1 Well, maybe you get added by one after the rating is rolled back =)
 » 2 months ago, # |   0 When is the editorial going to be available?
 » 2 months ago, # | ← Rev. 2 →   0 Why am I not rated for div4
•  » » 2 months ago, # ^ | ← Rev. 2 →   0 You have to participate in atleast n contest and solving atleast x problems in them to be eligible for being a rated participant, I don't remember n and x` values, but you can find it in this post's description itself
•  » » » 2 months ago, # ^ |   0 That's the prerequisite of being a trusted participant. You will be rated regardless of being trusted, if your rating is <1400.
 » 2 months ago, # |   0 Nice Contest, Quality problemset and Good tutorial!! Kudos to the CF team & contest team
 » 2 months ago, # | ← Rev. 2 →   0 Hello, I was not copying in round #835 but these two things happened to me. Unfortunately, my laptop was damaged hence I was using my sister's laptop and it did not have my C++ setup hence I was using online editor which was linked with my github my Github. Moreover, this question somewhat matched the one on HackerRank which I had solved earlier with the same approach. In this Question D — Down and U — Up. But in our Question, there were numbers this was the only Difference. https://www.hackerrank.com/challenges/counting-valleys/problem Next time this won't happen. I promise that such situations would never take place in the future. I request you to please reanalyze my all questions of Round #835. It takes a lot of effort to solve the problems and stay consistently give contests with college stuff. I have started my Coding Journey from Codeforces and I am new to the Platform too. I try to regularly give contests and am doing the analysis of where I went wrong and how I could improve. Please consider this as a onetime mistake which will not occur again.Thanks and Regards.
•  » » 2 months ago, # ^ | ← Rev. 2 →   0 This is my solution — https://codeforces.com/contest/1760/submission/181981041this is that guys solution — https://codeforces.com/contest/1760/submission/181991410I have submitted the code earlier and seriously I don't know this guy. Please resolve this issue MikeMirzayanov
 » 2 months ago, # |   0 Rating system is still confusing for me. As a newbie, confirming 3441th position and still got 35 points . CF preditor chrome extension showed 70+ when the rank was even 4000+
 » 2 months ago, # |   -9 I didn't share my code to ANYONE!!!!!!! What will happen if someone locked and try to hack me,and share my code to other? YOU HAVE WRONGED ME
•  » » 2 months ago, # ^ |   0 Maybe try to share your code and prove that you've not plagiarized rather than screaming from next time on.
•  » » 2 months ago, # ^ |   0 Blue coder is already out of competition for Div 4. Why bother?
•  » » » 2 months ago, # ^ |   0 Because i did't do such thing.i dont care the rating but i do care credict.
 » 2 months ago, # |   0 codeforces winner
 » 2 months ago, # |   +15 :sadge:
•  » » 2 months ago, # ^ |   0 Same for me. I Solved 5 problems and yet got -2 rating
•  » » » 2 months ago, # ^ |   +8 They were easy af
 » 2 months ago, # |   0 As a tester, I can assure you really good quality problems. The contest in worth spending time. All the setters and testers have put a lot of work and effort. Good luck everyone !!
 » 2 months ago, # |   0 codeforces winner 1.place = codeforces 2.place = stepik 3.place = acmp 4.place = informatics
 » 2 months ago, # |   -6 As a participant i will not participate (bycicle is my super idol in informatics and english ofc) Spoiler for upvotesSpoiler for upvotes... Spoiler for upvotes... Spoiler for upvotes... Spoiler for upvotes... Spoiler for upvotes... Spoiler for upvotes......
 » 2 months ago, # | ← Rev. 2 →   -27 This is a BAD round. Problems aren't FUN at all. They are too STANDARD and ROUTINIZED. PLEASE refrain from setting such rounds from now on.UPD: PLEASE don't downvote me! I am just saying my opinion.
•  » » 2 months ago, # ^ |   +10 For Div 4 these problems are very good
•  » » » 2 months ago, # ^ |   -27 No, THIS ROUND IS BAD.
•  » »