会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Arrokoth
博客园
首页
新随笔
联系
订阅
管理
2020年1月28日
各种预处理命令 笔记 #if #else #elif #define #undef
摘要: #if 要求判断条件为常量表达式,不得包含变量。且返回值为整数。 与 #else #elif #endif 使用。 和 if else 的用法类似。 例如: 1 #include <stdio.h> 2 3 #define M 100 4 5 int main(){ 6 7 #if M==100 8
阅读全文
posted @ 2020-01-28 20:07 Arrokoth
阅读(650)
评论(0)
推荐(0)
2020年1月19日
CF 501B Misha and Changing Handles (map & set)
摘要: http://codeforces.com/problemset/problem/501/B https://vjudge.net/problem/CodeForces-501B#author=fishdog ^▽^神秘的三角洲里还有一个传说中的谜题等你来解开! 三角洲里的小学生小明是个小天才,知天
阅读全文
posted @ 2020-01-19 12:34 Arrokoth
阅读(181)
评论(0)
推荐(0)
UVA 10474 Where is the Marble
摘要: https://vjudge.net/problem/UVA-10474 主要是练习lower_bound 的应用:返回一个迭代器,指向键值为k的第一个元素。而且也很方便的找出排序后需查找的元素的位置。 cin和c里面的输入输出用的话好像不太好,但是不想改了。 1 #include <bits/st
阅读全文
posted @ 2020-01-19 12:04 Arrokoth
阅读(135)
评论(0)
推荐(0)
2020年1月15日
POJ 1088 滑雪 (深搜+DP)
摘要: http://poj.org/problem?id=1088 题目描述: Glory非常喜欢玩滑滑梯游戏,下面给出了一个n,m的滑道,其中的数字表示滑道的高度。Glory可以从一个点出发向下滑行,每次只能滑行到相邻的位置(上下左右)中高度严格低于当前高度的地方,不能重复划行已经滑行过的地方,但他希望
阅读全文
posted @ 2020-01-15 10:56 Arrokoth
阅读(155)
评论(0)
推荐(0)
2020年1月14日
POJ 3414 Pots
摘要: http://poj.org/problem?id=3414 题目描述: 给你两个容器,分别能装下A升水和B升水,并且可以进行以下操作 FILL(i) 将第i个容器从水龙头里装满(1 ≤ i ≤ 2); DROP(i) 将第i个容器抽干 POUR(i,j) 将第i个容器里的水倒入第j个容器(这次操作
阅读全文
posted @ 2020-01-14 22:25 Arrokoth
阅读(177)
评论(0)
推荐(0)
2020年1月12日
HDU 1029 Ignatius and the Princess IV (数据结构)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1029 这道题最容易想到的写法就是用一个数组来记录每个数字出现的次数。但是,如果数的范围大的话就不太友好了,容易超时。 然后一开始做的时候也是很纠结。然后就了解到了这个写法~ 真的很厉害!(题解思路来自灯神~) 这
阅读全文
posted @ 2020-01-12 23:01 Arrokoth
阅读(189)
评论(0)
推荐(0)
2020年1月11日
HDU 1022 Train Problem I
摘要: 写了好久orz。。。 http://acm.hdu.edu.cn/showproblem.php?pid=1022 姑且贴个题目吧。 Train Problem I Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K
阅读全文
posted @ 2020-01-11 23:31 Arrokoth
阅读(189)
评论(0)
推荐(0)
HDU 1263 水果
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1263 第一题就这么的 令 (rang) 人 难 (tu) 忘 (xue)。。。 //有错误请您大力指出,谢谢~ 主要是map的嵌套,定义了一个map < string, map < string, int > >
阅读全文
posted @ 2020-01-11 23:16 Arrokoth
阅读(247)
评论(0)
推荐(0)
2019年12月17日
数塔 HDU 2084
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2084 https://vjudge.net/contest/342215#problem/D 题目描述: 数塔 Time Limit: 1000/1000 MS (Java/Others) Memory Limi
阅读全文
posted @ 2019-12-17 16:55 Arrokoth
阅读(236)
评论(0)
推荐(0)
A Count Task HDU 6480
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6480 https://vjudge.net/contest/342215#problem/G 解题思路: 其实我就是想水个糖,keke 对于这道题,我想到的有两种写法。一种是用数列求和公式,另一种就是用动态规划了
阅读全文
posted @ 2019-12-17 10:42 Arrokoth
阅读(197)
评论(0)
推荐(0)
下一页
公告