Tag: based on VK Cup Finals)

Codeforces Round #423 (Div. 1, rated, based on VK Cup Finals), problem: (F) Dirty Arkady’s Kitchen Solution in C/C++

import java.io.*; import java.util.*; import sun.security.pkcs11.Secmod.DbMode; public class F { static class Edge { int from, to; int idx; public Edge(int from, int to,...

Codeforces Round #423 (Div. 1, rated, based on VK Cup Finals), problem: (E) Rusty String Solution in C/C++

#include<bits/stdc++.h> #define pi acos(-1) #define maxn 1148576 using namespace std; typedef long long ll; char s; int n; int res; struct node{double x,y;}a,b,w; node operator +(node...

Codeforces Round #423 (Div. 2, rated, based on VK Cup Finals), problem: (F) Best Edge Weight Solution in C/C++

#include <iostream> #include <algorithm> #include <cmath> #include <cstring> #include <cstdlib> #include <cstdio> #include <map> #include <ctime> #include <vector> #define INF 2000000000 #define N 200010 using namespace std; bool in_MST; int...

Codeforces Round #423 (Div. 2, rated, based on VK Cup Finals), problem: (D) High Load Solution In C/C++

#include <cstdio> int main(){ int n, k; scanf("%d%d", &n, &k); int l = (n - 2) / k + 1; printf("%dn", 2...

Codeforces Round #423 (Div. 2, rated, based on VK Cup Finals), problem: (C) String Reconstruction Solution In C/C++

#include<bits/stdc++.h> using namespace std; const int maxn=2e6+5; int main() { char a={}; int n,k,i; cin>>n; while(n--){ string x; cin>>x>>k; int t,len=x.size(),tt=-len; while(k--){ scanf("%d",&t); for(i=max(0,tt+len-t);i<len;i++) a=x; tt=t; } } for(i=maxn-1;!a;) i--; for(int j=1;j<=i;j++) putchar(a?a:'a'); return 0; }

Codeforces Round #424 (Div. 1, rated, based on VK Cup Finals), problem: (E) Perpetual Motion Machine Solution In C/C++

#include <bits/stdc++.h> using namespace std; #define inf 1023456789 #define linf 1023456789123456789ll #define pii pair<int,int> #define pipii pair<int, pii > #define pll pair<long long,long...

Codeforces Round #424 (Div. 1, rated, based on VK Cup Finals), problem: (D) Singer House Solution In C/C++

#include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #define LL long long using namespace std; const LL Maxn = 410; const LL Mod =...

Codeforces Round #424 (Div. 2, rated, based on VK Cup Finals), problem: (F) Bamboo Partition Solution In C/C++

#include<cstdio> #include<algorithm> using namespace std; int n,a; long long k,ans=0; int main(){ scanf("%d%lld",&n,&k); for (int i=1; i<=n; i++) scanf("%d",&a); for (long long l=1,r; l<=1LL<<62;...

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!