
ACM邀请赛题目
跟着大牛们的脚步做次邀请赛
Joyyiwei
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
FZU - 2039 Pets (二分图匹配 2011年全国大学生程序设计邀请赛(福州))
DescriptionAre you interested in pets? There is a very famous pets shop in the center of the ACM city. There are totally m pets in the shop, numbered from 1 to m. One day, there are n customers in原创 2014-07-15 11:30:54 · 1643 阅读 · 0 评论 -
HDU - 4734 F(x) (2013成都网络赛,数位DP)
题意:求0-B的满足思路:数位DP,记忆化搜索#include #include #include #include using namespace std;int A, B;int dp[20][200000];int bit[20];int dfs(int cur, int num, int flag) { if (cur == -1) return num原创 2014-07-10 15:58:35 · 1441 阅读 · 0 评论 -
HDU 4856 Tunnels
题意:求经过所有的管道的最短路程,管道内的时间不算思路:首先BFS处理出管道出口到其他管道入口的距离,然后在队友的指导下明白了状态转移#include #include #include #include #include using namespace std;const int MAXN = 16;const int INF = 0x3f3f3f3f;struct N原创 2014-07-08 19:43:34 · 1280 阅读 · 0 评论 -
HDU - 4054 Hexadecimal View (2011 Asia Dalian Regional Contest)
题意:按要求输出,第一列是表示第几行,每行只能有16个字节的字母,第二列是16进制的ASCII码,第三列大小写转换思路:纯模拟,注意字母的十六进制是2位#include #include #include #include using namespace std;const int MAXN = 5000;char str[MAXN];int main() { whil原创 2014-07-01 11:29:10 · 1560 阅读 · 0 评论 -
北京邀请赛 H. Happy Reversal
题意:给你一些二进制的数,然后你可以选择按位取反,也可以不变,你只能选择一种,然后让你找出最大和最小,求最大的差值思路:将取反与不取反都算出来,然后大的放一边,小的放一边,排序后判断#include #include #include #include #define ll long longusing namespace std;const int MAXN = 100010;原创 2014-05-30 10:59:24 · 1231 阅读 · 0 评论 -
北京邀请赛 B. Beautiful Garden
题意:给你坐标和n个点,求最少移动的点使得n个点成等差数列思路:既然要成等差数列,那么最起码有两个点是不动的,然后枚举这两个点中间的点的个数,最近水的要死,看了队友的代码做的#include #include #include #include #include #include using namespace std;const double eps = 1e-9;con原创 2014-05-30 15:03:46 · 1146 阅读 · 0 评论 -
HDU - 4813 Hard Code (长春赛区水题)
DescriptionSome strange code is sent to Da Shan High School. It's said to be the prophet's note. The note is extremely hard to understand. However, Professor Meng is so smart that he successfully原创 2014-05-31 11:21:22 · 1952 阅读 · 0 评论 -
HDU - 4814 Golden Radio Base (长春赛区B题)
DescriptionGolden ratio base (GRB) is a non-integer positional numeral system that uses the golden ratio (the irrational number (1+√5)/2 ≈ 1.61803399 symbolized by the Greek letter φ) as its base.原创 2014-05-31 20:54:26 · 2026 阅读 · 0 评论 -
HDU - 4815 Little Tiger vs. Deep Monkey (长春赛区C题)
题意:有A,B两个人,n道题目,每题有对应的分数,B答对题目的概率是0.5,求A不输给B的概率不小于P要拿的最低分数思路:DP,dp[i][j]来表示B答了前i题后分数为j的概率,,然后通过B的概率求A的最低分数#include #include #include #include using namespace std;const int MAXN = 40010;int a[原创 2014-06-01 17:48:29 · 1220 阅读 · 0 评论 -
HDU - 4821 String (长春赛区I题)
题意:求有多少个子串满足条件:1. 长度为M*L2. 每个长度为L的小子串不能都完全相同的情况思路:当时没做出来,HASH处理,看了个思路是:hash方法 设一个种子base 打表出nbase[i]表示base的i次方从S最后一个字符开始打表 hash[i]=hash[i+1]*base+str[i]-'a'+1 即将i位以后的串hash成一个unsigned long原创 2014-06-03 19:27:22 · 1187 阅读 · 0 评论 -
HDU - 4788 Hard Disk Drive (成都邀请赛H 水题)
HDU - 4788Hard Disk DriveTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u[Submit] [Go Back] [Status] Description Yesterday your dear cou原创 2014-06-04 14:49:38 · 1507 阅读 · 0 评论