
CodeForces
小橙子yoo
这个作者很懒,什么都没留下…
展开
-
CodeForces - 479A Expression【C++练习题】
A. Expressiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya studies in a school and he adores Maths. His class has been studying arithm...原创 2019-01-30 00:52:35 · 311 阅读 · 0 评论 -
CodeForces - 580A Kefa and First Steps【C++练习题】
A. Kefa and First Stepstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputKefa decided to make some money doing business on the Internet for exa...原创 2019-01-30 00:50:39 · 271 阅读 · 0 评论 -
CodeForces - 136A Presents【C++练习题】
A. Presentstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Petya very much likes gifts. Recently he has received a new laptop as a New...原创 2019-01-30 00:48:09 · 413 阅读 · 0 评论 -
CodeForces - 41A Translation【C++练习题】
The translation from the Berland language into the Birland language is not an easy task. Those languages are very similar: a berlandish word differs from a birlandish word with the same meaning a litt...原创 2019-01-30 00:44:12 · 288 阅读 · 0 评论 -
Codeforces 1165F1&&F2 Round #560 (Div. 3) - Microtransactions【二分法】
F2. Microtransactions (hard version)time limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe only difference between easy and hard versions is con...原创 2019-05-23 23:47:06 · 340 阅读 · 0 评论 -
Codeforces Round #576 (Div. 2) D. Welfare State
题意:输入一个数组,经过不同的操作后再按原来的顺序输出这个数组。操作1:将第x个数换成y操作2:将所有小于x的数换成x思路:如果每次都实现操作2的步骤肯定会Tle,所有我们要对每次的操作2进行处理。具体怎么实现呢?我是用一个idx来记录进行了第几次2操作了,然后用last[i]=idx来记录最近修改第i个数值的时候已经进行了多少次的2操作了。用p[i]来记录第i次p操作将所有的数修改成什...原创 2019-07-31 17:22:09 · 188 阅读 · 0 评论 -
Codeforces Round #576 (Div. 2) C. MP3
这道题我看题意看半天,一看懂就很简单了。题意:首先有n个数,K表示n个数中不同的个数(比如说3个数1 2 3则K=3,1 2 2则K=2)这K个数需要k bits(k=log2K),存这些数要nk bits空间。现在给你一个I byte大小的磁盘来装这n个数(其实就是8I bits大小)使得这些数在区间[ l , r ]上,小于l的数全改成l,大于r的数全改成l,最少要修改多少个数。思...原创 2019-07-31 17:53:33 · 183 阅读 · 0 评论 -
Codeforces Round #576 (Div. 2) B. Water Lily
很简单的数学题没啥好说的…下面是AC代码原创 2019-07-31 17:55:47 · 199 阅读 · 0 评论