===========数学知识===========
文章平均质量分 74
MiaoPlus
不要假装自己很努力,因为结果不会陪你演戏
展开
-
Hdu.1564.Play a game(巴什博奕)
F - Play a gameTime Limit: 1000 MS Memory Limit: 32768 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status]DescriptionNew Year is Coming! ailyanlu is very happy today! and ...原创 2018-05-09 18:24:01 · 163 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第五场). gpa(0 / 1 分数规划)
链接:https://www.nowcoder.com/acm/contest/143/A来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288KSpecial Judge, 64bit IO Format: %lld题目描述Kanade selected n courses in the university. The...原创 2018-08-03 16:19:56 · 227 阅读 · 0 评论 -
Contest1391 - 2018年第三阶段个人训练赛第六场.Derangement(思维)
问题 J: Derangement时间限制: 1 Sec 内存限制: 128 MB提交: 388 解决: 202[提交] [状态] [讨论版] [命题人:admin]题目描述You are given a permutation p1,p2,…,pN consisting of 1,2,..,N. You can perform the following operation ...原创 2018-07-29 16:11:58 · 345 阅读 · 0 评论 -
2018 Multi-University Training Contest 2.Game
GameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 342 Accepted Submission(s): 246 Problem DescriptionAlice and Bob are playing a ga...原创 2018-07-26 10:51:22 · 156 阅读 · 0 评论 -
2018 Multi-University Training Contest 1.Maximum Multiple(整除运算)
Maximum MultipleTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0 Problem DescriptionGiven an integer n, Ch...原创 2018-07-23 22:16:32 · 223 阅读 · 0 评论 -
Codeforces.985B.Switches and Lamps(思维)
B. Switches and Lampstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given n switches and m lamps. The i-th switch turns on some subset of...原创 2018-05-27 16:37:58 · 359 阅读 · 0 评论 -
FZU2286 RPG(思维)
Simon最近迷上了一款RPG游戏,现在他要从坐标(0,0)沿着y轴跑到坐标(0,100),他每秒能跑1个单位长度。可是沿途的怪物可不会让他这么容易的就跑到,怪物会选择最优路径进行拦截,而且每个怪物跑的都比Simon快。当怪物和Simon在同一坐标的时候,就会爆发战斗。但是Simon强,无敌,战斗一开始就可以把怪物秒了(也就是说,战斗是不消耗时间的)。现在Simon想知道跑到目的地前他要和几只怪物...原创 2018-06-05 21:48:25 · 440 阅读 · 0 评论 -
FZU2287 给力的移动(思维)
你的弟弟给你安排了一个任务,他给了你1到N个数字的乱序排列,现在你想给你的弟弟秀一波操作,操作最少的次数把序列变成1到N的顺序排列,每次操作你可以选择序列中的一个数字并把它移动到序列的头部或尾部。Input包含多组测试数据。每组测试数据的第一行为正整数N,表示排列的长度。第二行为N个数字的乱序排列。n≤100000Output输出最少的操作次数Sample Input66 3 2 4 5 1S...原创 2018-06-05 22:13:03 · 364 阅读 · 0 评论 -
HDU.6294.SA-IS后缀数组(思维)
小Q最近阅读了SA-IS算法在线性时间内构造后缀数组的相关论文,面对任何字符串题,都可以想出线性时间的算法。 小T在经历过二分图匹配事件后,再也不相信小Q所说的话。面对小Q,小T又给出了一道字符串题: 给定一个长度为nn的小写字符串S[1..n]S[1..n],设sufisufi表示以ii 为开始的后缀,即S[i..n]S[i..n]。 记|X||X|为字符串XX的长度,对于两个字符串XX和YY,...原创 2018-06-07 20:45:30 · 636 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第五场).plan(模拟)
链接:https://www.nowcoder.com/acm/contest/143/G来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述Give two positive integer c, n. You need to find a pair of inte...原创 2018-08-03 16:30:33 · 312 阅读 · 0 评论 -
2018 Multi-University Training Contest 6.oval-and-rectangle(积分+数据精度)
oval-and-rectangleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 481 Accepted Submission(s): 222 Problem DescriptionPatrick Star fin...原创 2018-08-09 10:47:28 · 210 阅读 · 0 评论 -
HDU-5538 House Building(思维)
问题 L: House Building时间限制: 1 Sec 内存限制: 128 MB提交: 66 解决: 49[提交] [状态] [讨论版] [命题人:admin]题目描述Have you ever played the video game Minecraft? This game has been one of the world’s most popular game...原创 2018-10-02 14:20:35 · 346 阅读 · 0 评论 -
Hdu.5512 Pagodas(思维)
时间限制: 1 Sec 内存限制: 128 MB提交: 55 解决: 36[提交] [状态] [讨论版] [命题人:admin]题目描述n pagodas were standing erect in Hong Jue Si between the Niushou Mountain and the Yuntai Mountain, labelled from 1 to n. How...原创 2018-10-01 12:44:58 · 337 阅读 · 0 评论 -
Educational Codeforces Round 50 (Rated for Div. 2).B. Diagonal Walking v.2(思维)
B. Diagonal Walking v.2time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMikhail walks on a Cartesian plane. He starts at the point...原创 2018-09-18 18:38:33 · 347 阅读 · 0 评论 -
UKIEPC2017 . I Work All Day(水题)
问题 I: I Work All Day时间限制: 1 Sec 内存限制: 128 MB Special Judge提交: 74 解决: 69[提交] [状态] [讨论版] [命题人:admin]题目描述Michael is a lumberjack, and a pretty OK one at that. However, automation is making fas...原创 2018-08-31 23:49:40 · 414 阅读 · 0 评论 -
ICPC 2017 Japan Tsukuba . Medical Checkup(思维)
问题 C: Medical Checkup时间限制: 2 Sec 内存限制: 128 MB提交: 199 解决: 58[提交] [状态] [讨论版] [命题人:admin]题目描述Students of the university have to go for a medical checkup, consisting of lots of checkup items,num...原创 2018-08-31 23:38:42 · 538 阅读 · 0 评论 -
矩阵快速幂总结
转载地址:https://blog.csdn.net/wust_zzwh/article/details/52058209基础知识:(会基础的直接看应用部分)(1)矩阵乘法简单的说矩阵就是二维数组,数存在里面,矩阵乘法的规则:A*B=C其中c[i][j]为A的第i行与B的第j列对应乘积的和,即:代码: const int N=100; int...转载 2018-08-18 18:42:33 · 235 阅读 · 0 评论 -
2018 Multi-University Training Contest 5.Everything Has Changed
Everything Has ChangedTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 3444 Accepted Submission(s): 909Special Judge Problem Descripti...原创 2018-08-07 09:20:40 · 229 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第二场).run(递推)
链接:https://www.nowcoder.com/acm/contest/140/A来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 131072K,其他语言262144K64bit IO Format: %lld题目描述White Cloud is exercising in the playground.White Cloud can wa...原创 2018-07-27 19:56:13 · 202 阅读 · 0 评论 -
HDU.6276.Easy h-index
比赛题目: http://acm.hdu.edu.cn/downloads/2018ccpc_hn.pdf The hh-index of an author is the largest hh where he has at least hh papers with citations not less than hh. Bobo has published many papers. Given...原创 2018-06-10 01:02:52 · 625 阅读 · 0 评论 -
Poj.2007.Scrambled Polygon(凸包+极角排序(叉积))
L - Scrambled PolygonTime Limit: 1000 MS Memory Limit: 30000 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status]DescriptionA closed polygon is a figure bounded by a finite...原创 2018-05-04 20:45:57 · 167 阅读 · 0 评论 -
Snuke's Coloring 2-1(水题)
问题 H: Snuke's Coloring 2-1时间限制: 1 Sec 内存限制: 128 MB提交: 289 解决: 120[提交][状态][讨论版][命题人:admin]题目描述There is a rectangle in the xy-plane, with its lower left corner at (0,0) and its upper right corner at (...原创 2018-05-26 10:36:21 · 460 阅读 · 0 评论 -
HDU.6286.2018(容斥原理)
Given a,b,c,da,b,c,d, find out the number of pairs of integers (x,y)(x,y) where a≤x≤b,c≤y≤da≤x≤b,c≤y≤d and x⋅yx⋅y is a multiple of 20182018. InputThe input consists of several test cases and is termin...原创 2018-06-10 01:05:40 · 380 阅读 · 0 评论 -
Hdu.2516.取石子游戏(博弈论)
C - 取石子游戏Time Limit: 1000 MS Memory Limit: 32768 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status]Description1堆石子有n个,两人轮流取.先取者第1次可以取任意多个,但不能全部取完.以后每次取的石子数不能超过上次取子数的2倍。取完...原创 2018-05-07 20:09:51 · 224 阅读 · 0 评论 -
HDU.1846.Brave Game(巴什博弈)
D - Brave GameTime Limit: 1000 MS Memory Limit: 32768 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status]Description十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫《勇敢者的游戏》(英文名称:Zath...原创 2018-05-08 20:27:20 · 185 阅读 · 0 评论 -
Hdu.2177.取(2堆)石子游戏(威佐夫博弈(Wythoff Game))
A - 取(2堆)石子游戏Time Limit: 1000 MS Memory Limit: 32768 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status]Description有两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆...原创 2018-05-08 21:13:48 · 282 阅读 · 0 评论 -
Hdu.1847.Good Luck in CET-4 Everybody!(巴什博奕)
E - Good Luck in CET-4 Everybody!Time Limit: 1000 MS Memory Limit: 32768 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status]Description大学英语四级考试就要来临了,你是不是在紧张的复习?也许紧张得连短学期的A...原创 2018-05-09 18:14:11 · 208 阅读 · 0 评论 -
Hdu.2176.取(m堆)石子游戏(Nim博弈)
B - 取(m堆)石子游戏Time Limit: 1000 MS Memory Limit: 32768 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status]Descriptionm堆石子,两人轮流取.只能在1堆中取.取完者胜.先取者负输出No.先取者胜输出Yes,然后输出怎样取子.例如5堆...原创 2018-05-08 22:12:08 · 210 阅读 · 0 评论 -
博弈论总结
我只是个搬运工……博弈论小结by xaphoenix写在前面第一次写一个专题的总结,由于笔者水平有限,所以里面肯定会有很多不恰当之处,希望读者不吝赐教。此外,这个小结中,有大约2000字的直接复制粘贴的知识介绍,有几道题的题目分析或者题意概括来源于网上各位大牛的博客,所以笔者不具有著作权,具体的参考资料在本文最后列出。另外,为了节省页数(准备把这个带到现场),所以排版比较凌乱,字体基本都是五号字,...转载 2018-05-08 23:49:04 · 6082 阅读 · 0 评论 -
ABC046&ARC062.AtCoDeer and Election Report
问题 F: AtCoDeer and Election Report时间限制: 1 Sec 内存限制: 128 MB提交: 320 解决: 84[提交][状态][讨论版][命题人:admin]题目描述AtCoDeer the deer is seeing a quick report of election results on TV. Two candidates are standing ...原创 2018-05-26 10:25:13 · 1009 阅读 · 0 评论 -
Hdu.1005.Number Sequence
Number SequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 196614 Accepted Submission(s): 49257Problem DescriptionA number sequence is de...原创 2018-05-23 22:12:55 · 183 阅读 · 0 评论 -
Hdu.2504.又见GCD
F - 又见GCDTime Limit: 1000 MS Memory Limit: 32768 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status]Description有三个正整数a,b,c(0<a,b,c<10^6),其中c不等于b。若a和c的最大公约数为b,现已知a和b,...原创 2018-05-12 10:26:37 · 179 阅读 · 0 评论 -
Poj.2407.Relatives(欧拉函数(模板题))
A - RelativesTime Limit: 1000 MS Memory Limit: 65536 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status]DescriptionGiven n, a positive integer, how many positive integers ...原创 2018-05-12 15:38:53 · 198 阅读 · 0 评论 -
Poj.2480.Longge's problem(欧拉函数)
J - A/BTime Limit: 1000 MS Memory Limit: 32768 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status]Description要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973)...原创 2018-05-12 16:01:54 · 208 阅读 · 0 评论 -
练习赛20180428.Sign in(快速幂)
G - Sign inTime Limit: 1000 MS Memory Limit: 262144 KB64-bit integer IO format: %lld , %llu Java class name: Main[Submit] [Status]DescriptionThis is the easiest problem.There is a binary string. If it...原创 2018-05-12 16:25:06 · 213 阅读 · 0 评论 -
练习赛20180303.A - Co-prime(容斥原理)
A - Co-primeTime Limit: 1000 MS Memory Limit: 32768 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status]DescriptionGiven a number N, you are asked to count the number of in...原创 2018-05-04 18:43:54 · 135 阅读 · 0 评论 -
POJ.2773.Happy 2006
M - Happy 2006Time Limit: 3000 MS Memory Limit: 65536 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status]DescriptionTwo positive integers are said to be relatively prime t...原创 2018-05-05 09:22:43 · 149 阅读 · 0 评论 -
最大公约数
E - 最大公约数Time Limit: 1000 MS Memory Limit: 65536 KB64-bit integer IO format: %lld , %llu Java class name: Main[Submit] [Status]Description你的任务是计算A与B的最大公约数Input对于每组数据:第一行,包含两个数字a和b(1 <= a, b <= 1...原创 2018-05-12 10:17:22 · 245 阅读 · 0 评论 -
Hdu.1576.A/B(拓展欧几里得算法)
J - A/BTime Limit: 1000 MS Memory Limit: 32768 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status]Description要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973)...原创 2018-05-12 19:54:42 · 186 阅读 · 0 评论 -
HDU.5533 Dancing Stars on Me(思维+数学)
问题 G: Dancing Stars on Me时间限制: 1 Sec 内存限制: 128 MB提交: 95 解决: 49[提交] [状态] [讨论版] [命题人:admin]题目描述The sky was brushed clean by the wind and the stars were cold in a black sky. What a wonderful ni...原创 2018-10-02 15:52:09 · 266 阅读 · 0 评论