Codeforces Round #388 (Div. 2), problem: (D) Leaving Auction Solution in C/C++

By |2017-04-07T22:11:44+00:00January 6th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , |

Codeforces Round #388 (Div. 2), problem: (D) Leaving Auction Solution in C/C++   #include<stdio.h> #include<stdlib.h> typedef unsigned u; u *G[222222],Ga[222222],Gi[222222],M[222222],P[222222],S[222222],V[222222]; int F(const void*x,const void*y) { if(M[*(u*)x]>M[*(u*)y])return 1; if(M[*(u*)x]<M[*(u*)y])return-1; if(*(u*)x<*(u*)y)return 1; if(*(u*)x>*(u*)y)return-1; return 0; } int main() { u n,i=-1,j,k,q=0,Q,lo,hi,mi; for(scanf("%u",&n);++i<n;S[i]=i) { scanf("%u%u",&j,&k);liar:; if(Ga[j]==Gi[j]) { [...]