自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 收藏
  • 关注

原创 洛谷P2899 [USACO08JAN]手机网络Cell Phone Network

#include #define N 100100 using namespace std; const int INF=1008610086; int A[N],B[N],C[N]; int beg[N],to[N],nex[N]; int n,len; inline void Add(int a,int b){ nex[++len]=beg[a],beg[a]=len,to[len]=

2017-10-17 19:05:14 632

原创 noip 2014 提高组试题(答案+简单分析)

1.B c++,java,python等常用于开发的语言都是高级语言。 2.D 1TB=2^10GB=2^20MB=2^30KB=2^40B 3.D 可以转化成十进制加减,也可以直接搞,自己算吧。 4.B TCP(Transmission Control Protocol 传输控制协议)是一种面向连接的、可靠的、基于字节流的传输层通信协议,由IETF的RFC 793定义。(来源度

2017-10-14 08:34:44 330

原创 codeforces 555C - Case of Chocolate

#include #define N 1000100 using namespace std; struct Seg{ int a[N<<2],lt[N<<2]; inline void push_down(int k){ a[k<<1]=max(a[k<<1],lt[k]); a[k<<1|1]=max(a[k<<1|1],lt[k]); lt[k<<1]=max(lt[k<<1

2017-10-06 15:41:19 384

原创 Codeforces Round #124 (Div. 1) D. The Next Good String

#include #define N 400100 using namespace std; typedef unsigned long long ULL; const ULL MOD=29; ULL cf[N],a[N]; int n,m; char s[N]; inline void ex(){ puts("Impossible"); exit(0); } ULL h[N]; void d

2017-10-04 14:22:17 275

原创 Atcoder Grand Contest 013D piling Up

题目大意: 初始时有i个红球(i∈[0,n])和n-i个蓝球。进行m次操作,每次先任意选出一个球,然后再放入一个蓝球和一个红球,再任意选出一个球。问选出的球的序列有多少种可能?n,m∈[1,3000] 首先,我们用i表示当前红球的数量: 不难发现,如果我们将两次取球合并,那么每次操作必然是以下四种: 1、i>=1时,可以取出两个红球,i-=1 2、i>=1时,可以先取出一个红球,再取出一

2017-10-03 18:54:16 210

原创 codeforces 293B

#include #define N 55 #define K 11 using namespace std; const int MOD=1e9+7; int jc[K],a[N][N]; int cu[N][N][K]; int cx[K]; int n,m,k,ans,zy; inline int A(int n,int m){ long long tmp=1; for(int i=n;

2017-10-02 20:15:11 275

原创 NWERC 2015B/bzoj 4426 Better Productivity

#include #define N 210 using namespace std; struct Node{int x,y;}a[N],b[N],c[N]; int dp[N][N]; int n,p,B,C; inline bool cmp1(Node a,Node b){ if(a.x!=b.x) return a.x<b.x; return a.y<b.y; } inline boo

2017-10-02 18:47:32 313

原创 4428: [Nwerc2015]Debugging调试

#include #define N 1000100 using namespace std; long long f[N],x,y; int n; long long dfs(int p){ if(f[p]!=-1) return f[p]; if(p==1) return f[p]=0; f[p]=x+y*(p-1); for(int i=2;i<p;i=(p-

2017-10-01 20:05:42 274

原创 codeforces 163D

#include #define N 127 #define eps 1e-6 using namespace std; typedef long long LL; LL t,w[N]; int n,c[N]; long long v=1,s=3e18; long long A,B,C; long long alpha(long long a){return 2*sqrt(a)*sqrt(v)+v

2017-10-01 20:03:16 721

原创 codeforces 84E

#include #define N 55 using namespace std; struct Node{ int x,y,bs,mas; string s; }; operator < (Node a,Node b){ if(a.bs!=b.bs) return a.bs>b.bs; return a.s>b.s; } int dt[N][N]; int fx[4]={0,0,1,-

2017-10-01 20:01:28 282

原创 codeforces 571B

#include #define N 300100 using namespace std; inline int read(){ int f=0,a=0;char ch=getchar(); while(ch'9'){if(ch=='-') f=1;ch=getchar();} while(ch='0') a=a*10+ch-'0',ch=getchar(); if(f) return

2017-10-01 20:00:01 219

原创 codeforces 115D

#include #define N 2010 using namespace std; const int MOD=1e6+3; int n; string s; int dp[N][N]; int sum[N][N]; int w[N]; int z[N]; int main(){ cin>>s; int siz=s.size(); int len=0; if(s[0]=='/'||s

2017-10-01 19:58:26 334

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除