07 2017 档案

2013 ACM/ICPC Asia Regional Hangzhou Online
摘要:A 求最小的桥 #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; #define inf 1e9+7 #define MAXN 1010 int head[MAXN],cnt,time; int 阅读全文

posted @ 2017-07-30 14:34 HelloWorld!--By-MJY 阅读(246) 评论(0) 推荐(0)

2013 ACM/ICPC Asia Regional Chengdu Online
摘要:C 模拟 #include <iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; #define ll long long const int MAXN=100+5; const 阅读全文

posted @ 2017-07-30 14:18 HelloWorld!--By-MJY 阅读(194) 评论(0) 推荐(0)

多校 2013 10
摘要:I 求n的整数拆分有多少方法 2^(n-1) n太大 欧拉降幂+快速幂 #include<stdio.h> #include<algorithm> #include<string.h> using namespace std; typedef long long ll; #define inf 1e 阅读全文

posted @ 2017-07-30 14:06 HelloWorld!--By-MJY 阅读(129) 评论(0) 推荐(0)

多校 2013 8
摘要:F 给你ABC三个串 让你求D串 D是AB的子序列 C是D的子串 求D的长度 求出C在AB中出现的位子记录开始位子和结束位子 n^2 枚举在A中位子和在B中位子 然后得到AB 开始位子之前的lcs 和AB结束位子的lcs 开始预处理一下lcs #include <iostream> #include 阅读全文

posted @ 2017-07-30 13:46 HelloWorld!--By-MJY 阅读(138) 评论(0) 推荐(0)

多校 2013 7
摘要:F n 个服务器 m个数据库 要求是一个服务器坏了 其他服务器调用的次数之差小于=1 要的是数据库调用服务器的序列 重要的是 前 2 列 第一列 1 ~n 一直循环 第二列 就要2种情况分类 n>=m 放n 否则 n~1循环 #include<stdio.h> #include<string.h> 阅读全文

posted @ 2017-07-19 15:18 HelloWorld!--By-MJY 阅读(117) 评论(0) 推荐(0)

多校 2013 6
摘要:A n 然后n个数字 要求组合成的段数最大 低高 低高 ... (a *b -a) *(s/(ab)) #include<stdio.h> #include<string.h> #include<algorithm> #include<deque> #include<set> #include<ma 阅读全文

posted @ 2017-07-19 15:06 HelloWorld!--By-MJY 阅读(119) 评论(0) 推荐(0)

多校 2013 5
摘要:E n 个点 m条边 然后n个点权 m条边 边权 A B 2 个人 每个人每次取一个点 都让自己分数大 如果一个人同时取到了一条边的2点 那么这条边权也是他的 具体的做法是把边权拆成一半 然后分给2个点 然后按点权排序 如果变不在同一个人身上 那么会被减掉 #include<stdio.h> #in 阅读全文

posted @ 2017-07-19 14:45 HelloWorld!--By-MJY 阅读(156) 评论(0) 推荐(0)

多校 2013 4
摘要:A 区间DP #include<stdio.h> #include<string.h> #include<algorithm> #include<string> #include<iostream> using namespace std; #define MAXN 1009 #define inf 阅读全文

posted @ 2017-07-13 19:47 HelloWorld!--By-MJY 阅读(154) 评论(0) 推荐(0)

多校 2013 3
摘要:B hash 把字符串看成数字插进去 #include<stdio.h> #include<string.h> using namespace std; #define SEED 13331 #define MAXN 2007 #define HASH 10007 int head[HASH]; i 阅读全文

posted @ 2017-07-13 19:39 HelloWorld!--By-MJY 阅读(130) 评论(0) 推荐(0)

多校2013 2
摘要:A lcm(A,B)显然是循环节 然而仅仅这样不行 还有一点规律 #include <iostream> #include <cstdio> #include <cmath> #include <map> #include <algorithm> #include <cstring> #includ 阅读全文

posted @ 2017-07-13 19:31 HelloWorld!--By-MJY 阅读(126) 评论(0) 推荐(0)

多校 2013 1
摘要:HDU 4602 C 求n 的分解方式 k 出现了几次 先把 n 分解成 n个1 然后考虑 1 k 在边上 2*2^(n-k-1) 2 k 在中间 左边 t1 右边t2 个1 那么就是 2^(t1-1)*2^(t2-1)*(n-k-1) 加起来就是 有些特殊的判断下 #include <iostre 阅读全文

posted @ 2017-07-08 16:04 HelloWorld!--By-MJY 阅读(154) 评论(0) 推荐(0)

2013腾讯编程马拉松初赛第4,5场
摘要:HDU 4520 A 直接模拟 #include <iostream> #include <cstdio> #include <cmath> #include <map> #include <algorithm> #include <cstring> #include <string> #inclu 阅读全文

posted @ 2017-07-04 20:09 HelloWorld!--By-MJY 阅读(141) 评论(0) 推荐(0)

2013腾讯编程马拉松初赛第2场
摘要:A HDU 4510 直接模拟 #include <iostream> #include <cstdio> #include <cmath> #include <map> #include <algorithm> #include <cstring> #include <string> #inclu 阅读全文

posted @ 2017-07-03 15:56 HelloWorld!--By-MJY 阅读(149) 评论(0) 推荐(0)

codeforces 的20道C题
摘要:A - Warrior and Archer CodeForces - 595C n 偶数 然后n个数字 A B 轮流取一个 A让差变小B让差变大 直到最后2 个 求的是最小剩下的差 最后剩下的 L R 相距 n/2 求一下最小的就行 #include <iostream> #include <cs 阅读全文

posted @ 2017-07-02 19:58 HelloWorld!--By-MJY 阅读(550) 评论(0) 推荐(0)

2013腾讯编程马拉松初赛第0,1场
摘要:HDU4500 直接模拟 #include <iostream> #include <cstdio> #include <cmath> #include <map> #include <algorithm> #include <cstring> #include <string> #include< 阅读全文

posted @ 2017-07-02 19:08 HelloWorld!--By-MJY 阅读(170) 评论(0) 推荐(0)

导航