摘要: #include using namespace std; double ans; int n; int main(){ scanf("%d",&n); double ret=420000.00/n; for(register double i=1;i<=n;i++){ ans+=ret; ret-=ret*0.5/i; } ... 阅读全文
posted @ 2017-10-11 21:36 wqtnb_tql_qwq_%%% 阅读(138) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; struct _zz{int now,a,b,c,num;}; bool operator y.num;} priority_queue,less > q; int n,m; int main(){ scanf("%d%d",&n,&m); while(n--){ ... 阅读全文
posted @ 2017-10-11 21:25 wqtnb_tql_qwq_%%% 阅读(128) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int a[100005],b[100005],to[100005],i,n; priority_queue,vector >,greater > >q; int main(){ scanf("%d",&n); for(i=1;i(a[1]+b[i],i)); } while(... 阅读全文
posted @ 2017-10-11 20:56 wqtnb_tql_qwq_%%% 阅读(96) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; const int N=30010; int p[N],t,s[N],d[N],num[N],x,y; char c; int find(int x){ if(x==p[x])return x; int fx=find(p[x]); ... 阅读全文
posted @ 2017-10-11 20:12 wqtnb_tql_qwq_%%% 阅读(117) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; char a[32]; int k,in[15],ans[1010]; bool d[15][15],vis[15]; void mul(int x){ for(int i=ans[0];i;i--){ ans[i]*=x; ans[i+1]+=ans[... 阅读全文
posted @ 2017-10-11 19:24 wqtnb_tql_qwq_%%% 阅读(104) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int n,a[100010],ans; int main(){ scanf("%d",&n); for(int i=1;ia[i-1])ans+=a[i]-a[i-1]; } printf("%d\n",ans); return 0; } 阅读全文
posted @ 2017-10-11 18:34 wqtnb_tql_qwq_%%% 阅读(92) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; long long k,n,ans; int main(){ scanf("%lld%lld",&k,&n); long long x=1; while(n){ if(n&1)ans+=x; x*=k; n>>=1; } pr... 阅读全文
posted @ 2017-10-11 18:05 wqtnb_tql_qwq_%%% 阅读(120) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; const int INF=1n){init(); dp(); return;} if(r-cnt==n-now){ q[cnt++]=now; dfs(now+1); q[cnt--]=0; ... 阅读全文
posted @ 2017-10-11 17:13 wqtnb_tql_qwq_%%% 阅读(299) 评论(0) 推荐(0) 编辑