自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Rocky 子叶的博客

厚积分秒之功,始得一鸣惊人

  • 博客(11)
  • 收藏
  • 关注

原创 问题 B: 【模拟】步步夺金

题目描述Ivy所在的公司想推出一款手机APP“步步夺金”,该APP可以统计用户每天走路的步数,并给予相应的“金币”奖励。在用户的“金币”达到一定数量后,就可以在公司的网站上兑换一定的体育用品。根据走路步数x奖励金币的规则如下:1、每天的前1000步可领取0.3金币(若未达到1000步则领取数量为零),之后的每2000步能领取0.1金币。为了引导用户适量运动,每天领取的金币数量不能超过3。2...

2020-04-03 00:07:48 818

原创 问题 H: Wanna go back home

题目描述Snuke lives on an infinite two-dimensional plane. He is going on an N-day trip. At the beginning of Day 1, he is at home. His plan is described in a string S of length N. On Day i(1≤i≤N), he will...

2020-03-25 23:20:08 139

原创 动态申请内存

typedef struct news{char z[3001];}news;news *a=(news *)malloc(200005*sizeof(news ))

2020-04-23 17:42:47 190

原创 c++高精度阶乘

string jiecheng(int n){ string str; if(n==1) { str="1"; return str; } else if(n==0) { str="1"; return str; } stringstream ss; ss&l...

2020-04-23 17:41:36 903

原创 c++乘法

{ if((x.size()<y.size())||(x.size()==y.size()&&x.compare(y)<0)) { string s; s=x; x=y; y=s; } if(y.compare("0")==0) { string ss...

2020-04-23 17:41:01 4367

原创 高精度减法

string minus1(string x,string y){ int flag=0; string str; if(x.compare(y)==0) { str="0"; return str; } else if(x.size()<y.size()||(x.size()==y.size()&&...

2020-04-23 17:40:09 118

原创 高精度加法

string add(string x,string y){ int len1=x.size(); int len2=y.size(); int lenx=max(len1,len2); int lenn=min(len1,len2); reverse(x.begin(),x.end()); reverse(y.begin(),y.end());...

2020-04-23 17:39:29 106

原创 c++快速排序

sort(begin, end); 默认从小到大sort(begin, end, cmp);sort(a + 1, a + 1 + n, cmp); sort(a, a + n, cmp); bool cmp(int x, int y) { return x > y; }struct Node { int x, y; std::string str;}/...

2020-04-23 17:32:11 96

原创 python文件的解码方式

编码名称用途utf8所有语言gbk简体中文utf8所有语言gb2312简体中文utf8所有语言gb18030简体中文big5繁体中文big5hkscs繁体中文代码如下out=open('d:/分表.csv','w',newline='\n',encoding='gb18030') csv_write=csv.wr...

2020-04-23 16:57:34 545

原创 python数据爬取

#爬取部分#一:对有标签的内容进行爬取#打开文件out=open(‘d:/分表.csv’,‘w’,newline=’\n’,encoding=‘gb18030’)csv_write=csv.writer(out,dialect=‘excel’)#数据爬取for page in range (1,285):略xpath1=’//*[@id=“problemset”]/tbody’d...

2020-04-23 16:45:55 319

原创 python网页动作模拟

#引入数据包from selenium import webdriverfrom selenium.webdriver.common.action_chains import ActionChainsfrom bs4 import BeautifulSoupimport timeimport csvfrom collections import deque#模拟部分#打开网站dr...

2020-04-23 16:44:27 268

空空如也

空空如也

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

TA关注的人

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