码迷,mamicode.com
首页 >  
搜索关键字:codeforces 91b    ( 12211个结果
Codeforces Round #603 (Div. 2) D. Secret Passwords 并查集
链接:https://codeforces.com/contest/1263/problem/D 题意:给你n个字符串,如果其中两个字符串的某个元素相同,则被视为相同,问最后知道几个字符串就可以知道所有的字符串; 假设a字符串和c字符串等价,b和c字符串等价,那么a和b也等价。 并查集裸题; cou ...
分类:其他好文   时间:2020-04-23 18:48:36    阅读次数:69
My Github Repository
最近在Github上整了个Repository来保存打过的比赛的代码,包括Codeforces,Google Code Jam和Google Kick Start等,之后应该也会搞一点刷题的代码。 之后这个博客上可能会只写解题思路,代码就放到这个repo里。 虽然已经退役了,但是还是会经常更新。 " ...
分类:其他好文   时间:2020-04-23 12:42:04    阅读次数:107
Codeforces Round #636 (Div. 3) E. Weights Distributing 贪心+图
http://codeforces.com/contest/1343/problem/E 给定一个无向图,n个顶点,m条边,以及长度为m的数组(边权),保证每对顶点之间至少有一条路径; mike计划从顶点a到顶点b再到顶点c,同一个顶点可以访问多次,每条边有一个边权,问怎样分配边权才能使mike走过 ...
分类:其他好文   时间:2020-04-23 09:17:22    阅读次数:75
Codeforces Round #636 (Div. 3)题解
A. 给你一个n,解方程,(1+2+4+...+2^(k-1))*x=n,保证k>1。 枚举k,可以整除时输出一个数。 #include<bits/stdc++.h> #define all(x) x.begin(),x.end() #define fi first #define sd secon ...
分类:其他好文   时间:2020-04-22 20:02:07    阅读次数:58
codeforces #634(div3) A-E题解
"A. Candies and Two Sisters" + 将糖果分为a,b两份,且a t; while(t ){ cin n; cout t; while(t ){ cin n a b; for(int i = 0; i book; int main(void){ ios::sync_with_ ...
分类:其他好文   时间:2020-04-22 13:42:51    阅读次数:85
Codeforces Round #636 (Div. 3)
A - Candies 题目大意:找到一个x ,存在k>1,使x + 2x + 4x + ? + 2^(k?1)x = n。 即找到x,k满足这个式子:(2^k-1)*x = n,可以枚举k 判断(2^k-1)|n #include <bits/stdc++.h> using namespace s ...
分类:其他好文   时间:2020-04-22 13:30:08    阅读次数:66
codeforces Round #636 D. Constant Palindrome Sum
题意:给你一个长度为偶数n的数组,每次可以将一个元素修改为不大于k的值,要求每个a[i]+a[n-i+1]都相等,求最少操作多少次 题解:假设每一对的和都为X,小的记为mn,大的记为mx; 我们对每一对相应的数考虑,有三种情况:改一个数,改两个数,不改 1.改一个数:当x∈[mn+1,mx+k]; ...
分类:其他好文   时间:2020-04-22 13:29:41    阅读次数:75
Codeforces Round #636 (Div. 3)
题目链接:https://codeforces.com/contest/1343 A Candies 随便做做。 B Balanced Array 随便做做。 D Constant Palindrome Sum 题意:如题目的名字,给一个 $n$ 个数字的数组,要保持对称位置的和恒为常数,但是每个数 ...
分类:其他好文   时间:2020-04-22 09:23:49    阅读次数:69
Codeforces Round #635 (Div. 2) E. Kaavi and Magic Spell 区间dp
https://codeforces.ml/contest/1337/problem/E 给出两个字符串 s和t ,字符串s的长度大于等于t的长度,和一个空字符串A; 可以执行两种操作: 1.将s的第一个字符删除并加到A字符串的前面; 2.将s的第一个字符删除并加到A字符串的后面; 求此过程中A的前 ...
分类:其他好文   时间:2020-04-19 18:01:51    阅读次数:82
A - Mahmoud and Ehab and the bipartiteness CodeForces - 862B (二分图)(黑白染色)
Examples input Copy 31 21 3 output Copy 0 input Copy 51 22 33 44 5 output Copy 2 Note Tree definition: https://en.wikipedia.org/wiki/Tree_(graph_theor ...
分类:其他好文   时间:2020-04-19 00:30:02    阅读次数:83
12211条   上一页 1 ... 61 62 63 64 65 ... 1222 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!