![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
codeforce
文章平均质量分 79
baidulele93
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #194 (Div. 2) A. Candy Bags
#include#includeusing namespace std;int a[1000000];int main(){ int n; cin>>n; int t=n*n,j=1,k,l,m=t; for(int i=1;i<=n*n;i++) a[i]=i; for(j=1;j<=(n*(n-1)/2+1)原创 2013-07-31 15:56:52 · 698 阅读 · 0 评论 -
搜索题方法总结
1,。深度搜索中 图的遍历。八个方向,dx,dy代表位移,则可以for(int dx=-1;dx for(int dy=-1;dy { int nx=x+dx;int ny=y+dy; if(0=0&&ny }2擅长于写solve()习惯问题,不过主函数尽量越短越好。原创 2013-09-13 15:11:40 · 180 阅读 · 0 评论 -
VK Cup 2012 Qualification Round 1--C. Cd and pwd commands
好代码就是用来欣赏的time limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya is writing an operating system原创 2013-07-27 12:48:57 · 1036 阅读 · 1 评论 -
Codeforces Round #193 (Div. 2) 一道水题的翻译
心情小记:第一次参加codeforce网赛,对于我这种英语拙技的人来说对于这道题目的理解简直要了我的老命,于是我果断放弃了......尤其是俄式英语,看多了中式英语的我快疯了。但这道题弄懂了以后,居然出奇的水。。。对于我来说这道题以下是我的翻译几个变量:n 是人的个数。bi 是每个人的编号范围是0~n-1j 是游戏的次数原创 2013-07-25 16:42:41 · 896 阅读 · 1 评论 -
cf water
男女排队,男的排在女的后面#include#includeusing namespace std;int main(){ char a[51],k; int x,b,i; cin>>x>>b>>a; while(b--) { for(i=0;i<x-1;i++) { if(a[i]<a[i+1]) {原创 2013-07-24 16:45:49 · 712 阅读 · 0 评论 -
codeforce小水题--A. Presents
思路:a[i]=k-->a[k]=i; that a[b[i]]=i#include#includeusing namespace std;int main(){ int a[105],b[105],t,i,k; cin>>t; for(i=1;i<t+1;i++) scanf("%d",&a[i]); for(i=1;i<t+1;i++)原创 2013-07-24 16:24:52 · 739 阅读 · 0 评论 -
A. Nearly Lucky Number
这道水题在涛神的帮助下顺利过关,一下是几个泪点1,英语不过关:In the second sample there are 7 lucky digits, 7 is lucky number, so the answer is "YES".它指的是7位数,digit位数,如果位数是幸运数字则输出,这个没考虑到2,这个lucky number不一定全都是幸运数字,4444000.77原创 2013-07-24 15:57:38 · 833 阅读 · 0 评论 -
Codeforces Round #201 (Div. 2)
1.A. Difference Row#include#includeusing namespace std;const int m=120;int a[m],e[m];int main(){ int n,min1=1005,max1=-1005; cin>>n; for(int i=0;i<n;i++) {cin>>a[i];}原创 2013-09-25 11:17:46 · 83 阅读 · 0 评论