# Playrix Codescapes Cup (Codeforces Round #413

/Tag: Playrix Codescapes Cup (Codeforces Round #413

## Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2), problem: (G) Cut the pie Solution In JAVA

By |2017-07-24T13:31:05+06:00July 24th, 2017|Categories: Java, Programming||

import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.StringTokenizer; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top */ public class Main { public static void main(String[] args) { InputStream inputStream [...]

## Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2), problem: (F) Beautiful fountains rows Solution In C/C++

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

include<cstdio> using namespace std; inline int read(){ char c=getchar();int p=1,ret=0; while((c<'0')||(c>'9')){if(c=='-')p=-1;c=getchar();} while((c>='0')&&(c<='9'))ret=(ret<<1)+(ret<<3)+c-'0',c=getchar(); return ret*p; } int n,m; long long ans; struct tree{ int v[2][2],num[2][2]; long long sum[2][2]; void add(int x,int y,int p){v[x][y]+=p;} }t[1600005]; struct ele{ int l,r; }e[200005]; int head[200005],Head[200005],nex[200005],Nex[200005]; int sum[200005]; #define mid [...]

## Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2), problem: (E) Aquarium decoration Solution In C/C++

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

#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; #define N 200010 #define ll long long #define INF 2000000000 ll Ans=1e18,Res; int i,j,k,n,Sum,m,x,y,l[4],a[N],b[4][N],p[4],M,f[N]; inline int Min(int x,int y){return x<y?x:y;} inline ll Min(ll x,ll y){return x<y?x:y;} int main(){ scanf("%d%d%d",&n,&m,&k); for(i=1;i<=n;i++)scanf("%d",&a[i]); scanf("%d",&x); while(x--)scanf("%d",&y),f[y]=1; scanf("%d",&x); while(x--){ scanf("%d",&y); if(f[y])f[y]=3;else f[y]=2; [...]

## Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2), problem: (D) Field expansion Solution In C/C++

By |2017-07-24T13:26:00+06:00July 24th, 2017|Categories: C/C++, Programming||

#include <bits/stdc++.h> using namespace std; typedef int64_t ll; #define f(i,j,k) for(int i=j;i<k;i++) const int maxn = 1e5 + 10; int A[maxn], a,b,h,w,n,ans; void dfs(ll aa, ll bb, int cnt) { if (cnt==n+1) return; if (aa>=a && bb>=b) ans=min(ans,cnt); if (A[cnt]==2) { while (aa<a) aa*=2, [...]

## Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2), problem: (C) Fountains Solution In C/C++

By |2017-07-24T13:24:46+06:00July 24th, 2017|Categories: C/C++, Programming||

#include <iostream> #include <algorithm> #include <vector> using namespace std; int n, c, d; int bit[2][100100]; void insertBIT (int id, int a, int x) { for (int i=a; i<=100100; i+=i&(-i)) bit[id][i]=max(x, bit[id][i]); } int queryBIT (int id, int a) { int res=0; for (int i=a; [...]

## Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2), problem: (B) T-shirt buying Solution In C/C++

By |2017-07-24T13:22:54+06:00July 24th, 2017|Categories: C/C++, Programming||

from heapq import heappush, heappop n = input() p = map(int, raw_input().split()) a = map(int, raw_input().split()) b = map(int, raw_input().split()) m = input() c = map(int, raw_input().split()) colors = {} for i in range(1, 4): colors[i] = [] for i in range(n): heappush(colors[a[i]], (p[i], [...]

## Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2), problem: (A) Carrot Cakes Solution In C/C++

By |2017-07-24T13:21:16+06:00July 24th, 2017|Categories: C/C++, Programming||

main(n,t,k,d){scanf("%d%d%d%d",&n,&t,&k,&d);puts(d<(n-1)/k*t?"YES":"NO");}