上一页 1 2 3 4 5 6 7 ··· 10 下一页
摘要: 题目: https://www.luogu.com.cn/problem/P1494 维护总方案数,和每多一双袜子和没少一双袜子带来的贡献 #include<bits/stdc++.h> #include<stdio.h> using namespace std; const int maxn=5e 阅读全文
posted @ 2021-08-11 20:57 废柴废柴少女 阅读(22) 评论(0) 推荐(0)
摘要: 题目: https://www.luogu.com.cn/problem/P2709 大意:求出从[1,k]再给出的区间[l,r]中出现的次数的平方和 因为数列是计数是从1开始的,所以要把L置为1,不然会把a[0]自动算上 #include<bits/stdc++.h> #include<stdio 阅读全文
posted @ 2021-08-11 20:34 废柴废柴少女 阅读(63) 评论(0) 推荐(0)
摘要: https://acm.hdu.edu.cn/showproblem.php?pid=6944 题意: 给出一些数字,每次选一个数字减去9,99,999,要求结果大于0,且要求最终每个数字只能出现一次,不能操作的人就输了 考虑每次减去的9,99,999可以转化成9*1,9*11,9*111,一次操作 阅读全文
posted @ 2021-08-10 15:49 废柴废柴少女 阅读(62) 评论(0) 推荐(0)
摘要: codeforces737题目是k是否大于等于将数列排序需要的最少的分块 按照题目的意思的话就是当成pair或者结构体排序,只要排序后的个体的原来的位置是连续的就可以划分为一个分块 #include<stdio.h>#include<algorithm> #include<vector>//#inc 阅读全文
posted @ 2021-08-10 10:14 废柴废柴少女 阅读(120) 评论(0) 推荐(0)
摘要: 字典树首先把n个名字都insert进去,用f来标记,此时统一标记为1 再检测化学老师报的m个名字 如果当前节点没有建造,说明是错误的名字,输出wrong 如果f是-1就是repeat 如果正常输出一次后就把标记f改成-1 #include<stdio.h> #include<string.h> #i 阅读全文
posted @ 2021-08-04 15:30 废柴废柴少女 阅读(32) 评论(0) 推荐(0)
摘要: 题目: https://www.luogu.com.cn/problem/P2866 单调栈 #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; const int maxn=8e4+7; typ 阅读全文
posted @ 2021-07-30 21:00 废柴废柴少女 阅读(121) 评论(0) 推荐(0)
摘要: 题目: https://www.luogu.com.cn/problem/P3205 dp[i][j][0]表示第i个数从左边进 dp[i][j][1]表示第j个数从右边进 注意处理边界属于等价的情况,只用算一遍 #include<stdio.h> #include<algorithm> #incl 阅读全文
posted @ 2021-07-29 18:42 废柴废柴少女 阅读(32) 评论(0) 推荐(0)
摘要: 题目: https://www.luogu.com.cn/problem/P1063 #include<stdio.h> #include<algorithm> #include<string.h> #include<queue> using namespace std; typedef pair< 阅读全文
posted @ 2021-07-29 14:48 废柴废柴少女 阅读(33) 评论(0) 推荐(0)
摘要: 题目: https://www.luogu.com.cn/problem/P1880 题目描述 在一个圆形操场的四周摆放 NN 堆石子,现要将石子有次序地合并成一堆.规定每次只能选相邻的2堆合并成新的一堆,并将新的一堆的石子数,记为该次合并的得分。 试设计出一个算法,计算出将 NN 堆石子合并成 1 阅读全文
posted @ 2021-07-29 10:14 废柴废柴少女 阅读(69) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<algorithm> #include<queue> using namespace std; typedef pair<int ,int > p; typedef long long ll; int xa,ya,xm,ym; ll c[22][ 阅读全文
posted @ 2021-07-28 18:43 废柴废柴少女 阅读(92) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 10 下一页