__CodeForce
BigZong
这个作者很懒,什么都没留下…
展开
-
codeforces 1350.Div2 A-D Orac and xxx
A.Orac and Fac1:问题描述2:问题分析:3:代码:B.Orac and ModelsC.Orac and LCMD.Orac and MediansE.Orac and Game of Life原创 2020-05-13 11:57:56 · 183 阅读 · 0 评论 -
(浮点数精度问题)CF - 614A
题意:给定三个数l,r,k,让输出在[l,r]内的所有的k的幂次方.题解:直接从k的0次方开始暴力枚举,直到找到最后一个小于等于r的数停止枚举.在最坏的情况下,k=2,l=1 , r=1e18,只有60个结果,不用担心TLE.法1:直接使用long long,但是long long的最大值是9223372036854775807,所以当暴力枚举到最后一个小于等于r的数的时候...原创 2020-04-11 00:18:58 · 196 阅读 · 0 评论 -
Sequence Sorting CodeForces - 1223D i2000(以不动制万动)
You are given a sequencea1,a2,…,ana1,a2,…,an, consisting of integers.You can apply the following operation to this sequence: choose some integerxxand moveallelements equal toxxeither to the b...原创 2019-12-11 20:52:09 · 265 阅读 · 0 评论 -
codeforces 1228 C:Primes and Multiplication(质因子分解+规律)
Let's introduce some definitions that will be needed later.Letprime(x)prime(x)be the set of prime divisors ofxx. For example,prime(140)={2,5,7}prime(140)={2,5,7},prime(169)={13}prime(169)={13}...原创 2019-12-09 21:17:18 · 159 阅读 · 0 评论 -
codeforces 949B(Div 1) :A Leapfrog in the Array(思路题)
Dima is a beginner programmer. During his working process, he regularly has to repeat the following operation again and again: to remove every second element from the array. One day he has been bored...原创 2019-12-08 20:22:31 · 106 阅读 · 0 评论 -
1252.C Even Path(思路,路径数据结构)
Pathfinding is a task of finding a route between two points. It often appears in many problems. For example, in a GPS navigation software where a driver can query for a suggested route, or in a robot ...原创 2019-11-04 15:59:47 · 696 阅读 · 0 评论 -
Digits Sequence (Easy Edition)(int->string)
Let's write all the positive integer numbers one after another from11without any delimiters (i.e. as a single string). It will be the infinite sequence starting with12345678910111213141516171819...原创 2019-06-02 20:47:17 · 346 阅读 · 0 评论 -
Maxim and Biology
传送门Today in the scientific lyceum of the Kingdom of Kremland, there was a biology lesson. The topic of the lesson was thegenomes. Let's call thegenomethe string "ACTG".Maxim was very boring to ...原创 2019-04-19 11:11:59 · 464 阅读 · 0 评论 -
Alarm Clocks Everywhere
time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard outputoutputstandard outputIvan is going to sleep now and wants to set his alarm c...原创 2019-04-23 09:38:22 · 208 阅读 · 0 评论 -
CodeForces - 1051C -Vasya and Multisets
题目链接:CodeForces - 1051C题目类型:模拟题题意:给一组数据,只出现一次的称为好糖,现在要给男生女生分糖,要求男生女生得到的好糖数相同,如果能够分的话输出YES+分糖的顺序,如果不能的话输出NO关键点是坏糖可以拆分成好糖,比如1 1,可以把1给女生,把另一个1给男生,这样男生女生都得到了一个好糖#include<iostream>#incl...原创 2019-04-01 19:01:13 · 118 阅读 · 0 评论 -
CodeForces - 813C The Tag Game
题目链接:CodeForces 813C题意:Alice和Bob玩游戏,Alice追Bob,路径是输入的指定树状图,Bob要尽可能地躲避Alice的追击,结束的标志是Bob和Alice在同一点相遇。题解:按照常情,我们在知道有人追我们的时候,我们会尽量往远处跑,那么这道题也不例外,我们要让Bob尽可能往距离他最远的地方跑,不过别光顾着跑,还要记录距离,什么距离?到起始点的距离....原创 2019-04-05 02:27:34 · 212 阅读 · 0 评论 -
CodeForces 950C Zebras
题目链接:CodeForces 950C题意:给出一串数字,输出可以构成的斑马数的情况,其中斑马数是像0 010这样的,开始和结尾是0并且01是相间出现的,输出数据有多组(第一行输出组数),每组的第一个数是这个斑马数的长度,后面的n个数字是斑马数的下标。并且要保证每个数字都输出,不然就不成立,输出-1.题解:以一个串为例:给定字符串01001100(如下):1、...原创 2019-04-05 01:09:53 · 178 阅读 · 0 评论 -
CodeForces 405C Unusual Product
题目链接:CodeForces 405C题意:给定一个矩阵,输入n行操作数据,如果输入的是1 x,代表将第x行的元素0变1,1变0.如果输入2 y,代表将y列的元素由0变1,由1变0,当输入的是3的时候,输出unusual square。unusual square就是每一个元素的行列交换的乘积和题解:#include<iostream>#include&l...原创 2019-04-04 09:54:46 · 111 阅读 · 0 评论 -
Accordion
Accordiontime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAn accordion is a string (yes, in the real world accordions are musical...原创 2019-01-12 10:23:46 · 538 阅读 · 0 评论 -
Squares and Segments
time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output outputstandard outputLittle Sofia is in fourth grade. Today in the geo...原创 2019-01-06 21:48:26 · 484 阅读 · 0 评论 -
Ehab and subtraction
You're given an array aa. You should repeat the following operation kk times: find the minimum non-zero element in the array, print it, and then subtract it from all the non-zero elements of the ar...原创 2018-12-05 21:14:54 · 362 阅读 · 0 评论