题目链接:https://vjudge.net/problem/HDU-1176 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以ga ...
分类:
其他好文 时间:
2020-05-31 19:55:08
阅读次数:
55
“科林明伦杯”哈尔滨理工大学第十届程序设计竞赛(同步赛) 换根来一波 https://ac.nowcoder.com/acm/contest/5758/A #include<iostream> #include<algorithm> #include<cstring> using namespace ...
分类:
其他好文 时间:
2020-05-31 18:06:22
阅读次数:
66
题目链接:https://vjudge.net/problem/HDU-1069 A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the ...
分类:
其他好文 时间:
2020-05-30 13:06:28
阅读次数:
65
题意:给你两个字符串s1,s2,让你寻找最长s1前缀和s2后缀的匹配长度,若长度大于0,且输出最长匹配s1前缀。 #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace st ...
分类:
其他好文 时间:
2020-05-30 01:32:37
阅读次数:
72
本系列文章将于2021年整理出版,书名《算法竞赛专题解析》。 前驱教材是:《算法竞赛入门到进阶》(京东 当当 ) 清华大学出版社。 如有建议,请联系:(1)QQ 群,567554289;(2)作者QQ,15512356 1、引子 提到状态压缩DP时,常常用Hamilton问题作为引子。 最短Hami ...
分类:
编程语言 时间:
2020-05-30 00:59:33
阅读次数:
77
题目链接 #题目大意 查询有多少对(x,y),使得x到y至少存在一条路径,路径上的边权值最大值不超过L。 #解题思路 从小到达依次枚举各个边,就能得到若干个图,图里的每条边都不大于当前的最大边(废话)。但是问题在于如何求出每次新加入一条边之后的点的对数,因为所有的边不一定是全都连接一起的。 如果一条 ...
分类:
其他好文 时间:
2020-05-29 23:01:22
阅读次数:
59
拯救大兵瑞恩 思路:钥匙种类p = 10,我们可以拥有不同种类钥匙,通过这个我们可以把图分成2^p层,表示拥有不同种类钥匙的情况。 #include <iostream> #include <vector> #include <cstdio> #include <cstring> #include ...
分类:
其他好文 时间:
2020-05-29 13:34:32
阅读次数:
49
http://acm.hdu.edu.cn/showproblem.php?pid=2689 #include<bits/stdc++.h> #define low(x) (x&(-x)) using namespace std; const int maxn=1e5+5; typedef long ...
分类:
编程语言 时间:
2020-05-28 13:40:31
阅读次数:
88
A题王博文: https://blog.csdn.net/Kotsg/article/details/106396949 E题 苏用: https://www.cnblogs.com/yishuda/p/12977527.html F题 徐光旭: https://blog.csdn.net/xgx9 ...
分类:
其他好文 时间:
2020-05-28 13:12:32
阅读次数:
81
https://ac.nowcoder.com/acm/problem/20861 #include<bits/stdc++.h> #define low(x) (x&(-x)) using namespace std; const int N=1e5+5; typedef long long ll ...
分类:
编程语言 时间:
2020-05-28 11:36:20
阅读次数:
78