Tag: Codeforces Round #415 (Div. 1)

Codeforces Round #415 (Div. 1), problem: (E) Surprise me! Solution in C/C++

#include<iostream> #include<vector> #include<algorithm> #include<cstring> #include<cstdio> #include<cmath> #include<cstdlib> #include<ctime> #include<queue> #include<set> using namespace std; typedef long long LL; const int N=4e5; int gi() { int w=0;bool q=1;char c=getchar(); while ((c<‘0’||c>’9′) && c!=’-‘) c=getchar(); if...

Codeforces Round #415 (Div. 1), problem: (D) Hitchhiking in the Baltic States Solution In C/C++

#include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> #define nMax 300010 #define INF 2000000100 using namespace std; int n; struct Node { int v,siz,add; Node *son; Node(){v=INF; siz=1; son=son=NULL; add=0;} void update() { siz=1; if(son!=NULL) siz+=son->siz; if(son!=NULL) siz+=son->siz; } void...

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!