Codeforces Round #426 (Div. 1), problem: (D) Red-Black Cobweb Solution In C/C++

By | 2017-08-04T12:32:27+00:00 August 4th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , |

#include <iostream> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #define maxn 100005 #define mod 1000000007 #define ll long long using namespace std; ll ksm(ll a, ll b) { if(!b) return 1; ll ns = ksm(a, b >> 1); ns *= ns, ns %= [...]