思维
文章平均质量分 70
DlPF_C
这个作者很懒,什么都没留下…
展开
-
UVALive - 3708 Graveyard
题目地址:点击打开链接题意: 一个周长长为10000的圈,里面原先等距离的放着n个雕塑,现在要往里再放m个雕塑,要求所有雕塑还是等距离,问移动原先已有雕塑的最短距离。思路:圆的位置记为0~10000,知道雕塑个数就知道雕塑该在的位置,暴力一下就出来了,注意要标记这个位置是否已经有雕塑。#include#define maxn 10000.0using namespace std;原创 2017-10-11 20:32:23 · 260 阅读 · 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 · 298 阅读 · 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 · 413 阅读 · 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 · 280 阅读 · 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 · 199 阅读 · 0 评论 -
杭电多校第三场HDU6321 Problem C. Dynamic Graph Matching (状压DP)
Problem C. Dynamic Graph MatchingTime 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 · 197 阅读 · 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 · 214 阅读 · 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 · 322 阅读 · 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 · 214 阅读 · 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 · 466 阅读 · 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 · 215 阅读 · 0 评论 -
CodeForce 899C
C. Dividing the numberstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya has n integers: 1, 2, 3, ...,原创 2017-12-23 14:42:48 · 864 阅读 · 0 评论 -
CodeForce 897 D. Ithea Plays With Chtholly
D. Ithea Plays With Chthollytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis is an interactive problem.原创 2017-12-23 14:58:31 · 345 阅读 · 0 评论 -
CodeForce 897 C. Nephren gives a riddle
C. Nephren gives a riddletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWhat are you doing at the end of原创 2017-12-23 15:42:18 · 492 阅读 · 0 评论 -
CodeForce896 A. Nephren gives a riddle
A. Nephren gives a riddletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWhat are you doing at the end of原创 2017-12-06 16:24:38 · 284 阅读 · 0 评论 -
CodeForce 907 A. Masha and Bears
A. Masha and Bearstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA family consisting of father bear, moth原创 2017-12-24 09:22:54 · 993 阅读 · 0 评论 -
CodeForce896 B. Ithea Plays With Chtholly
B. Ithea Plays With Chthollytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis is an interactive problem.原创 2017-12-06 16:45:37 · 296 阅读 · 0 评论 -
POJ 1190生日蛋糕
生日蛋糕Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 21221 Accepted: 7546Description7月17日是Mr.W的生日,ACM-THU为此要制作一个体积为Nπ的M层生日蛋糕,每层都是一个圆柱体。 设从下往上数第i(1 R原创 2018-01-29 17:42:51 · 302 阅读 · 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 · 412 阅读 · 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 · 303 阅读 · 0 评论