Tag: problem: (D) Mike and distribution Solution In C/C++

Codeforces Round #410 (Div. 2), problem: (D) Mike and distribution Solution In C/C++

#include<bits/stdc++.h> using namespace std; const int maxn=100000+10; int b,n,flag=1,dp; struct node { int id,x; }a; int cmp(node a,node b) { return a.x>b.x; } int main() { scanf(“%d”,&n); for(int i=1;i<=n;i++) { scanf(“%d”,&a.x); a.id=i; } sort(a+1,a+n+1,cmp); for(int i=1;i<=n;i++) scanf(“%d”,&b); int k=n/2+1; printf(“%dn%dn”,k,a.id); for(int...

Want to stay up to date with the latest news?

We would love to hear from you! Please fill in your details and we will stay in touch. It's that simple!