上一页 1 ··· 4 5 6 7 8
  2016年4月21日
摘要: //hdu 2133 what day is it//题意:给一个日期计算是周几//再次我采用从该日期到1年1月1日有多天,这时候y年以前比较好算,即(y-1)*365+(y-1)/4-(y-1)/100+(y-1)/400,(x/4-x/100+x/400),这样是直接计算出日期,要是你选择跑循环 阅读全文
posted @ 2016-04-21 23:11 南风丶丶 阅读(205) 评论(0) 推荐(0) 编辑
摘要: //poj 2080//题目大意:给定天数,从2000年1月1日经过这些天后的 年 月 日 及 星期几//代码参照大牛的写的,本人还是处于菜鸟阶段,思路很好#include<stdio.h> #include<string.h> #include<stdlib.h> #include<ctype.h 阅读全文
posted @ 2016-04-21 16:33 南风丶丶 阅读(434) 评论(0) 推荐(0) 编辑
摘要: //HDU 2072//这个字符串题目错了n多次,有种想哭的感觉,这里我对字符串做了预处理,就是在字符串尾部加一个空格' '最后别忘了在再加一个'\0',这样一来好处理一些#include<stdio.h> #include<string.h> #include<stdlib.h> #include 阅读全文
posted @ 2016-04-21 14:39 南风丶丶 阅读(140) 评论(0) 推荐(0) 编辑
  2016年4月19日
摘要: //zznu 1562//用数组模拟乘法计算的过程 #include<iostream> #include<stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> #include<ctype.h> #include<algor 阅读全文
posted @ 2016-04-19 16:36 南风丶丶 阅读(204) 评论(0) 推荐(0) 编辑
摘要: //zzuli 1877//关于区间覆盖很巧妙地一种用法, 这是参考一位大牛的博客写的, 目前本人还是处于菜鸟阶段。。。#include<iostream> #include<stdio.h> #include<string.h> #include<stdlib.h> #include<math.h 阅读全文
posted @ 2016-04-19 13:56 南风丶丶 阅读(109) 评论(0) 推荐(0) 编辑
摘要: //HDU 1286#include<iostream> #include<stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> #include<ctype.h> #include<algorithm> using name 阅读全文
posted @ 2016-04-19 00:22 南风丶丶 阅读(127) 评论(0) 推荐(0) 编辑
摘要: //HDU 1878 欧拉回路//非并查集写法,欧拉回路的限制条件:1.应该是一个一个连通图 // 2.每一个点应该是有偶数个点和它相连。二者都满足就是一个欧拉回路#include<stdio.h> #include<stdlib.h> #include<string.h> #define N 11 阅读全文
posted @ 2016-04-19 00:08 南风丶丶 阅读(242) 评论(0) 推荐(0) 编辑
  2016年4月18日
摘要: //zzuli 18781. #include #include #include #include #include #include #include using namespace std; #define N 1010000 #define INF 0x3f3f3f3f int yearday[N]; int IsLeap(int year) { return ((year%... 阅读全文
posted @ 2016-04-18 19:14 南风丶丶 阅读(228) 评论(0) 推荐(1) 编辑
  2016年4月3日
摘要: #include<stdio.h> #include<string.h> #include<stdlib.h> #include<ctype.h> #include<math.h> #define N 1010 char s1[N], s2[N]; int a[N], b[N], c[N]; int 阅读全文
posted @ 2016-04-03 23:58 南风丶丶 阅读(199) 评论(0) 推荐(0) 编辑
摘要: ***今天发现一个很有趣的是,这道题应该几个月前就会了,但是一次比赛中总是WA,果断C++提交,然后就过了,然后就很无语了,G++不让过C++能过,今天又交一遍发现把队列定义为全局变量就都能过了,至于原理,不懂....*** 阅读全文
posted @ 2016-04-03 13:20 南风丶丶 阅读(198) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8