![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
codeforces
谁抢了我的happypeople
大道五十,天衍四九,人遁其一
展开
-
Codeforces Round #587 (Div. 3)
A. Prefixes题意:你每次可以将某个位置上的 a 改变为 b 或者将 b 改变为 a,使得对于所有偶数位置 i,[1,i] 的 a 的数量 = b 的数量思路:连续两个一样的,就将后一个改变为和前一个不一样。#include<bits/stdc++.h>using namespace std;#define LL long longconst int N=2e5...原创 2019-09-21 23:16:55 · 101 阅读 · 0 评论 -
Codeforces Round #582 (Div. 3)
第一次AKdiv3,写个博客纪念下(虽然F题结束7分钟才过,假装过了)A:发现跟奇偶性有关,我直接枚举两种情况取优的就行。#include <bits/stdc++.h>const int N=1e5+5;using namespace std;int n,m,k;int a[N];int main(){ cin>>n; int ans1=0,ans2=0...原创 2019-08-31 14:24:10 · 433 阅读 · 0 评论 -
D. Shortest Cycle(无向图求最小环) AND HDU6736 Forest Program
题目链接:https://codeforces.com/contest/1206/problem/D分析:经过思考,很容易发现若同一位的 1 的数量 >= 3 ,则答案直接为3,否则点的数量不会超过(2*64,除0外)然后直接求最小环就行了,比较常见的算法有 floyed 和 dfs.floyed:#include<vector>#include<algorit...原创 2019-08-24 17:12:47 · 214 阅读 · 0 评论 -
Codeforces Round #557 (Div. 2) [based on Forethought Future Cup - Final Round] D. Chladni Figure
D. Chladni Figure 传送门题意:给你一个圆,圆上有n个点,编号为1,2,…,n;圆上有m条边,问你旋转 k∈[1,n−1]k\in[1,n-1]k∈[1,n−1] 个单位,能不能与圆图形重合解法很容易想到 n*m的做法(枚举k),但是显然是会超时的,然后我看题解看不懂,再然后我就去问我的队友- - -无所不能的tls,果然,他一句话点醒了我。题解上面说:旋转的k一...原创 2019-05-07 14:09:13 · 185 阅读 · 0 评论 -
Codeforces Round #590 (Div. 3)
Codeforces Round #590 (Div. 3)原创 2019-10-02 21:00:59 · 438 阅读 · 0 评论 -
Manthan, Codefest 19 (open for everyone, rated, Div. 1 + Div. 2)F. Bits And Pieces
多亏了橘子猫的博客,让我明白了,橘子猫NB,这里贴一手他的博客链接https://blog.csdn.net/ccsu_cat/article/details/100076916题目链接:https://codeforces.com/contest/1208/problem/F题意:给你 n 个数,求 max(ai∣(aj&ak))\max( a_{i}| (a_{j}\&...原创 2019-10-04 12:34:27 · 204 阅读 · 0 评论 -
Codeforces Round #257 (Div. 1)D. Jzzhu and Numbers || CounterCode 2015 Subset
Codeforces Round #257 (Div. 1)D. Jzzhu and NumbersCounterCode 2015 Subset转载 2019-10-04 21:57:53 · 179 阅读 · 0 评论