
思维
文章平均质量分 70
DlPF_C
这个作者很懒,什么都没留下…
展开
-
UVALive - 3708 Graveyard
题目地址:点击打开链接 题意: 一个周长长为10000的圈,里面原先等距离的放着n个雕塑,现在要往里再放m个雕塑,要求所有雕塑还是等距离,问移动原先已有雕塑的最短距离。 思路:圆的位置记为0~10000,知道雕塑个数就知道雕塑该在的位置,暴力一下就出来了,注意要标记这个位置是否已经有雕塑。 #include #define maxn 10000.0 using namespace std;原创 2017-10-11 20:32:23 · 297 阅读 · 0 评论 -
CodeForce 923A PromalSport
B. Primal Sporttime limit per test1.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice and Bob begin their day with a quick game. They first choose a starting num...原创 2018-03-17 10:33:39 · 362 阅读 · 0 评论 -
2018 西电校赛 E Xieldy And His Password DP
链接:https://www.nowcoder.com/acm/contest/107/E来源:牛客网题目描述众所周知,Xieldy最常用的口令是******。 为了改变这一现状,他random了一个01串,并从中截取了一段作为自己的口令。 他选择的口令满足以下条件: 1. 口令串表示的二进制数在十进制下可以被表示为3k(k>=0)。 2. 口令串可以有前导零。 现已经random出了01串...原创 2018-04-30 15:36:58 · 461 阅读 · 0 评论 -
牛客多校第二场 J.Farm
题目链接:https://www.nowcoder.com/acm/contest/140/J 题目描述 White Rabbit has a rectangular farmland of n*m. In each of the grid there is a kind of plant. The plant in the j-th column of the i-th row belon...原创 2018-07-23 11:13:19 · 351 阅读 · 0 评论 -
HDU 5929 Basic Data Structure 双向队列
Mr. Frog learned a basic data structure recently, which is called stack.There are some basic operations of stack: ∙∙ PUSH x: put x on the top of the stack, x must be 0 or 1. ∙∙ POP: throw the elemen...原创 2018-07-19 10:16:55 · 237 阅读 · 0 评论 -
杭电多校第三场HDU6321 Problem C. Dynamic Graph Matching (状压DP)
Problem C. Dynamic Graph Matching Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 1238 Accepted Submission(s): 516 Problem Descript...原创 2018-07-31 20:47:11 · 240 阅读 · 0 评论 -
牛客多校第七场 J Sudoku Subrectangles
链接:https://www.nowcoder.com/acm/contest/145/J 来源:牛客网 You have a n * m grid of characters, where each character is an English letter (lowercase or uppercase, which means there are a total of 52 diff...原创 2018-08-11 09:48:07 · 282 阅读 · 0 评论 -
牛客多校赛第九场 E Music Game 概率计算
链接:https://www.nowcoder.com/acm/contest/147/E 来源:牛客网 题目描述 Niuniu likes to play OSU! We simplify the game OSU to the following problem. Given n and m, there are n clicks. Each click may succes...转载 2018-08-21 11:40:59 · 408 阅读 · 0 评论 -
LeetCode 894 All Possible Full Binary Trees
题目地址:https://leetcode.com/problems/all-possible-full-binary-trees/description/ 对二叉树的递归构造。 对奇数枚举左右子树点的个数,偶数不符合条件直接返回 /** * Definition for a binary tree node. * struct TreeNode { * int val; ...转载 2018-09-08 21:21:23 · 246 阅读 · 0 评论 -
Codeforces 470Div 2 C. Producing Snow
C. Producing Snowtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice likes snow a lot! Unfortunately, this year's winter is already over, and she...转载 2018-03-11 13:12:01 · 508 阅读 · 0 评论 -
Codeforce 931 C. Laboratory Work
C. Laboratory Worktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAnya and Kirill are doing a physics laboratory work. In one of the tasks they hav...原创 2018-03-10 11:53:58 · 252 阅读 · 0 评论 -
CodeForce 899C
C. Dividing the numbers time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Petya has n integers: 1, 2, 3, ...,原创 2017-12-23 14:42:48 · 956 阅读 · 0 评论 -
CodeForce 897 D. Ithea Plays With Chtholly
D. Ithea Plays With Chtholly time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output This is an interactive problem.原创 2017-12-23 14:58:31 · 406 阅读 · 0 评论 -
CodeForce 897 C. Nephren gives a riddle
C. Nephren gives a riddle time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output What are you doing at the end of原创 2017-12-23 15:42:18 · 572 阅读 · 0 评论 -
CodeForce896 A. Nephren gives a riddle
A. Nephren gives a riddle time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output What are you doing at the end of原创 2017-12-06 16:24:38 · 328 阅读 · 0 评论 -
CodeForce 907 A. Masha and Bears
A. Masha and Bears time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A family consisting of father bear, moth原创 2017-12-24 09:22:54 · 1079 阅读 · 0 评论 -
CodeForce896 B. Ithea Plays With Chtholly
B. Ithea Plays With Chtholly time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output This is an interactive problem.原创 2017-12-06 16:45:37 · 368 阅读 · 0 评论 -
POJ 1190生日蛋糕
生日蛋糕 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 21221 Accepted: 7546 Description 7月17日是Mr.W的生日,ACM-THU为此要制作一个体积为Nπ的M层生日蛋糕,每层都是一个圆柱体。 设从下往上数第i(1 R原创 2018-01-29 17:42:51 · 354 阅读 · 0 评论 -
Codeforces 950 C. Zebras
C. Zebrastime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputOleg writes down the history of the days he lived. For each day he decides if it was good ...原创 2018-03-10 11:39:23 · 456 阅读 · 0 评论 -
LeetCode 898. Bitwise ORs of Subarrays
题目链接:https://leetcode.com/problems/bitwise-ors-of-subarrays/description/ 枚举以第i个数结尾的运算的所有情况。 class Solution { public: int subarrayBitwiseORs(vector<int>& A) { set<int> s;...原创 2018-09-08 21:40:00 · 352 阅读 · 0 评论