Sponsors

Tag: Rated

Codeforces Round #424 (Div....

#include<cstdio> using namespace std; int n,i,la,nw,fl,tp; int main(){ for(scanf("%d%d",&n,&la);++i<n;la=nw,fl=tp) if(scanf("%d",&nw),fl>(tp=(nw>la?0:(nw<la?2:1))))return puts("NO"); return puts("YES"); }

Tinkoff Challenge – Final...

#include<set> #include<map> #include<ctime> #include<cmath> #include<queue> #include<bitset> #include<string> #include<cstdio> #include<cctype> #include<vector> #include<cstdlib> #include<cstring> #include<cassert> #include<sstream> #include<numeric> #include<iostream> #include<algorithm> #include<functional> using namespace std; #define For(i,x,y) for(int i=x,_y=y;i<=_y;++i) #define Rep(i,x,y) for(int i=x,_y=y;i>=_y;--i) #define...

Tinkoff Challenge – Final...

#include <cstdio> #include <iostream> #include <algorithm> #define N 100010 using namespace std; typedef long...

Tinkoff Challenge – Final...

#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; }

Tinkoff Challenge – Final...

#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...

Tinkoff Challenge – Final...

#include<cstdio> #include<cstring> #include<algorithm> using namespace std; #define MN 300000 char a,b,c; bool cmp(char x,char y){return...

Tinkoff Challenge – Final...

#include<bits/stdc++.h> int main(){double p,l,i=1;std::cin>>p>>l;for(;i<p;)printf("%.7f ",sqrt(i++/p)*l);}

Tinkoff Challenge – Final...

#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); }

Playrix Codescapes Cup (Codeforces...

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...

Playrix Codescapes Cup (Codeforces...

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...

Playrix Codescapes Cup (Codeforces...

#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; #define N 200010 #define ll long long #define INF...

Playrix Codescapes Cup (Codeforces...

#include <bits/stdc++.h> using namespace std; typedef int64_t ll; #define f(i,j,k) for(int i=j;i<k;i++) const...

Advertisement

spot_img