摘要: 标签: hihocoder 描述 周末,小Hi和小Ho所在的班级决定举行一些班级建设活动。 根据周内的调查结果,小Hi和小Ho一共列出了N项不同的活动(编号1..N),第i项活动能够产生a[i]的活跃值。 班级一共有M名学生(编号1..M),邀请编号为i的同学来参加班级建设活动需要消耗b[i]的活跃 阅读全文
posted @ 2018-05-16 16:38 sciorz 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 标签: codeforces A.Game code cpp include include include include include using namespace std; const int maxn=100050; const int MOD=1e9+7; char a[150][15 阅读全文
posted @ 2018-05-16 15:35 sciorz 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 标签: codeforces 题目链接 http://codeforces.com/contest/979 A.Pizza, Pizza, Pizza!!! B.Treasure Hunt C.Kuro and Walking Route cpp include include include in 阅读全文
posted @ 2018-05-15 09:52 sciorz 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 标签: 二分 倍增 差分 LCA 题目描述   公元 2044 年,人类进入了宇宙纪元。 L 国有 n 个星球,还有 n 1 条双向航道,每条航道建立在两个星球之间,这 n 1 条航道连通了 L 国的所有星球。 小 P 掌管一家物流公司,该公司有很多个运输计划,每个运输计划形如: 阅读全文
posted @ 2018-05-14 21:48 sciorz 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 标签: hihocoder 网络流 二分图 描述 学校的秋季运动会即将开始,为了决定参赛人员,各个班又开始忙碌起来。 小Hi和小Ho作为班上的班干部,统计分配比赛选手的重任也自然交到了他们手上。 已知小Hi和小Ho所在的班级一共有N名学生(包含小Hi和小Ho),编号依次为1..N。 运动会一共有M项 阅读全文
posted @ 2018-05-14 19:53 sciorz 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 标签: nowcoder 传送门 https://www.nowcoder.com/acm/contest/112 question A.最小化价格 贪心做的。贪心策略:从价格最低的开始分配,然后对于每个地点把它所能容纳的最大的队伍分配给他。(PS:看到钰神的贪心策略是这样的,从人数最多的队伍开始分 阅读全文
posted @ 2018-05-12 23:00 sciorz 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 标签: 最大独立集 最小路径覆盖 题目描述 In this problem, we would like to talk about unreachable sets of a directed acyclic graph G = (V, E). In mathematics a directed 阅读全文
posted @ 2018-05-10 21:25 sciorz 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 标签: codeforces A. Links and Pearls 代码 expand cpp include include using namespace std; typedef long long ll; const ll MOD=1e9+7; char a[4][120]; int ma 阅读全文
posted @ 2018-05-09 13:28 sciorz 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 标签: DP [题目链接][1] [1]: http://codeforces.com/contest/977/problem/F 分析 虽然是不难的dp,但是放在F题的位置以为很难,我还是想复杂了结果搞了好久才搞出来,而且还遇到了 的坑。CF上有组数据专门卡 然后就tle了。 因为 是hash存储 阅读全文
posted @ 2018-05-08 11:44 sciorz 阅读(172) 评论(0) 推荐(1) 编辑
摘要: 2018山东省赛回忆与总结 标签: ACM省赛 总结 真的没想到会打得这么烂。 比赛过程 开场前我们就决定好队长看a d,田大佬看e g,而我看h j。 开场之后,我看了h,i并没有想到思路,然后j题还没有看懂题意,队长就过掉了c。然后田大腿告诉我f题可做,而且当时有三四个队已经过掉了。我看了下题意 阅读全文
posted @ 2018-05-07 13:30 sciorz 阅读(436) 评论(0) 推荐(0) 编辑
摘要: Equal Numbers 标签:Eratosthenes筛法 题目描述 You are given a list of n integers a1,...,an. You can perform the following operation: choose some ai and multipl 阅读全文
posted @ 2018-04-28 17:30 sciorz 阅读(377) 评论(0) 推荐(0) 编辑
摘要: Bob and Alice are playing a new game. There are n boxes which have been numbered from 1 to n. Each box is either empty or contains several cards. Bob 阅读全文
posted @ 2018-04-27 15:55 sciorz 阅读(195) 评论(0) 推荐(0) 编辑
摘要: UPC 5130 Concerts 标签:动态规划 Description John enjoys listening to several bands, which we shall denote using A through Z. He wants to attend several conc 阅读全文
posted @ 2018-04-27 00:04 sciorz 阅读(195) 评论(0) 推荐(0) 编辑
摘要: poj 1079 Calendar Game 标签:SG函数 博弈 Description Adam and Eve enter this year’s ACM International Collegiate Programming Contest. Last night, they played 阅读全文
posted @ 2018-04-26 15:53 sciorz 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 2018 ACM ICPC 中国大学生程序设计竞赛线上赛 [TOC] A. Death is end 留坑 B.Goldbach 题意 每次给一个偶数$n(n 从n的$\frac{1}{2}$往两边判素数,使用Miller Rabin随机性素数测试方法。 (ps:自己写了一个虽然过了,但是会被Car 阅读全文
posted @ 2018-04-23 23:50 sciorz 阅读(2238) 评论(0) 推荐(0) 编辑