#include #include using namespace std; int val[100010]; set order; int main() { int n,d,cntr=0,ans=0; long long sum=0,diff,rem=0; FILE *F; F=fopen("parties.in","rt"); fscanf(F,"%d %d",&n,&d); for(int i=0;i=d){ans=n-cntr;break;} else cntr++;*/ /* #include #include using namespace std; int val[100010]; int main() { int n,d,cntr=0,ans=0; long long sum=0; FILE *F; F=fopen("parties.in","rt"); fscanf(F,"%d %d",&n,&d); for(int i=0;i=0;i--) { if(sum-val[i]