Tinkoff Challenge – Final Round (Codeforces Round #414, rated, Div. 1 + Div. 2), problem: (F) Leha and security system Solution In C/C++

By |2017-07-24T16:42:09+00:00July 24th, 2017|Categories: C/C++, Programming|Tags: , , , , |

#include <cstdio> #include <iostream> #include <algorithm> #define N 100010 using namespace std; typedef long long ll; int n,m; int a[N]; struct segt{ int l,r,cd; int f[10],lazy[10]; ll sum[10]; ll val(){ ll ret=0; for(int i=0;i<10;i++) ret+=sum[i]*i; return ret; } }T[N<<2]; inline char nc(){ static char [...]