上一页 1 ··· 4 5 6 7 8 9 下一页
摘要: 这场有点可惜,ABC都是一眼题,Bmap卡了erase,C没想到用map+set存这个 A题:不难看出n/2为界限,注意当m=0的时候。我为了保险和1去了max输出 代码:https://paste.ubuntu.com/p/VmSF4VQgsx/ B题:B1的数据暴力可以过,我们来看看B2的怎么解 阅读全文
posted @ 2019-05-10 03:40 AlexPanda 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 4.19 题数110 4.28 10天我只刷了20题 从今天起开始对比我关注的kmjp刷题量,另外每天目标先3道题。 题数130 5.10 题数153 5.18 这两天强度有点低 171题 5.30 没好好训练,给自己停训了一周 189题 6.10 最近学会了莫队和树状数组 换了新队友 大家都很给力 阅读全文
posted @ 2019-04-28 22:28 AlexPanda 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://codeforces.com/contest/1151/problem/E 题意: n个点每个点和前一个点以及后一个点相连,且每个点有一个权值。定义一个函数f(l,r)权值在(l,r)的点的联通块的数量。求l从0-n,r从0-n的累加和。 思路: 引用一下出题人的原话 暴力 阅读全文
posted @ 2019-04-20 04:09 AlexPanda 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 题意:从n个物品买k个,此时有m个优惠,对于一个一次性买了x个物品,可以免费这x中最便宜的y个物品。 思路:枚举取每种优惠最低值,dp #include <bits/stdc++.h> using namespace std; #define ll long long #define forn(i, 阅读全文
posted @ 2019-04-18 11:38 AlexPanda 阅读(119) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0) bool judge(int x){ int z = floor(sqrt(x)+0 阅读全文
posted @ 2019-04-09 14:06 AlexPanda 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://codeforces.com/contest/1119/problem/D 题意:1e5个数,每个数是一个起点,从起点每次+1,1e18次。询问1e5次,在这个区间内不同的数有多少。 思路: 很容易想到暴力怎么做,但O(n*m),TLE–暴力不会的话这题就以后看吧 怎么优化 阅读全文
posted @ 2019-04-08 16:10 AlexPanda 阅读(81) 评论(0) 推荐(0) 编辑
摘要: Contents 比赛复盘 比赛总结 题解 题目总结 比赛复盘 我队本次打够3.5h solved 9/13 rank4 liuxx:DEJKLMB/2 cxy: AH ap: JB/2 前一小时: 开题后cxy秒了a题 Liuxx和我在m题分题的上面浪费了3分钟,liuxx同时开始开M,特殊情况没 阅读全文
posted @ 2019-03-29 22:08 AlexPanda 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 思路:由高位指向低位及一个闭环 #include <bits/stdc++.h> using namespace std; #define for1(i, n) for (int i = 1; i <= n; i++) #define forn(i, n) for (int i = 0; i < n 阅读全文
posted @ 2019-03-29 22:08 AlexPanda 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 思路:排序 计数 有坑点 注意M可以等于0 #include <bits/stdc++.h> using namespace std; #define for1(i, n) for (int i = 1; i <= n; i++) #define forn(i, n) for (int i = 0; 阅读全文
posted @ 2019-03-29 21:13 AlexPanda 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 思路:找到两边边界值输出即可。有坑点。 #include <bits/stdc++.h> using namespace std; int main(){ int n,a,b,s; cin >>n>>a>>b>>s; int l,r; l = (n-1)*a+b,r=(n-1)*b+a; if(s> 阅读全文
posted @ 2019-03-29 20:45 AlexPanda 阅读(120) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 下一页