#include #include #define offset 500000 bool isinput[1000001]; int main(){ int n,m; while(scanf("%d %d",&n,&m)!=EOF){ memset(isinput,0,sizeof(isinput)... ...
分类:
其他好文 时间:
2017-06-24 20:49:38
阅读次数:
136
利用日期类的nextday(); 或者先加一个月的天数,然后判断是否大于给定天数,然后再加一个月的天数,在判断.... ...
分类:
其他好文 时间:
2017-06-24 17:27:05
阅读次数:
124
选择参考点,0年1月1日(认为是闰年)。日期a,日期b,算出abs((a-0)-(b-0)).视情况加1,若连续的日期视为两天,则res=abs((a-0)-(b-0))+1 . ...
分类:
其他好文 时间:
2017-06-24 15:30:41
阅读次数:
237
#include #include #include using namespace std; int mypow(int k){ int res=1; while(k--){res*=10;} return res; } int main(){ int sum; int a,b,k; while(... ...
分类:
其他好文 时间:
2017-06-22 00:10:49
阅读次数:
137
通过两种遍历结果重建,必须有中序遍历(找到根的位置)。 ...
分类:
其他好文 时间:
2017-06-21 21:10:00
阅读次数:
180
#include #include #include using namespace std; struct Student{ char name[105]; int grade; int age; }student[1005]; bool cmp(Student a,Student b){ if(... ...
分类:
其他好文 时间:
2017-06-21 21:05:38
阅读次数:
159