上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 46 下一页
摘要: 画几个图就可以发现,经过每个点最少一次的最短路径即使,总边权*2-从x点出发走的一个最长的路径,可以想象成这个最长的路径对应的分支是最后走的,走到了该分支的叶子节点,就满足要求了,就不必回到x点了,​#inclu... 阅读全文
posted @ 2018-10-03 10:59 eason99 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 先将n个物品按价值降序排个序,从头扫到尾,对于每一个物品i,判断能不能在#include#include#includeusing namespace std;const int maxn=1e4+10;stru... 阅读全文
posted @ 2018-10-03 10:51 eason99 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 先将n个物品按价值降序排个序,从头扫到尾,对于每一个物品i,判断能不能在#include#include#includeusing namespace std;const int maxn=1e4+10;stru... 阅读全文
posted @ 2018-10-03 10:51 eason99 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 传送门这题需要确定每种表情的2种形式的优先级,然后直接遍历一遍矩阵即可。两种表情是第二个形式的优先级高/*通过 ^ ^ ^ 和 ^ ^ ^ 可以确定第一种 v v v v v v 通过... 阅读全文
posted @ 2018-09-25 20:17 eason99 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 传送门这题需要确定每种表情的2种形式的优先级,然后直接遍历一遍矩阵即可。两种表情是第二个形式的优先级高/*通过 ^ ^ ^ 和 ^ ^ ^ 可以确定第一种 v v v v v v 通过... 阅读全文
posted @ 2018-09-25 20:17 eason99 阅读(78) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;char s[15];struct node{ int cnt,tag; node*son[26];}*root... 阅读全文
posted @ 2018-09-22 13:43 eason99 阅读(61) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;char s[15];struct node{ int cnt,tag; node*son[26];}*root... 阅读全文
posted @ 2018-09-22 13:43 eason99 阅读(63) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;#define fuck(x) coutcnt=0; tmp->tag=0; memset(tmp->son,0... 阅读全文
posted @ 2018-09-22 13:10 eason99 阅读(90) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;#define fuck(x) coutcnt=0; tmp->tag=0; memset(tmp->son,0... 阅读全文
posted @ 2018-09-22 13:10 eason99 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 传送门 写这题顺便学了下string类里substr的用法substr有2个参数,第一个参数为你需要截取的子串的起始位置的索引(下标),第二个参数为从起始位置开始截取的长度。 这题就用到了substr函数,这... 阅读全文
posted @ 2018-09-19 11:45 eason99 阅读(87) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 46 下一页