Tag: Codeforces Round #388 (Div. 2)

Codeforces Round #388 (Div. 2), problem: (E) Inversions After Shuffle Solution in C/C++

Codeforces Round #388 (Div. 2), problem: (E) Inversions After Shuffle Solution in C/C++   #include <stdio.h> #include <stdlib.h> #include <string.h> #define N...

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

Codeforces Round #388 (Div. 2), problem: (D) Leaving Auction Solution in C/C++   #include<stdio.h> #include<stdlib.h> typedef unsigned u; u *G,Ga,Gi,M,P,S,V; int F(const void*x,const...

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

Codeforces Round #388 (Div. 2), problem: (C) Voting Solution in C/C++   #include<stdio.h> typedef unsigned u; char S,D; int main() { u l,i,ds,rs,dq,rq; ds=rs=dq=rq=0; scanf("%u%s",&l,S); for(i=-1;++i<l;) { if(S=='D')++ds; if(S=='R')++rs; } for(;ds&&rs;) { for(i=-1;++i<l;)if(!D) { if(S=='D') { if(dq){--dq;--ds;D=1;continue;} ++rq; } if(S=='R') { if(rq){--rq;--rs;D=1;continue;} ++dq; } } } if(ds)putchar('D'); if(rs)putchar('R'); return 0; }

Codeforces Round #388 (Div. 2), problem: (B) Parallelogram is Back Solution in C/C++

Codeforces Round #388 (Div. 2), problem: (B) Parallelogram is Back Solution in C/C++     int main() { int x1,y1,x2,y2,x3,y3; scanf("%d%dn%d%dn%d%d",&x1,&y1,&x2,&y2,&x3,&y3); printf("3n%d %dn%d %dn%d...

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!