码迷,mamicode.com
首页 >  
搜索关键字:codeforce    ( 868个结果
Codeforces 1251E Voting
"E2. Voting (Hard Version)" 题意: 有n个人, 你想让他们都给你投票. 你可以选择花费pi收买第i个人, 或者如果有mi个人已经给你投票了, 那么第i个人会自动给你投票. 不妨把题目等价为, 给n个人排一个先后投票的顺序, 假设在这个顺序中, 第k个投票的人, 它的mi不 ...
分类:其他好文   时间:2019-12-04 01:13:33    阅读次数:98
CodeForces - 559C
学到了学到了,逆元求组合数还有贼神仙的计数DP 太强了! 难受啊 ...
分类:其他好文   时间:2019-12-03 21:27:52    阅读次数:68
Regular Forestation CodeForces - 1252F(树同构)
Regular Forestation $$ Time Limit: 1000 ms\quad Memory Limit: 262144 kB $$ 题意 给出一个节点为 $n$ 的树,问删掉树上的一个点和这个点相连的边以后,剩下的子树是不是都是同构的。 思路 首先删掉的这个点一定是这棵树的重心,而 ...
分类:其他好文   时间:2019-12-02 17:15:45    阅读次数:109
Codeforces Round #511 (Div. 1)
A Enlarge GCD 题意:给n个数,那么他们有gcd,去掉最多n 1个数使得他们的gcd变大。求去掉最少的数。 题解:首先如果所有数都相等,那么无解。否则一定有解:最多去掉只剩下最大的那个。gcd是没有影响的,可以直接除掉(注意gcd可以用0来初始化,0和x的gcd都等于x)。然后除去gcd ...
分类:其他好文   时间:2019-12-02 13:26:00    阅读次数:80
Codeforces B. PIN Codes(暴力)
传送门 题意: t组数据,每组n个四位数,目的是改变最小的次数,使得n个数各不相同 思路: 看这个数据:2<=n<=10,因此发现重复的,暴力改变千位的值,如果改变后的数,没出现过,则break,一共十个数,for(0-9)改变千位,肯定能找的 代码: #include <iostream> #in ...
分类:其他好文   时间:2019-12-01 13:41:57    阅读次数:103
A.Two Rival Students
题目:两个竞争的学生 链接:(两个竞争的对手)[https://codeforces.com/contest/1257/problem/A] 题意:有n个学生排成一行。其中有两个竞争的学生。第一个学生在位置a,第二个学生在位置b,位置从左往右从1到n编号。 你的目的是在经过x次交换后,他们之间的距离 ...
分类:其他好文   时间:2019-11-30 09:40:11    阅读次数:72
Codeforces Round #602 (Div. 2, based on Technocup 2020 Elimination Round 3) D2. Optimal Subsequences (Hard Version) 数据结构 贪心
D2. Optimal Subsequences (Hard Version) This is the harder version of the problem. In this version, 1≤n,m≤2?105. You can hack this problem if you lock ...
分类:其他好文   时间:2019-11-25 00:14:02    阅读次数:72
codeforces - 1253 (div2)
A - Single Push if 、 else 特判 #include <stdio.h> #include <iostream> #include <cstring> #include <algorithm> #include <cmath> #include <queue> #include ...
分类:其他好文   时间:2019-11-19 17:15:05    阅读次数:75
CodeForces - 459E
#include<iostream> #include<cstring> #include<cstdio> #include<algorithm> #include<vector> #define maxn 300030 using namespace std; struct Node { int ...
分类:其他好文   时间:2019-11-19 14:09:56    阅读次数:68
2019-2020 ICPC, Asia Jakarta Regional Contest
[TOC] Contest Info "Practice Link" |Solved|A|B|C|D|E|F|G|H|I|J|K|L| |: :|: :|: :|: :|: :|: :|: :|: :|: :|: :|: :|: :|: :| |7/12|O| |O| |O| |O|O| |O|O| ...
分类:其他好文   时间:2019-11-19 13:46:44    阅读次数:94
868条   上一页 1 ... 14 15 16 17 18 ... 87 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!