### antontrygubO_o's blog

By antontrygubO_o, 3 days ago,

We invite you to participate in CodeChef’s September Lunchtime, this Friday , 23rd September, rated for all. It is based on EJOI 2022, the second day of which takes place earlier on the same day. All EJOI participants were asked to not discuss the problems before the end of this contest, and to not participate in this contest. If you somehow got to know some of the problems, please, don't participate.

Please note that the contest duration is unusual — 3.5 Hours.

Joining me on the problem setting panel are:

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!

• +113

 » 3 days ago, # |   -11 Can U Just Postpone the Contest to Day After Tomorrow or to Sunday .So me and every other person can join the LunchTime Contest After So Many Days .Since CodeForces Div 2 822 is Clashing with it
•  » » 3 days ago, # ^ |   +5 Codeforces contest has been rescheduled. Check announcement!
•  » » » 3 days ago, # ^ |   +1 Ok I am Sorry . I didn't notice the announcement . Thanks @KartikArya.
 » 2 days ago, # |   +6 Reminder: Contest starts in ~30 minutes.
 » 47 hours ago, # |   -23 What's the point of having a contest for 3.5 hours when the majority of the participants solve only upto div 2 B and div 2 C if they are lucky. Having a contest for 3.5 hours is going to increase the cheating so much and people who genuinely tried the contest and failed to solve questions are going to be the ones affected. There are several telegram groups (example: @allcodingsolution_ltd) where answers are being circulated, both paid and unpaid, which you can see from mostly similar codes and sudden upsurge in the number of submissions. Please look into this CodeChef_admin and consider reducing the time of the contests to 2 or 2.5 hours as that is more than enough time to solve whatever questions someone can genuinely, any increase in the time only promotes cheating.
 » 45 hours ago, # |   +23 How to solve RMVNUMBERS?
•  » » 45 hours ago, # ^ |   +3 If m >= 40 answer is 0. Otherwise you can calculate for each number in A, what mask of operations would leave it untouched. You can do dp on trie on those masks to calculate answer.
•  » » 45 hours ago, # ^ |   +13 If $M > 30$ the answer is $0$, otherwise we can brute-force on the game tree. See the code. code#include using namespace std; long long n,m; vector b; long long solve(long long i,vector &a){ if(a.empty()){return 0;} if(i==m){ long long res=0; for(auto &nx : a){res+=nx;} return res; } vector v0,v1; for(auto &nx : a){ if(nx%b[i]==0){v0.push_back(nx);} else{v1.push_back(nx);} } long long s0=solve(i+1,v0); long long s1=solve(i+1,v1); if(i%2==0){ return min(s0,s1); } else{ return max(s0,s1); } } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); cin >> n >> m; vector a(n); for(auto &nx : a){cin >> nx;} b.resize(m); for(auto &nx : b){cin >> nx;} if(m>30){ cout << "0\n"; return 0; } cout << solve(0,a) << "\n"; return 0; }
 » 45 hours ago, # |   0 Got my best rank (34) in div2. feeling much better after rating loss in CF.. thanks for the contest :)
 » 45 hours ago, # |   +33 RMVNUMBERS is a mastapiece!
 » 45 hours ago, # |   0 how to solve Increasing Addition?
•  » » 45 hours ago, # ^ |   +1 Consider what the operation does to the difference array.
•  » » » 45 hours ago, # ^ | ← Rev. 2 →   0 max adjecent diff when a[i]>a[i+1]becouse in one operation 1,2,3.... add in every l to r element
•  » » » » 30 hours ago, # ^ | ← Rev. 4 →   0 we want min(A[i]-A[i-1]) >= 0. So ans is -min(A[i]-A[i-1]) if min(A[i]-A[i-1]) < 0 otherwise its 0. We can use a multiset or map to store sorted adjacent difference.
•  » » » » » 28 hours ago, # ^ |   0 yeah thanks!
•  » » » 16 hours ago, # ^ | ← Rev. 4 →   0 Lets say the Increasing Addition question was phrased as this: find Max ceil((a[i]-a[j])/(j-i))) among all pairs (i,j) where j>i.And there are q queries where you modify one element in each query.How would you approach this question?
 » 45 hours ago, # |   0 Free 17pts was here(PERMSLCS Subtask3): ARC091-E
 » 45 hours ago, # |   +10 How to optimize LCAINTERACT from 66 points (k=10) to 100 points (k=9)?
 » 44 hours ago, # |   0 How to solve UNFRIENDLY for the entire 100 points ? I could come up with only a dp solution for 23 points :( .
•  » » 44 hours ago, # ^ |   +29 Collapse substrings like "aaaaaaaa" into just "a" as you can't pick more than 1 from these anyway. Collapse substrings like "abababababababa" into just "aba", this won't affect the answer for a similar reason. Now you can show that it is never optimal to leave gaps longer than 2 in the subsequence. Now you can solve with a $O(n)$ DP.
 » 16 hours ago, # |   +15 I'm really impressed by the quality of codechef problems! I enjoyed Div 1 problems so much (even more than a typical Codeforces round!) Keep it up!
•  » » 4 hours ago, # ^ |   +5 That's because it was EJOI 2022 problems :)