Codeforces Round #419 (Div. 1), problem: (E) Karen and Neighborhood Solution In C/C++

By |2017-08-07T21:46:50+00:00August 7th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , |

#include <bits/stdc++.h> using namespace std; typedef pair<long long,long long> ii; long long n,k,i,w,res; long long m[65]; map <long long,long long> num,f,c; long long get(long long t) { if (f[t]>=0) return f[t]; f[t]=get((t-1)/2)+get(t/2); if (c[t]==1) f[t]++; return f[t]; } void cal(long long t) { if [...]