Invitation to CodeChef Starters 134 (Rated till 6-Stars) - 15th May

We invite you to participate in CodeChef’s Starters134, this Wednesday, 15th May, rated for till 6-Stars(ie. for users with rating < 2500).

Time: 8:00 PM — 10:00 PM IST

Joining us on the problem setting panel are:

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 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!

During every Codechef contest all codes get uploaded in this telegram group and all copy same code from here. Telegram: Contact @codechef_answers.

Massive cheating has been done in the problem :- 3out1in; 3out1in Practice Coding Problem - CodeChef.
@admin

85% of codes are exactly of the same structure as this:-

void solve()
{
int n,q; cin >> n>>q;

vector<int> a(n); 
for (auto &x : a) cin >> x; 
 
multiset<int> hi, lo; 
int sum_hi = 0, sum_lo = 0; 
vector<int>final; 
for (int i = 0; i < n; ++i){ 
    if (i & 1){ 
        if (a[i] > *hi.begin()){ 
            sum_hi += a[i] - *hi.begin(); 
            sum_lo += *hi.begin(); 
            lo.insert(*hi.begin()); 
            hi.insert(a[i]); 
            hi.erase(hi.begin()); 
        } else{ 
            lo.insert(a[i]); 
            sum_lo += a[i]; 
        } 
    } else { 
        if (lo.empty()){ 
            hi.insert(a[i]); 
            sum_hi += a[i]; 
        } else if (a[i] < *lo.rbegin()){ 
            sum_hi += *lo.rbegin(); 
            sum_lo += a[i] - *lo.rbegin(); 
            hi.insert(*lo.rbegin()); 
            lo.insert(a[i]); 
            lo.erase(lo.find(*lo.rbegin())); 
        } else{ 
            hi.insert(a[i]); 
            sum_hi += a[i]; 
        } 
         
    } 
    final.push_back(sum_hi-sum_lo); 
} 
for(int i=0;i<q;i++){ 
   int x; 
   cin>>x; 
   cout<<final[x-1]<<" "; 
} 
cout<<endl; 

}

Submission Link -

CodeChef: Practical coding for everyone.
CodeChef: Practical coding for everyone.
CodeChef: Practical coding for everyone
CodeChef: Practical coding for everyone
CodeChef: Practical coding for everyone

2 Likes