码迷,mamicode.com
首页 >  
搜索关键字:codeforce    ( 868个结果
CodeForces474B - Worms - 暴力标记
题意:判断第二组数据在第一组数据的哪一堆中。 思路: 给当前连续的堆进行book标记,同一堆标记成一样的就可以了。 最后输出询问的数据所在book的位置。 AC代码: #include <iostream> #include <string.h> #include <algorithm> #incl ...
分类:其他好文   时间:2020-06-28 22:52:52    阅读次数:103
Codeforce 1335C - Two Teams Composing 统计技能种类数量+统计同一技能最大数量
[codeforces 1335C] Two Teams Composing 统计技能种类数量+统计同一技能最大数量 https://codeforces.com/contest/1335/problem/C 7 4 2 4 1 4 3 4 统计技能种类数量 4种不同技能 统计同一技能最大数量 技能 ...
分类:其他好文   时间:2020-06-28 22:18:27    阅读次数:90
假的数论gcd,真的记忆化搜索(Codeforce 1070- A. Find a Number)
题目链接: 原题:http://codeforces.com/problemset/problem/1070/A 翻译过的训练题:https://vjudge.net/contest/361183#problem/A 题目大意: 给你两个正整数p和x,让你求出最小的正整数m,满足m被p整除且m的各数 ...
分类:其他好文   时间:2020-06-28 20:38:58    阅读次数:51
[CF Contest] Codeforces Subsequences 题解
这题目怕不是有毒,,,样例万恶之源... 直接导致有人在谷群内询问如何在 1s 内输出 $10^{16}$ 个字符。 好了说题解。 首先读题,不难发现是最少 \(k\) 个子串。我们开一个数组,存储 codeforces 每一个字母要输出几个。 显然的,每个字母的数量应该尽可能接近对方,这样就可以使 ...
分类:其他好文   时间:2020-06-28 12:33:21    阅读次数:51
Educational Codeforces Round 90 (Rated for Div. 2) B. 01 Game
题目链接:https://codeforces.com/contest/1373/problem/B 题意 给出一个二进制串 $s$,Alica 和 Bob 每次可以选择移去 $s$ 中的一个 $10$ 或 $01$,无法选择者视为输掉游戏,判断最终谁会胜利。($1 \le t \le 1000, ...
分类:其他好文   时间:2020-06-26 23:51:15    阅读次数:55
Educational Codeforces Round 90 (Rated for Div. 2)A->D
考试周,但还是打了一场,一个周不打了,手生了不少....... A:http://codeforces.com/contest/1373/problem/A 题意: 第一个商店:1个卖a元 第二个商店:打包卖,b个卖c元。比如买b+1个,那也得买双份,2b个。 求买多少(任意),第一个商店更便宜,第 ...
分类:其他好文   时间:2020-06-26 20:00:28    阅读次数:55
Educational Codeforces Round 90 (Rated for Div. 2)A、B、C、D
题目 A题意:两家商店卖相同产品但售卖方式不同,第一家零售一件一件卖价格为a元,第二家b(b>=2)件一起卖(如果要买得话就得向上取整)c元,问在第一家商店买多少会比第二家便宜, 在第二家商店买多少会比第一家便宜。答案至少买一件否则输出-1. 解法:首先考虑第一家商店买:如果a>=c,无论如何买都无 ...
分类:其他好文   时间:2020-06-26 12:20:47    阅读次数:98
Codeforces Round #604 (Div. 2) A. Beautiful String(贪心)
题目链接:https://codeforces.com/contest/1265/problem/A 题意 给出一个由 a, b, c, ? 组成的字符串,将 ? 替换为 a, b, c 中的一个字母,问能否字符串中所有相邻字母都不同。 题解 除非一开始字符串就不合法,否则一定可以构造出合法的字符串 ...
分类:其他好文   时间:2020-06-25 19:19:42    阅读次数:58
Codeforce:208A. Dubstep (字符串处理,正则表达式)
Vasya works as a DJ in the best Berland nightclub, and he often uses dubstep music in his performance. Recently, he has decided to take a couple of ol ...
分类:其他好文   时间:2020-06-24 23:15:59    阅读次数:50
Codeforce 318A - Even Odds(数学水题)
Being a nonconformist, Volodya is displeased with the current state of things, particularly with the order of natural numbers (natural number is posit ...
分类:其他好文   时间:2020-06-23 21:22:33    阅读次数:63
868条   上一页 1 2 3 4 5 6 ... 87 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!