
codefoces 个人赛水题记录
文章平均质量分 92
axuhongbo
这个作者很懒,什么都没留下…
展开
-
区间dp||记忆化搜索 Game of Sum UVA - 10891 or Light OJ 1031---Easy Game(区间DP)
区间dp||记忆化搜索 Game of Sum UVA - 10891 or Light OJ 1031---Easy Game(区间DP)原创 2017-11-29 11:37:55 · 241 阅读 · 0 评论 -
UVALive - 4882 Parenthesis 表达式处理、字符串处理、栈
4882 - Parenthesis Time limit: 3.000 seconds To a computer, there is no difference between the expression (((x)+(y))(t)) and(x+y)t; but, to a human, the latter is easier to read. When writing automa原创 2018-01-23 14:30:52 · 210 阅读 · 0 评论 -
差分约束模板 UVALive 4885 Task
题目链接 参考博客 差分约束算法学习: 夜深人静写算法 模板 建图方法In most recipes, certain tasks have to be done before others. For each task, if we are given a list of other tasks that it depends on, then it is relatively原创 2018-01-23 19:25:02 · 268 阅读 · 0 评论 -
dfs求球队当前的最好成绩和最坏成绩 Soccer UVALive - 4887
题目链接 In soccer, there are many different rewards (and punishments) depending on how you rank in the league at the end of a season. For example, in the British Premier League, the top 4 teams are eli原创 2018-01-23 20:19:07 · 296 阅读 · 0 评论 -
XOR Matrix 组合数学
XOR Matrix 题意,给出n个数,交替运算m-1次,求出最后结果,o运算法则为a[1][x] = a[0][x]^a[0][x+1](x 从1~n) 题解地址 需要注册账号才能看,题解中讲解的十分详细,首先利用一项一项合并发现第x行都可以化成只与第一行有关系,通过找规律可以发现第1行的元素项出现正好次组合数c(i,n),根据异或运算的性质x^x = 0,将杨辉三角对2取模后,可得最原创 2018-01-25 09:16:44 · 370 阅读 · 0 评论 -
ACM-ICPC 2017 Asia Xi'an LOL dfs剪枝|dp
题目链接5 friends play LOL together . Every one should BAN one character and PICK one character . The enemy should BAN 55 characters and PICK 55 characters . All these 2020 heroes must be different .E原创 2018-01-25 14:59:24 · 970 阅读 · 0 评论 -
[HackerRank-pairs-again] Satisfactory Pairs
题目链接 找出符合题目要求的a b 的个数(a 使得对于任意x,y每个a,b数对至少有一个解#include#include#include#include#include#includeusing namespace std;vectorint>o[310000];int n;const int maxn =310000;int vis[maxn];int m原创 2018-01-25 15:31:58 · 266 阅读 · 0 评论 -
Xor Sum AtCoder - 2272 dp 转移方程
参考博客 题目链接 题解 建议翻译成英文看You are given a positive integer N. Find the number of the pairs of integers u and v (0≦u,v≦N) such that there exist two non-negative integers a and b satisfying a xor b=u and原创 2018-01-26 10:36:34 · 792 阅读 · 2 评论 -
UESTC 1544 当咸鱼也要按照基本法 组合数学
题目链接 参考博客 此题还出自 玲珑学院 1138 震惊,99%+的中国人都会算错的问题 【容斥】【技巧】DESCRIPTION 众所周知zhu是一个大厨,zhu一直有自己独特的咸鱼制作技巧. tang是一个咸鱼供应商,他告诉zhu在他那里面有N条咸鱼(标号从1到N)可以被用来制作.每条咸鱼都有一个咸鱼值Ki,初始时所有Ki都是0 zhu是一个特别的人,他有M个咸数原创 2018-01-26 11:07:31 · 403 阅读 · 0 评论 -
SDUT 2018 Winter Individual Contest - 5
比赛链接 A: 水题,读懂题意即可 code:#include#include#include#include#include#includeusing namespace std;int main(){ string u; int t; cin>>t; int sum = 2; while(t--) {原创 2018-01-28 17:53:05 · 249 阅读 · 0 评论 -
SDUT 2018 Winter Individual Contest - 1
SDUT 2018 Winter Individual Contest - 1 https://cn.vjudge.net/contest/207904#problem/A A 尺取法经典入门 题意:找一段最长的区间,该区间内的元素种类个数小于等于k#includeusing namespace std;const int maxn= 1e6+7;int a[maxn];in原创 2018-01-20 09:18:17 · 289 阅读 · 0 评论 -
CodeChef - GRAPHCT Graph Counting+
题目链接A 题意分析:n条直线将地图切成多个块,起点终点都在块上,问从起点到终点,最少要走多少步?(有公共边的块认为是相邻的块)解题思路:猜想:A、B两点间的线段与多少条直线相交,就是我们需要走的步数。即:步数 = 与线段相交的直线条数(直接搜题解的朋友,建议看到这里就自己去实现一方,或者自己去证明下)#includeusing namespace std;const doub原创 2018-01-20 10:57:11 · 424 阅读 · 1 评论 -
华师网络赛 3440. 不见了的人口数据 (Hard) 高斯消元
题目链接 题解链接Time limit per test: 3.0 seconds Memory limit: 256 megabytes星光镇的地图是有 n 个点,n−1 条路,这些点从 1 到 n 编号,两两之间都可达;这 n−1 条路的长度都是 1。这 n 个点是居民聚居点,第 i 个点上有 ai 个居民。去年的时候,星光镇政府曾经做了个人口普查,他们投入了大量的资金,获知了原创 2018-01-20 19:48:42 · 204 阅读 · 0 评论 -
SDUT 2018 Winter Individual Contest - 2
B 二维最短路 鱼贩想把货物从港口带到市场。在他的路线上,他必须穿越许多小城市国家的地区。当然,他必须在每个边界付出代价。因为他是一个好生意人,所以他想选择这样的路线,以便尽可能少付一点钱。另一方面,他必须在一定的时间内上市,否则他的鱼开始闻起来。输入 第一行包含状态数n和可用时间t。第一个国家是港口,最后一个国家是市场。在这条线之后有n行,每行n个数字,为每个状态指定到第i个状态的行原创 2018-01-20 20:14:17 · 224 阅读 · 0 评论 -
RMQ问题--ST算法
建议转到另一个链接上看 sdut算法专栏 Background 了解并掌握一些入门级的动态规划Question RMQ (Range Minimum/Maximum Query)问题是指:对于长度为n的数列A,回答若干询问RMQ(A,i,j)(i,j也就是说,RMQ问题是指求区间最值的问题。例子:poj3264题目链接:POJ-3264题目大意:给出 n 个数和原创 2018-01-29 21:02:49 · 340 阅读 · 0 评论 -
SDUT 2018 Winter Individual Contest - 3
题目链接* G 记忆化搜索题目的意思: 给你两个数组a,b 让a,b两个数组按其原序进行组合,问能否组合成为c数组。我们可以试着用搜索的方式进行处理,但是由于数据较大,而且在处理的过程中,有重叠的状态,所以我们需要用到记忆话,对于原先有的状态之后的搜索,我们不去在重复,这样就节省了很多的时间。#include #includeusing namespace std;int原创 2018-01-23 10:27:45 · 638 阅读 · 0 评论 -
第七届ACM趣味编程循环赛 Round #1 - ldq 的遗产题解
第七届ACM趣味编程循环赛 Round #1 - ldq 的遗产题解原创 2017-12-25 19:15:32 · 334 阅读 · 0 评论 -
(水)#6248. 「CodePlus 2017 11 月赛」晨跑
code+ 第一次月赛题解原创 2017-11-27 16:25:00 · 1057 阅读 · 0 评论 -
SDUT 2016级 CF 每周题集 Round 2
SDUT 2016级 CF 每周题集 Round 2原创 2017-11-29 11:13:33 · 298 阅读 · 0 评论 -
ccpc哈尔滨A [HDU-6230] Palindrome Manacher+树状数组
ccpc哈尔滨A [HDU-6230] Palindrome Manacher+树状数组原创 2017-11-29 16:09:08 · 584 阅读 · 0 评论 -
Dancing Cows 训练赛题目--低级匹配(暴力) [SPOJ-DCOWS]
Dancing Cows SPOJ - DCOWS 训练赛题目--低级匹配(暴力) [SPOJ-DCOWS]原创 2017-11-30 16:54:19 · 314 阅读 · 0 评论 -
CodeForces 847C Sum of Nestings
CodeForces 847C Sum of Nestings原创 2017-11-22 16:34:46 · 437 阅读 · 0 评论 -
二分答案 Packmen CodeForces - 847E
Packmen CodeForces - 847E 题解二分答案原创 2017-11-22 17:24:23 · 587 阅读 · 0 评论 -
SDUT 2016级 CF 每周题集 Round 5
SDUT 2016级 CF 每周题集 Round 5原创 2017-12-20 12:12:01 · 213 阅读 · 0 评论 -
CodeForces 727B Bill Total Value 大模拟,带小数的整数相加
CodeForces 727B Bill Total Value 统计原创 2017-11-24 09:08:49 · 524 阅读 · 0 评论 -
2017 12 10 cf 个人赛--题解 SDUT 2017 Autumn Single Contest L
SDUT 2017 Autumn Single Contest L原创 2017-12-12 17:03:33 · 279 阅读 · 0 评论 -
EOJ Monthly 2017.12 (暨 ECNU 12 月内部选拔) 题解
EOJ Monthly 2017.12 (暨 ECNU 12 月内部选拔) 题解原创 2017-12-09 21:38:07 · 484 阅读 · 0 评论 -
2017 12 3 个人赛 题目记录 小dp
2017 12 3 个人赛 题目记录 小dp原创 2017-12-05 17:11:34 · 259 阅读 · 0 评论 -
SDUT 2017 Autumn Single Contest K
SDUT 2017 Autumn Single Contest K原创 2017-12-06 11:01:12 · 196 阅读 · 0 评论 -
SDUT 2017 Autumn Single Contest O 周六场个人赛
尺取专题原创 2017-12-23 19:37:17 · 276 阅读 · 0 评论 -
SDUT 2017 Autumn Single Contest N 模板场
SDUT 2017 Autumn Single Contest N 模板场原创 2017-12-23 19:47:06 · 274 阅读 · 0 评论 -
牛客网 wannafly 月赛 完全平方数
牛客网 wannafly 月赛 完全平方数原创 2017-12-23 19:51:41 · 294 阅读 · 0 评论 -
SDUT 2018 Winter Individual Contest - 7
比赛链接 比赛密码: pojianchengdiedp再继续 题目链接 题目大意:长度为n的数列,满足任意连续长度为k的串乘积都为正数 题目关键: 序号相差k的数字,满足题中式子时正负性一定相等。 可以举例验证 1 -2 -1 3 4 -1 (k = 3) 把4改成-4一定满足 然后递推即可,num[i][0]表示所有下标模k 的数组a中为正数的个数,递推式的含义大概如下原创 2018-01-30 15:11:30 · 290 阅读 · 0 评论