![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
每日一题
文章平均质量分 62
嗯哼 .
坚持
展开
-
子旭大佬取苹果问题(又是找规律)(容斥定理?)(除号/的使用)
题目 Description胜鹏dalao有n个苹果,编号为1-n。一天,子旭dalao想去胜鹏dalao那吃苹果,为了难住子旭dalao,胜鹏大佬给子旭dalao出了一道题。所有苹果开始时都是未被取出的,子旭dalao要分别进行三次操作,每次操作他都选一个质数x,将编号为x及其倍数的苹果都操作一次(如果苹果被取出,那么操作后苹果应该被放回,回到未取出状态,如果苹果未被取出,则操作以后苹果被取...原创 2018-12-02 12:11:28 · 455 阅读 · 0 评论 -
洛谷T74799 老司机(优先队列)
题目背景MJJ驾驶着一辆特斯拉跑车,他需要开LLkm的路程到A市,跑车上有PP度电,卡车没开1km就需要1度电,如果在途中电路耗尽,则无法前进到达终点。题目描述在途中一共有N个充电桩,第ii个充电桩在距离起点ai km的位置,最多可以给汽车充Bi 度电,假设跑车的电瓶容量无限大,请问MJJ是否能到达终点,如果可以,请输出最少需要充多少次电?否则输出-1。输入输出格式输入格式:第一行三个...原创 2019-04-07 22:39:14 · 576 阅读 · 0 评论 -
(开灯问题)(B - The Pilots Brothers' refrigerator)(洛谷T74791 飞行员兄弟)
B - The Pilots Brothers’ refrigeratorThe game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a refrigerator.There are 16 handles on the refrigerator do...原创 2019-04-07 19:33:21 · 821 阅读 · 0 评论 -
洛谷 T69749 服务器选址
题目背景某次编程俱乐部拥有了一层楼并购置了一台高性能服务器,为了让每层楼都能连接到服务器,我们需要对每间房子进行接线。题目描述可以把这层楼看成一个数轴,房间不均匀的分布在这个数轴的整数点上,问, 该服务器放置在哪件房中可以使总接线的长度最小?输入输出格式输入格式:第一行输入整数N,表示房间数量。第二行N个整数,表示房间的位置输出格式:输出一个整数,表示距离之和的最小值。输入输出...原创 2019-03-03 17:20:40 · 295 阅读 · 0 评论 -
Puzzle迷宫问题
A children’s puzzle that was popular 30 years ago consisted of a 5×5 frame which contained 24 smallsquares of equal size. A unique letter of the alphabet was printed on each small square. Since there...原创 2019-03-02 17:59:34 · 1106 阅读 · 0 评论 -
Molar mass(求C6H5OH等的质量)
An organic compound is any member of a large class of chemicalcompounds whose molecules contain carbon. The molarmass of an organic compound is the mass of one mole of theorganic compound. The mola...原创 2019-03-02 17:06:34 · 439 阅读 · 0 评论 -
奇异点问题
题意:定义奇异点:一条线上横纵坐标都为整数的点。给出两点,求两点之间的奇异点个数思路分析:设y=abs(y1-y2)和x=abs(x1-x2)的最小公倍数是m,则m一定可以把x,y分成长度为整数的若干段。AC代码:#include<stdio.h>#include<math.h>#include<stdlib.h>int main()原创 2018-12-10 17:42:40 · 4876 阅读 · 0 评论 -
20181207QAQ的小游戏,VISIT,BACK等等的浏览网址问题
DescriptionRecently,QAQ fell in love a small game,which simulates browser browsing web pages.It has three kind of operations:1.BACK: Back to the previous page2.FORWARD:Go to the next page3.VISIT U...原创 2018-12-10 16:12:08 · 182 阅读 · 0 评论 -
你的脑容量(求n个变量的内存)
你的脑容量Descriptionint占用4个字节,bool占用1个字节,longlong占用88个字节,double占用8个字节,char占用1个字节,float占用4个字节。这是哪个世界线的咒语吗?计算机中各种存储容量的单位都是用字节(Byte简为B)来表示,此外还有KB(千字节)、MB(兆字节)、GB(千兆字节)和TB(太字节),他们的关系是1KB=1024 Bytes=2^10B...原创 2018-12-07 11:13:16 · 185 阅读 · 0 评论