上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 31 下一页

2017年8月15日

hdu_1042(模拟大数乘法)

摘要: 计算n! 用大数的模板也可以,不过每次要吧数字转化成字符串,其实还是自己写比较简单,处理一个简单的进位就可以了 下面是板子: 模板转自:http://blog.csdn.net/u012860063/article/details/36903491 阅读全文

posted @ 2017-08-15 16:45 若流芳千古 阅读(166) 评论(0) 推荐(0) 编辑

2017年8月14日

hdu_1041(Computer Transformation) 大数加法模板+找规律

摘要: Computer Transformation Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8367 Accepted Submission( 阅读全文

posted @ 2017-08-14 08:38 若流芳千古 阅读(223) 评论(0) 推荐(0) 编辑

2017年8月13日

http://acm.hdu.edu.cn/showproblem.php?pid=1039(水~)

摘要: 判读条件 1:有元音字母 2:不能三个连续元音或辅音 3.不能连续两个相同的字母,除非ee或oo 阅读全文

posted @ 2017-08-13 09:17 若流芳千古 阅读(208) 评论(0) 推荐(0) 编辑

2017年8月12日

hdu_1036(取整和格式控制)

摘要: 题意很简单,求平均时间 复习一下如何取整 (int) fl 是直接向下取整 == floor(fl) 向上取整 (int)(fl+1) == ceil(fl) 四舍五入 (int)(fl+0.5) 技巧:输入时候决定什么时候读入int,什么时候读入char有时候可以省很多事情 代码: 阅读全文

posted @ 2017-08-12 09:25 若流芳千古 阅读(159) 评论(0) 推荐(0) 编辑

2017年8月10日

hdu_1034(模拟题)

摘要: 很久没有打模拟题了,再次总结一下模拟题的做法: 仔细分析题意,弄清楚过程 理清楚模拟步骤,严格按照步骤编写代码 添加中间输出测试每步结果 虽然这是一个很简单的水题,但是没有松哥帮忙还是卡了很久,因为没有做好第一步,题目中是老师先吹哨,然后一圈所有同学同事将自己现有糖的一般分给下一个同学,结束后老师将 阅读全文

posted @ 2017-08-10 08:18 若流芳千古 阅读(166) 评论(0) 推荐(0) 编辑

2017年8月9日

hdu_1037(水题水疯了。。。史上最水)

摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 int main() 6 { 7 int a[3]; 8 while(~scanf("%d%d%d",&a[0],&a[1],&a[2])) 9 { 10 sort(a,a+3); 11 if(a[0]>16... 阅读全文

posted @ 2017-08-09 16:49 若流芳千古 阅读(92) 评论(0) 推荐(0) 编辑

hdu_1033(我怎么找到的这么水的题,只为保存代码。。。)

摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const int Max = 250; 7 int ansx[Max],ansy[Max]; 8 //0,1,2,3表示方向,顺时针标注 9 void ans(int tx,int ty, int dir,int id) 10 { 11 ... 阅读全文

posted @ 2017-08-09 16:39 若流芳千古 阅读(127) 评论(0) 推荐(0) 编辑

2017年8月8日

hdu_1030(数学题+找规律)

摘要: 规律就是两个数字的level差+left差+right差 代码: 阅读全文

posted @ 2017-08-08 15:52 若流芳千古 阅读(176) 评论(0) 推荐(0) 编辑

2017年7月21日

hdu_1029_hash/map

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1029 太水了,一次过,直接上代码吧,只想说最愚蠢的hash都要比map快! 阅读全文

posted @ 2017-07-21 10:41 若流芳千古 阅读(139) 评论(0) 推荐(0) 编辑

hdu_1031_结构体排序

摘要: 题目很好理解,将列求和,取前k大的 我的代码思路:对列求和,后取出前k大的id加入结果数组,对比后面和第k大相同的评分id也加入到结果数组,最后对结果数组排序 代码: (有一种wa的痛叫忘记数组初始化) 下面是看了大神的代码,原来自己想复杂了,直接对结构体进行两次排序即可 get一种新方法,记录代码 阅读全文

posted @ 2017-07-21 10:36 若流芳千古 阅读(157) 评论(1) 推荐(0) 编辑

上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 31 下一页

导航