Tag: Codeforces Round #426 (Div. 2)

Codeforces Round #426 (Div. 2), problem: (E) Ever-Hungry Krakozyabra Solution In C/C++

#include <stdio.h> #include <stdlib.h> #include <string.h> #define N 19 char strL, strR; int l, r, i, n, j, sum, k; int bufL =...

Codeforces Round #426 (Div. 2), problem: (D) The Bakery Solution In C/C++

#include <bits/stdc++.h> #define For(i,a,b) for(long long i=a;i<=b;i++) #define Ford(i,a,b) for(int i=a;i>=b;i–) #define dream_hyojooslh using namespace std; const int N=200000+1067,T=67; int f,it,lz,trai,phai,a; void build(int x,int...

Codeforces Round #426 (Div. 2), problem: (C) The Meaningless Game Solution In C/C++

#include <bits/stdc++.h> using namespace std; int main() { ios_base :: sync_with_stdio(0), cin.tie(0), cout.tie(0); int n; long long int a,b,g; cin >> n; while (n–) { cin >>...

Codeforces Round #426 (Div. 2), problem: (B) The Festive Evening Solution In C/C++

#include<cstdio> bool pd; char s; int n,k,size,last; int main(){ scanf(“%d%d%s”,&n,&k,&s); for (int i=0;i<n;++i) last-‘A’]=i; for (int i=0;i<n;++i){ if (!pd-‘A’]) pd-‘A’]=true,++size; if (size>k){ printf(“YES”); return 0; } if (i==last-‘A’]) –size; } printf(“NO”); }

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!