![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
思维
文章平均质量分 90
陶鸿杰
这个作者很懒,什么都没留下…
展开
-
NYOJ 85 有趣的数——————简单思维
有趣的数时间限制:3000 ms | 内存限制:65535 KB难度:2描述把分数按下面的办法排成一个数表。1/1 1/2 1/3 1/4…2/1 2/2 2/3…3/1 3/2 …4/1……我们以z字型方法给上表的每项编号。特定方法:第一项是1/1,然后是1/2、2/1、3/1、2/2、1/3、1/4、2/3……。编程输入项号N(1<=N<=100000),输...原创 2018-10-19 23:39:20 · 322 阅读 · 0 评论 -
leetcode第 149 场周赛 1155. 掷骰子的N种方法
掷骰子的N种方法这里有 ddd 个一样的骰子,每个骰子上都有 fff 个面,分别标号为 1,2,...,f1, 2, ..., f1,2,...,f。我们约定:掷骰子的得到总点数为各骰子面朝上的数字的总和。如果需要掷出的总点数为 targettargettarget,请你计算出有多少种不同的组合情况(所有的组合情况总共有fdf^dfd 种),模 109+710^9 + 7109+7 后返回。...原创 2019-08-11 16:34:23 · 340 阅读 · 0 评论 -
AtCoder Beginner Contest 137 D - Summer Vacation——————贪心,优先队列
abc137_D - Summer VacationProblem StatementThere are NNN one-off jobs available. If you take the i-th job and complete it, you will earn the reward of BiB_iBi after AiA_iAi days from the day you ...原创 2019-08-10 23:55:03 · 549 阅读 · 0 评论 -
河南理工2019暑期选拔赛————我好菜
文章目录[Problem A 小L的项链切割](http://acm.zzuli.edu.cn/problem.php?id=1526)[Problem B 小L的试卷](http://acm.zzuli.edu.cn/problem.php?id=1527)[Problem C 小L记单词](http://acm.zzuli.edu.cn/problem.php?id=2041)[Prob...原创 2019-08-13 21:17:23 · 269 阅读 · 0 评论 -
HDU 6581 Vacation——————2019多校第一场,思维
VacationTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1060 Accepted Submission(s): 420Special JudgeProblem DescriptionTom and Jerry...原创 2019-07-23 09:36:08 · 204 阅读 · 0 评论 -
zzuli 1530 小L玩滚球游戏——————思维
1530: 小L玩滚球游戏时间限制: 1 Sec 内存限制: 128 MB提交: 54 解决: 18题目描述小L正在玩滚球游戏,有n个水晶球在轨道上以不同开始位置和速度从近往远的方向滚动,如果两个水晶球在滚动过程中相遇,它们就会融合成一个水晶球,然后以速度较慢的水晶球的速度继续向前滚动, 问经过时间t后,轨道上还有多少水晶球。输入第一行输入两个整数n、t,n代表水晶球的数量(1 &...原创 2019-07-23 08:27:34 · 394 阅读 · 0 评论 -
POJ 1182食物链————并查集复习
食物链Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 105782 Accepted: 32027Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。有人用两种...原创 2019-07-19 09:37:47 · 144 阅读 · 0 评论 -
HDU 2767 Proving Equivalences——————Kosaraju求强连通分量
Proving EquivalencesProblem DescriptionConsider the following exercise, found in a generic linear algebra textbook.Let A be an n × n matrix. Prove that the following statements are equivalent:A i...原创 2019-05-15 18:32:16 · 173 阅读 · 0 评论 -
ZOJ3870 Team Formation————位运算&&思维
Team FormationTime Limit: 2 Seconds Memory Limit: 131072 KBFor an upcoming programming contest, Edward, the headmaster of Marjar University, is forming a two-man team from N students of his uni...原创 2019-04-09 23:49:34 · 208 阅读 · 0 评论 -
Beauty of Array————思维(或者DP)
Beauty of ArrayTime Limit: 2 Seconds Memory Limit: 65536 KBEdward has an array A with N integers. He defines the beauty of an array as the summation of all distinct integers in the array. Now E...原创 2019-04-09 23:33:35 · 239 阅读 · 0 评论 -
FZU 2107 Hua Rong Dao——————DFS
Hua Rong DaoAccept: 523 Submit: 1086Time Limit: 1000 mSec Memory Limit : 32768 KBProblem DescriptionCao Cao was hunted down by thousands of enemy soldiers when he escaped from Hua Rong Dao. ...原创 2019-04-10 20:16:37 · 326 阅读 · 0 评论 -
Codeforces 1095C. Powers Of Two——————multiset
C. Powers Of TwoA positive integer x is called a power of two if it can be represented as x=2yx=2^yx=2y, where y is a non-negative integer. So, the powers of two are 1,2,4,8,16,….You are given two p...原创 2019-01-02 15:55:16 · 981 阅读 · 0 评论 -
Codeforces 1097C. Yuhao and a Parenthesis——————思维
C. Yuhao and a ParenthesisOne day, Yuhao came across a problem about checking if some bracket sequences are correct bracket sequences.A bracket sequence is any non-empty sequence of opening and clos...原创 2019-01-06 21:34:21 · 728 阅读 · 0 评论 -
Codeforces 977D. Divide by three, multiply by two
Divide by three, multiply by twoPolycarp likes to play with numbers. He takes some integer number x, writes it down on the board, and then performs with it n−1 operations of the two kinds:divide the...原创 2018-12-11 18:27:49 · 289 阅读 · 0 评论 -
Codeforces1092C. Prefixes and Suffixes——————思维,字符串
C. Prefixes and SuffixesIvan wants to play a game with you. He picked some string s of length n consisting only of lowercase Latin letters.You don’t know this string. Ivan has informed you about all...原创 2018-12-21 16:42:20 · 1208 阅读 · 1 评论 -
NYOJ 33 蛇形填数——————思维
蛇形填数时间限制:3000 ms | 内存限制:65535 KB难度:3描述在nn方陈里填入1,2,…,nn,要求填成蛇形。例如n=4时方陈为:10 11 12 19 16 13 28 15 14 37 6 5 4输入直接输入方陈的维数,即n的值。(n&lt;=100)输出输出结果是蛇形方陈。样例输入3样例输出7 8 16 9 25 4 3#includ...原创 2018-11-01 23:57:23 · 202 阅读 · 0 评论 -
The Preliminary Contest for ICPC Asia Nanjing 2019
H - Holy GrailAs the current heir of a wizarding family with a long history,unfortunately, you find yourself forced to participate in the cruel Holy Grail War which has a reincarnation of sixty years...原创 2019-09-04 15:56:11 · 184 阅读 · 0 评论