
模拟
L-qf
这个作者很懒,什么都没留下…
展开
-
HDU-1032The 3n + 1 problem
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1032注意:输入不一定保证第一个数就比第二个数小,数据较弱,直接暴力!#include<cstdio>#include<iostream>#define N 1000005using namespace std;int fun(int a,int b) { i...原创 2018-08-15 15:52:41 · 218 阅读 · 0 评论 -
HDU-5873 Football Games(思维题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5873#include<cstdio>/*得分从小到大排序,对于当前i,与之前的i-1支队伍比赛完之后,所有的比赛的总得分至少是(i-1)*i每场比赛都产生2分,打了(i-1)*i/2场,也就是i*(i-1)分最后n场的总分为n*(n-1)*/#include<i...原创 2018-08-22 11:11:12 · 263 阅读 · 0 评论 -
HDU-2526 浪漫手机(下一行的每个字符由上一行的顶部三个决定,)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2526思路: 自己找出范围是m<=1000,每行的左右都是0,但是不能输出,上一行的字符决定下一行。#include<cstdio>#include<iostream>#include<cstring>using namespace std;i...原创 2018-08-23 11:40:57 · 192 阅读 · 0 评论