![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
基础算法
文章平均质量分 52
1
梦忆晴天
下水道里的鼠人
展开
-
Sasha and a Bit of Relax K倍区间 (前缀和异或 前缀和计数 思维)
(29条消息) CodeForces - 1109A Sasha and a Bit of Relax(思维+异或和,好题)_Frozen_Guardian的博客-CSDN博客Sasha and a Bit of Relax - CodeForces 1109A - Virtual Judge (csgrandeur.cn)题意:思路:很容易想到前缀和,且这是一道计数题,不需要知道具体的每对情况,所以这里我选择考虑以区间右端点来记录每一种情况,想要构成r-l+1为偶数,那么区间的左右端点必然是同奇.原创 2022-05-27 09:49:55 · 108 阅读 · 0 评论 -
k-Multiple Free Set(set 二分)
k-Multiple Free Set - CodeForces 274A - Virtual Judge (csgrandeur.cn)题意:给你一个数组和一个值k,定义一个集合表示的是一组整数,其中没有一个整数等于另一个整数乘以k,求这个整数的最大数量。思路:集合里如果有x,一定不能有k倍的x。解法1:set#include<bits/stdc++.h>#define int long longusing namespace std;const int N=1e5+1原创 2022-05-10 12:13:04 · 189 阅读 · 0 评论