LeetCode 898. Bitwise ORs of Subarrays

题目链接:https://leetcode.com/problems/bitwise-ors-of-subarrays/description/ 枚举以第i个数结尾的运算的所有情况。 class Solution { public: int subarrayBitwiseORs(ve...

2018-09-08 21:40:00

阅读数 86

评论数 0

2018ICPC南京网络赛 B Call of Accepted 表达式求值

题目链接:https://nanti.jisuanke.com/t/31443 表达式求值,对于每一步运算要保存一个最大值一个最小值,处理出现负负为正的情况。 #include<bits/stdc++.h> #define ll long long...

2018-09-08 21:31:25

阅读数 86

评论数 0

LeetCode 895. Maximum Frequency Stack

题目地址:https://leetcode.com/problems/maximum-frequency-stack/description/ 优先队列模拟栈 class FreqStack { public: struct Node { int x,y,p;...

2018-09-08 21:23:56

阅读数 74

评论数 0

LeetCode 894 All Possible Full Binary Trees

题目地址:https://leetcode.com/problems/all-possible-full-binary-trees/description/ 对二叉树的递归构造。 对奇数枚举左右子树点的个数,偶数不符合条件直接返回 /** * Definition for a binar...

2018-09-08 21:21:23

阅读数 53

评论数 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...

2018-08-21 11:40:59

阅读数 35

评论数 0

树上的启发式合并 CF1009 F. Dominant Indices

http://codeforces.com/contest/1009/problem/F 讲解:http://codeforces.com/blog/entry/44351 讲解中的问题是解决树上结点特性查询,而本题是查询相对于一个结点每一层根的个数。 #include&l...

2018-08-14 20:37:22

阅读数 47

评论数 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 ...

2018-08-11 09:48:07

阅读数 26

评论数 0

牛客多校第七场 C Bit Compression

链接:https://www.nowcoder.com/acm/contest/145/C 来源:牛客网   题目描述 A binary string s of length N = 2n is given. You will perform the following operation n...

2018-08-11 09:24:54

阅读数 46

评论数 0

杭电多校第三场 HDU 6300 Problem L. Visual Cube 水题 模拟

Problem L. Visual Cube Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 455    Accepted Su...

2018-07-31 21:10:17

阅读数 67

评论数 0

杭电多校第三场 HDU 6319 Problem A. Ascending Rating (模拟单调队列)

Problem A. Ascending Rating Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 3701    Acce...

2018-07-31 20:59:50

阅读数 38

评论数 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...

2018-07-31 20:47:11

阅读数 37

评论数 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....

2018-07-23 11:13:19

阅读数 61

评论数 0

牛客多校第一场 J.Different Integers

原博地址:https://www.nowcoder.com/discuss/87249 题目描述  Given a sequence of integers a1, a2, ..., an and q pairs of integers (l1, r1), (l2, r2), ..., (lq...

2018-07-21 11:59:32

阅读数 53

评论数 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...

2018-07-19 10:16:55

阅读数 37

评论数 0

ZOJ - 3735 Josephina and RPG

Josephina and RPGTime Limit: 2 Seconds      Memory Limit: 65536 KB      Special JudgeA role-playing game (RPG and sometimes roleplaying game) is a ga...

2018-06-03 09:35:19

阅读数 132

评论数 0

2018 西电校赛 E Xieldy And His Password DP

链接:https://www.nowcoder.com/acm/contest/107/E来源:牛客网题目描述众所周知,Xieldy最常用的口令是******。 为了改变这一现状,他random了一个01串,并从中截取了一段作为自己的口令。 他选择的口令满足以下条件: 1. 口令串表示的二进制数在...

2018-04-30 15:36:58

阅读数 204

评论数 0

2018 华中科技大学校赛 F Sorting Trees

链接:https://www.nowcoder.com/acm/contest/106/F来源:牛客网t’s universally acknowledged that there’re innumerable trees in the campus of HUST. One day ...

2018-04-30 14:23:24

阅读数 129

评论数 0

2018 华中科技大学校赛 L Fresh Air 思维BFS

链接:https://www.nowcoder.com/acm/contest/106/L来源:牛客网It’s universally acknowledged that there’re innumerable trees in the campus of HUST.And you know t...

2018-04-30 11:34:33

阅读数 122

评论数 1

2018 华中科技校赛 K Walking in the Forest 最大化最小值

链接:https://www.nowcoder.com/acm/contest/106/K来源:牛客网题目描述 It’s universally acknowledged that there’re innumerable trees in the campus of HUST.Now you'r...

2018-04-30 11:25:02

阅读数 79

评论数 1

2018华中科技大学校赛 B Beautiful Trees Cutting 等比数列 快速幂 逆元

链接:https://www.nowcoder.com/acm/contest/106/B来源:牛客网It’s universally acknowledged that there’re innumerable trees in the campus of HUST.One day Xiao M...

2018-04-30 11:15:25

阅读数 103

评论数 1

提示
确定要删除当前文章?
取消 删除
关闭
关闭