We invite you to participate in CodeChef’s Starters 77, this Wednesday, 15th February, rated till 5-stars Coders (ie. for users with rating $$$< 2200$$$).
Time: 8 PM — 11:00 PM IST
Joining us on the problem-setting panel are:
- Contest Admins: Jeevan JeevanJyot Jyot Singh, Utkarsh Utkarsh.25dec Gupta
- Setters: Kanhaiya notsoloud1 Mohan, Jeevan JeevanJyot Jyot Singh, Utkarsh Utkarsh.25dec Gupta, Yash PoPularPlusPlus Thakker, Laxman saini.laxman2002 Singh Saini
- Testers: Nishank IceKnight1093 Suresh, Jatin rivalq Garg
- Statement Verifier: Kanhaiya notsoloud1 Mohan
- Video Editorialists: Sundar K Letscode_sundar, Madhav jhamadhav Jha, Suraj jhasuraj01 Jha, Jwala jwalapc, Rohit ezo_tihor Oze, Adhish ak2006 Kancharla
- Text Editorialists: Nishank IceKnight1093 Suresh
Written editorials will be available for all on discuss.codechef.com. Pro users can find the editorials directly on the problem pages after the contest.
The video editorials of the problems will be available for all users for 1 day as soon as the contest ends, after which they will be available only to Pro users.
Also, if you have some original and engaging problem ideas, and you’re interested in them being used in CodeChef's contests, you can share them here.
Hope to see you participating. Good Luck!
you guys need to chill out with the silly adhoc problems
it's kinda funny. solved 3 and idk why any of them is correct.
Any hints on SORTXOR ?
I knew how to reverse array in 3n/2 steps, but to sort I didn't end up on any conclusion, is it related to cycles ?
yes
I know how to find the cycles in a permutation but how in an array with duplicate elements?
try to get positions what will be the new position of element in this position
It is easy with permutaions is because new positoin of i is i in sorted permutation
How to solve KFOREST?
Greedily solve from highest bit and check whether is it possible in our answer. For checking you can check whether a $$$subtreeXor$$$ $$$&$$$ $$$answer$$$ $$$==$$$ $$$answer$$$ and if it satisfies this will be one of our trees. In the end just check whether the you have atleast k trees and if yes check whether the abs difference is even and the $$$remainingTreeXor$$$ $$$&$$$ $$$answer$$$ should be equal to 0.
I just got AC few minutes ago. (My Code) Anyways Thanks for the detailed explanation!
Is it not possible to solve sort a string using some kind of custom sort function?
We don't always have to put the smaller value at lower index.
look at the string, str = "cab"
output from a custom sort function will be "cab", but the lexicographically smaller value that can be obtained is "bca"