![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hdoj
ccczxacxzxcz
Be low.
展开
-
[HDOJ] 1003.Max Sum
1003.Max Sum (c++) Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this seque...原创 2018-08-27 11:23:21 · 97 阅读 · 0 评论 -
[HDOJ] 2026.Max Sum
2026.Max Sum (c++) Problem Description Consider the aggregate An= { 1, 2, …, n }. For example, A1={1}, A3={1,2,3}. A subset sequence is defined as a array of a non-empty subset. Sort all the subset...原创 2018-08-27 21:59:19 · 101 阅读 · 0 评论 -
[HDOJ] 1753.大明A+B (大数加法)
Problem Description 话说,经过了漫长的一个多月,小明已经成长了许多,所以他改了一个名字叫“大明”。 这时他已经不是那个只会做100以内加法的那个“小明”了,现在他甚至会任意长度的正小数的加法。 现在,给你两个正的小数A和B,你的任务是代表大明计算出A+B的值。 Input 本题目包含多组测试数据,请处理到文件结束。 每一组测试数据在一行里面包含两个长度不大于400的正小...原创 2018-09-08 13:16:11 · 114 阅读 · 0 评论 -
[HDOJ] 1172.猜数字
Problem Description 猜数字游戏是gameboy最喜欢的游戏之一。游戏的规则是这样的:计算机随机产生一个四位数,然后玩家猜这个四位数是什么。每 猜一个数,计算机都会告诉玩家猜对几个数字,其中有几个数字在正确的位置上。比如计算机随机产生的数字为1122。如果玩家猜 其中一个在正确的位置。如果玩家猜1111,那么计算机会告诉他猜对2个数字,有2个在正确的位置。 现在给你一段game...原创 2018-09-03 20:40:05 · 317 阅读 · 0 评论 -
HDU 1253. 胜利大逃亡
BFS,遍历过程对每个节点记录步数 #include <bits/stdc++.h> using namespace std; typedef long long ll; int maze[50][50][50]; int dir[6][3] = {1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1}; int a = 0, ...原创 2019-04-13 14:33:11 · 91 阅读 · 0 评论 -
hdu 2089.不要62 (数位DP)
题目 第一次了解数位dp,看的这篇博文 #include <bits/stdc++.h> using namespace std; typedef long long ll; int dp[10][2]; int uplimit[10]; int dfs(int pos, int pre, int state, bool limit) { if (pos == -1) ...原创 2019-04-18 11:36:25 · 90 阅读 · 0 评论