自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 九度OJ学习笔记 题目1088

//剩下的树,每棵树只能被移走一次,则用hash数组解决问题 #include<iostream> #include<string.h> using namespace std; int tree[10001]; int main(){ int L,M; int x,y;//移走树的区间[x,y] while(cin>>L>&gt...

2019-01-22 10:44:06 188

原创 九度OJ学习笔记 题目1126

#include using namespace std; void jz(int k){ while(cin>>k){//k为数组元素数量 int buf[81]; int no[81]; int p=0; for(int i=0;i<k;i++){ cin>>buf[i]; } for(int j=0;j<k;j++){

2017-03-21 09:00:42 313

原创 九度OJ学习笔记 题目1156

#include using namespace std; int main(){ //先录入读书情况,N表示要录入N个读者,M表示图书编号最大为M(编号要从1开始) //最后的输出:每一行对应一个读者。故有N行,每行表示与该读者喜欢图书一样的,即输入的图书编号有几个与该读者的标号相同 int M,N;//N个读者,M本书 while(cin>>N>>M){ int book[20

2017-03-18 22:30:40 298

原创 九度OJ学习笔记 题目1070

#include using namespace std; #define ISYEAP(x) x%100!=0 && x%4==0||x%400==0 ? 1:0 int dayofMonth[13][2]={ 0,0,31,31,28,29,31,31,30,30,31,31,30,30,31,31,31,31,30,30,31,31,30,30,31,31}; struct date{ i

2017-03-02 09:35:54 492

原创 九度OJ学习笔记 题目1186

//方法一:需要预处理 #include #include using namespace std; #define ISYEAP(x) x%100!=0 && x%4==0||x%400==0 ?1:0 int dayofMonth[13][2]={0,0,31,31,28,29,31,31,30,30,31,31,30,30,31,31,31,31,30,30,31,31,30,30,31

2017-03-02 09:21:54 470

原创 九度OJ学习笔记 题目1096

#include #include using namespace std; #define ISYEAP(x) x%100!=0 && x%4==0|| x%400==0?1:0 //定义宏判断是否为闰年,方便计算每月天数 int dayofMonth[13][2]={//月份从1开始 ,宏判断0,1 0,0, 31,31, 28,29, 31,31, 30,30, 31,31, 30,30

2017-02-28 19:46:35 464

原创 九度OJ学习笔记 题目1054

方法一:用char数组 #include #include #include using namespace std; int main(){ char s[201]; while(cin>>s){ int l=strlen(s); sort(s,s+l); for(int i=0;i<l;i++){ cout<<s[i]; } cout<<endl; } retu

2017-02-12 16:40:11 373

原创 九度OJ学习笔记 题目1023

#include&lt;stdio.h&gt; #include&lt;algorithm&gt; #include&lt;string.h&gt; using namespace std; struct student{ char num[7]; char name[9]; int score; }buf[100001]; bool cmp1(student a,student b){ ...

2017-02-12 12:41:47 646

空空如也

空空如也

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

TA关注的人

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