## Codeforces Round #412 (rated, Div. 1, based on VK Cup 2017 Round 3), problem: (F) Test Data Generation, Accepted Solution In C/C++

By |2017-07-24T02:44:29+06:00July 24th, 2017|Categories: C/C++, Programming||

#include<bits/stdc++.h> #define ll long long ll multmod(ll a, ll b, ll moder){ a = (a % moder + moder) % moder, b = (b % moder + moder) % moder; ll ret = 0; for ( ; b; b >>= 1){ if (b & [...]

## Codeforces Round #412 (rated, Div. 1, based on VK Cup 2017 Round 3), problem: (E) Blog Post Rating Solution In JAVA

By |2017-07-24T02:42:50+06:00July 24th, 2017|Categories: Java, Programming||

import static java.lang.Double.parseDouble; import static java.lang.Integer.parseInt; import static java.lang.Long.parseLong; import static java.lang.Math.min; import static java.lang.System.exit; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.util.Random; import java.util.StringTokenizer; public class E { static BufferedReader in; static PrintWriter out; static StringTokenizer tok; static int [...]

## Codeforces Round #409 (rated, Div. 1, based on VK Cup 2017 Round 2), problem: (E) Verifying Kingdom Solution In C/C++

By |2017-07-24T01:35:01+06:00July 24th, 2017|Categories: C/C++, Programming||

#include<cstdio> #include<cstring> #include<algorithm> #include<cctype> #include<ctime> #include<cstdlib> #include<string> #include<queue> #include<cmath> #include<set> #include<map> #include<bitset> #include<vector> #define rep(x,a,b) for (int x=int(a);x<=(int)(b);x++) #define drp(x,a,b) for (int x=int(a);x>=(int)(b);x--) #define cross(x,a) for (int x=hd[a];~x;x=nx[x]) #define ll long long #define inf (1<<29) #define pii pair<int,int> #define pdd pair<double,double> #define mk(a,b) make_pair(a,b) [...]

## Codeforces Round #409 (rated, Div. 1, based on VK Cup 2017 Round 2), problem: (D) Varying Kibibits Solution In C/C++

By |2017-07-24T01:33:02+06:00July 24th, 2017|Categories: C/C++, Programming||

#include <bits/stdc++.h> #define MAXN (1000000) #define MAXM (6) #define mod (1000000007) #define ll long long int n; int a[MAXN], b[MAXN], c[MAXN], g[MAXN], pow10[MAXM + 2]; void FWT(int *a, int length, int len){ for(int i = 1; i <= len; ++ i){ for(int j = [...]