Celebrating Black History Month:...
As February unfolds, so does the annual celebration of...
The Path to Self-Mastery:...
Embarking on a journey of self-mastery and breaking free...
Wizards of Waverly Place...
In a spellbinding announcement, Disney has officially revealed that...
Coachella 2024: Iconic headliners,...
Coachella Valley Music and Arts Festival, one of the...
2024 Taiwan Election: Pivotal...
As Taiwan gears up for its 2024 presidential election,...
Michael Strahan’s Daughter’s Medulloblastoma...
In a recent and heartbreaking revelation, Michael Strahan, former...
Michigan vs. Washington: The...
In a highly anticipated matchup, the 2024 National Championship...
Jason Kelce: Unmasking the...
In the world of professional football, where conformity often...
A Comprehensive Analysis of...
Boeing, a global aerospace giant, has long been a...
Unlocking Full-Stack Mastery: Web...
In the rapidly evolving landscape of technology, the demand...
Advertisement
C/C++
Tinkoff Challenge – Final Round (Codeforces Round #414, rated, Div. 1 + Div. 2), problem: (E) Choosing Carrot Solution In C/C++
#include<iostream>
#include<cstdio>
#include<fstream>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<cmath>
#include<cstring>
#include<cstdlib>
using namespace std;
int a,b;
int main()
{
int n,i,x,y;
cin>>n;
for(i=1;i<=n;i=i+1)
cin>>a;
for(i=1;i<=n;i=i+1)
{
x=(i-1)-(n-i);
if(x<0)
x=-x;
b=max(b,a);
}
for(i=1;i<n;i=i+1)
{
x=(i-1)-(n-i-1);
if(x<0)
x=-x;
b=max(b,min(a,a));
}
for(i=2;i<=n;i=i+1)
b=max(b,b);
for(i=1;i<n;i=i+1)
cout<<b<<' ';
cout<<b<<endl;
return 0;
}
Uncategorized
Tinkoff Challenge – Final Round (Codeforces Round #414, rated, Div. 1 + Div. 2), problem: (D) Labelling Cities Solution In C/C++
#include<bits/stdc++.h>
#define MAXN 300100
using namespace std;
struct node{int y,next;}e;
int n,m,len,Link,p,hash,col,vis,used;
inline int read(){
int x=0,f=1; char...
C/C++
Tinkoff Challenge – Final Round (Codeforces Round #414, rated, Div. 1 + Div. 2), problem: (C) Naming Company Solution In C/C++
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
#define MN 300000
char a,b,c;
bool cmp(char x,char y){return x>y;}
int main()
{
int n,i,al,ar,bl,br,cl,cr;
scanf("%s%s",a,b);...
C/C++
Tinkoff Challenge – Final Round (Codeforces Round #414, rated, Div. 1 + Div. 2), problem: (B) Cutting Carrot Solution In C/C++
#include<bits/stdc++.h>
int main(){double p,l,i=1;std::cin>>p>>l;for(;i<p;)printf("%.7f ",sqrt(i++/p)*l);}
C/C++
Tinkoff Challenge – Final Round (Codeforces Round #414, rated, Div. 1 + Div. 2), problem: (A) Bank Robbery Solution in C/C++
#include<cstdio>
int main()
{
int a,b,c,i,ans=0;
scanf("%d%d%d",&a,&b,&c);
for(scanf("%d",&i);i--;)scanf("%d",&a),a>b&&a<c?++ans:0;
printf("%d",ans);
}
Java
Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2), problem: (G) Cut the pie Solution In JAVA
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...
C/C++
Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2), problem: (F) Beautiful fountains rows Solution In C/C++
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...
C/C++
Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2), problem: (E) Aquarium decoration Solution In C/C++
#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,a,b,p,M,f;
inline...
C/C++
Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2), problem: (D) Field expansion Solution In C/C++
#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 =...
C/C++
Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2), problem: (C) Fountains Solution In C/C++
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int n, c, d;
int bit;
void insertBIT (int...
C/C++
Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2), problem: (B) T-shirt buying Solution In C/C++
from heapq import heappush, heappop
n = input()
p = map(int, raw_input().split())
a = map(int,...
C/C++
Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2), problem: (A) Carrot Cakes Solution In C/C++
main(n,t,k,d){scanf("%d%d%d%d",&n,&t,&k,&d);puts(d<(n-1)/k*t?"YES":"NO");}
Wizards of Waverly Place...
In a spellbinding announcement, Disney has officially revealed that...
Coachella 2024: Iconic headliners,...
Coachella Valley Music and Arts Festival, one of the...
2024 Taiwan Election: Pivotal...
As Taiwan gears up for its 2024 presidential election,...
Michael Strahan’s Daughter’s Medulloblastoma...
In a recent and heartbreaking revelation, Michael Strahan, former...
Michigan vs. Washington: The...
In a highly anticipated matchup, the 2024 National Championship...
Jason Kelce: Unmasking the...
In the world of professional football, where conformity often...
A Comprehensive Analysis of...
Boeing, a global aerospace giant, has long been a...
Unlocking Full-Stack Mastery: Web...
In the rapidly evolving landscape of technology, the demand...
Winter Skincare Essentials: Must-Have...
As winter sets in and the temperature drops, it's...
Morning Glow: DIY Beauty...
Unlocking the secret to radiant and glowing skin often...