随笔分类 -  杂题集

摘要:A. Optimal Currency Exchange time limit per test 1.5 seconds memory limit per test 512 megabytes input standard input output standard output Andrew wa 阅读全文
posted @ 2019-10-10 20:10 知道了呀~ 阅读(369) 评论(0) 推荐(0) 编辑
摘要:D2. Equalizing by Division (hard version) time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard outpu 阅读全文
posted @ 2019-10-09 21:35 知道了呀~ 阅读(349) 评论(0) 推荐(0) 编辑
摘要:C. Book Reading time limit per test 1 second time limit per test memory limit per test 256 megabytes memory limit per test input standard input input 阅读全文
posted @ 2019-09-27 17:33 知道了呀~ 阅读(477) 评论(0) 推荐(0) 编辑
摘要:CF1209C Paint the Digits 题意:给定T组数据,每组数据第一行输入数字串长度,第二行输入数字串,用数字1和2对数字串进行涂色,被1涂色的数字子串和被2涂色的数字子串拼接成新的数字串,要求新的数字串是非递减的。 题解:对原数字串进行排序,然后从后往前和从前往后各涂一次,若涂不完则 阅读全文
posted @ 2019-09-25 21:06 知道了呀~ 阅读(282) 评论(0) 推荐(0) 编辑
摘要:C. Magic Grid time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Let us define a magic grid 阅读全文
posted @ 2019-09-23 21:40 知道了呀~ 阅读(446) 评论(0) 推荐(0) 编辑
摘要:B. Uniqueness time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output B. Uniqueness time limit p 阅读全文
posted @ 2019-09-23 20:53 知道了呀~ 阅读(286) 评论(0) 推荐(0) 编辑
摘要:E. Boxers 题意:有N个运动员,每个运动员都可以选择一次改变自己体重的机会(将体重加一、减一、不变),体重不可以为0,问最多可以 有多少种不同的体重 题解:从大到小排序,依次从体重加一、不变、减一判断,选择体重没有被标记过的一种,统计种类即可 为啥从加一开始?因为最大的数加1一定是可以的,依 阅读全文
posted @ 2019-08-23 10:42 知道了呀~ 阅读(243) 评论(0) 推荐(0) 编辑
摘要:B. Equal Rectangles B. Equal Rectangles 题意:给你4*n个木棒,问你能否组成n个面积相等的矩形。 题解:排序,若能组成,那么矩形的面积一定是 a[0]*a[n*4-1] ,依次用最小的乘以最大的判断面积即可 #include<iostream> #includ 阅读全文
posted @ 2019-08-22 21:10 知道了呀~ 阅读(263) 评论(0) 推荐(0) 编辑
摘要:A. You Are Given Two Binary Strings… You are given two binary strings x and y, which are binary representations of some two integers (let’s denote the 阅读全文
posted @ 2019-08-22 16:25 知道了呀~ 阅读(489) 评论(0) 推荐(0) 编辑
摘要:Problem A: Assembly Required Princess Lucy broke her old reading lamp, and needs a new one. The castle orders a shipment of parts from the Slick Lamp 阅读全文
posted @ 2019-08-02 16:12 知道了呀~ 阅读(241) 评论(0) 推荐(0) 编辑
摘要:Ignatius and the Princess II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12948 Accepted Submi 阅读全文
posted @ 2019-07-25 17:23 知道了呀~ 阅读(262) 评论(0) 推荐(0) 编辑
摘要:Avin meets a rich customer today. He will earn 1 million dollars if he can solve a hard problem. There are n warehouses and m workers. Any worker in t 阅读全文
posted @ 2019-07-23 21:07 知道了呀~ 阅读(474) 评论(0) 推荐(0) 编辑
摘要:vin is observing the cars at a crossroads. He finds that there are n cars running in the east-west direction with the i-th car passing the intersectio 阅读全文
posted @ 2019-07-23 20:59 知道了呀~ 阅读(405) 评论(0) 推荐(0) 编辑
摘要:B. Email from Polycarp time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Methodius receive 阅读全文
posted @ 2019-07-22 22:12 知道了呀~ 阅读(666) 评论(0) 推荐(0) 编辑
摘要:J. Cola time limit per test 4.0 s memory limit per test 64 MB input standard input output standard output J. Cola time limit per test 4.0 s memory lim 阅读全文
posted @ 2019-07-21 21:53 知道了呀~ 阅读(397) 评论(0) 推荐(0) 编辑
摘要:北京市商汤科技开发有限公司面向青少年研发了一款智能伴游机器人-- AI 伴游小精灵。一经推出,深受孩子们的喜爱,可爱又机智的小精灵会想出很多有趣的小游戏来启迪孩子们思考。今天,小精灵给你提出了一个神奇又有趣的多米诺骨牌小游戏。 你手上有一副神奇的多米诺骨牌,数量有 nn个,编号为 1 ~n。它们之间 阅读全文
posted @ 2019-05-27 20:47 知道了呀~ 阅读(396) 评论(0) 推荐(0) 编辑
摘要:等差素数列 2,3,5,7,11,13,....是素数序列。 类似:7,37,67,97,127,157 这样完全由素数组成的等差数列,叫等差素数数列。 上边的数列公差为 30,长度为 6。 2004 年,格林与华人陶哲轩合作证明了:存在任意长度的素数等差数列。 这是数论领域一项惊人的成果! 有这一 阅读全文
posted @ 2019-03-19 23:00 知道了呀~ 阅读(1547) 评论(0) 推荐(0) 编辑
摘要:友链:https://blog.csdn.net/weixin_42060896/article/details/88168462?tdsourcetag=s_pcqq_aiomsg 找一个基准数p(默认区间内的第一个数为基准数,再不断更新基准数),以p为基准,把区间分为小于p和大于p的两个子区间, 阅读全文
posted @ 2019-03-12 15:14 知道了呀~ 阅读(198) 评论(0) 推荐(0) 编辑
摘要:/* 标题:日志统计 小明维护着一个程序员论坛。现在他收集了一份"点赞"日志,日志共有N行。其中每一行的格式是: ts id 表示在ts时刻编号id的帖子收到一个"赞"。 现在小明想统计有哪些帖子曾经是"热帖"。如果一个帖子曾在任意一个长度为D的时间段内收到不少于K个赞,小明就认为这个帖子曾是"热帖"。 具体来说,如果存在某个时刻T满足该帖在[T, T+D)这段时间内(注意是... 阅读全文
posted @ 2019-03-08 11:59 知道了呀~ 阅读(636) 评论(0) 推荐(0) 编辑
摘要:加法变乘法 我们都知道:1+2+3+ ... + 49 = 1225 现在要求你把其中两个不相邻的加号变成乘号,使得结果为 2015 比如: 1+2+3+...+10*11+12+...+27*28+29+...+49 = 2015 就是符合要求的答案。 请你寻找另外一个可能的答案,并把位置靠前的那 阅读全文
posted @ 2019-03-06 20:44 知道了呀~ 阅读(522) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示