![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数学
文章平均质量分 89
___fouzhe
这个作者很懒,什么都没留下…
展开
-
Gym 100015A
题目大意: 小明的猜拳策略,先出R,然后每连续两段出拳策略是前一阶段的获胜方法。 样例: R P S PSR SRP PSRSRPRPS SRPRPSPSR PSRSRPRPSSRPRPSPSRRPSPSRSRP…. 第二个P可以赢第一个R,第三个S可以赢第二个P。接着的PSR可以赢前一阶段的RPS,SRP可以赢PSR。然后PSRSRPRPS可以赢R P S PSR SRP,SRPRPSPS原创 2016-02-21 22:39:37 · 489 阅读 · 0 评论 -
HDU 5974 A Simple Math Problem(数论)
题目链接A Simple Math ProblemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 833 Accepted Submission(s): 291Problem Description原创 2017-01-19 09:58:30 · 247 阅读 · 0 评论 -
hdu 5976 Detachment(数论,一个结论)
题目链接DetachmentTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 581 Accepted Submission(s): 197Problem DescriptionIn a hi原创 2017-01-19 16:39:01 · 229 阅读 · 0 评论 -
gym 100820G Racing Gems(二维LIS,好题)
题目链接Racing GemsYou are playing a racing game. Your character starts at thex axis (y= 0) and proceeds up therace track, which has a boundary at the linex = 0 and another atx =w.原创 2017-02-19 19:55:30 · 556 阅读 · 0 评论 -
codeforces 717 D. Dexterina’s Lab(矩阵快速幂加速dp,好题)
题目链接D. Dexterina’s Labtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDexterina and Womandark have been原创 2017-02-28 09:28:25 · 524 阅读 · 0 评论 -
bzoj 1002: [FJOI2007]轮状病毒(生成树计数,高精度)
题目链接1002: [FJOI2007]轮状病毒Time Limit: 1 Sec Memory Limit: 162 MBSubmit: 4816 Solved: 2628[Submit][Status][Discuss]Description 轮状病毒有很多变种,所有轮状病毒的变种都是从一个轮状基产生的。一个N轮状基由圆环上N个不同的基原子和圆心处一个原创 2017-01-22 17:22:26 · 713 阅读 · 0 评论 -
Codeforces Round #395 (Div. 2) E(数论)
题目链接E. Timofey and remodulingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Timofey likes inte原创 2017-02-12 22:21:51 · 385 阅读 · 0 评论 -
hdu 5396 Expression(区间dp,组合数,好题)
题目链接ExpressionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 835 Accepted Submission(s): 497Problem DescriptionTeacher原创 2017-01-23 20:19:20 · 351 阅读 · 0 评论 -
AtCoder Grand Contest 010 B(差分)
题目链接B - BoxesTime limit : 2sec / Memory limit : 256MBScore : 500 pointsProblem StatementThere are N boxes arranged in a circle. The i-th box contains Ai stones.Determine原创 2017-03-01 23:36:50 · 577 阅读 · 0 评论 -
Codeforces Round #289 (Div. 2, ACM ICPC Rules)E. Pretty Song(数学,想法题,好题)
E. Pretty Songtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputWhen Sasha was studying in the seventh grade,原创 2017-01-26 12:08:14 · 262 阅读 · 0 评论 -
51nod1189 阶乘分数(数学,好题)
题目链接1189 阶乘分数题目来源: Spoj基准时间限制:1 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 收藏 关注1/N! = 1/X + 1/Y(0,给出N,求满足条件的整数解的数量。例如:N = 2,1/2 = 1/3 + 1/6,1/2 = 1/4 + 1/4。由于数量可能很大,输出Mod原创 2017-01-26 20:21:44 · 286 阅读 · 0 评论 -
hdu 4345 Permutation(数论+dp)
题目链接PermutationTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 835 Accepted Submission(s): 493Problem DescriptionThere原创 2017-02-22 19:54:12 · 301 阅读 · 0 评论 -
gym101194 china final Problem E. Bet(数学,高精度)
题目链接Problem E. Bet Input file:Output file: Time limit:Standard InputStandard Ouptut1 secondThe 2016 ACM-ICPC Asia China-Final ContestThe Codejamongame原创 2017-02-23 09:58:34 · 1511 阅读 · 0 评论 -
gym 101124 Problem E. Dance Party(概率)
Problem E. Dance PartyTime limit: 0.5 secondsMemory limit: 256 megabytesDance parties, whether formal balls or less formal events, usuallyhave dress codes for the guests. The code may be more or l原创 2017-03-02 23:13:57 · 761 阅读 · 0 评论 -
gym 101170 Problem H Hamiltonian Hypercube(找规律?)
题目链接Problem HHamiltonian HypercubeHypercube graphs are fascinatingly regular, hence you have devoted a lot of time studying themathematics related to them. The vertices of a hypercube graph of d原创 2017-02-23 18:01:47 · 813 阅读 · 0 评论 -
ICM Technex 2017 and Codeforces Round #400 (Div. 1 + Div. 2, combined) C. Molly's Chemicals
题目链接C. Molly's Chemicalstime limit per test2.5 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputMolly Hooper has n different原创 2017-02-24 10:23:17 · 392 阅读 · 0 评论 -
AIM Tech Round (Div. 1) B. Array GCD(数论+dp)
题目链接B. Array GCDtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given array ai of length n.原创 2017-02-17 22:43:26 · 957 阅读 · 0 评论 -
gym-101138D(后缀和,莫队算法,容斥原理,好题)
题目链接D. Strange Queriestime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array with n in原创 2017-02-08 20:11:07 · 557 阅读 · 0 评论 -
扩展欧几里德算法
#include<iostream>#include<cstdio>using namespace std;void gcd(int a,int b,int& d,int& x,int& y);int main(){ int a,b; while(~scanf("%d%d",&a,&b)) { int d=0,x=0,y=0; //d为a原创 2016-07-19 09:14:53 · 205 阅读 · 0 评论 -
poj2635
The Embarrassed Cryptographer Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 13810 Accepted: 3758 DescriptionThe young and very promising cryptographer Odd Even has implement原创 2016-07-19 11:33:27 · 267 阅读 · 0 评论 -
HDU5793 A Boring Question (快速幂,逆元)
题目链接A Boring QuestionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 0 Accepted Submission(s): 0Problem Description There are an equation.原创 2016-08-04 18:02:21 · 335 阅读 · 0 评论 -
幻方构造模版
奇数幻方:#include using namespace std;const int maxn = 55;int a[maxn][maxn];int main(){ int n; scanf("%d",&n); int val = 1, pos = (n + 1) / 2; for (int i = 1; i <= (n + 1) / 2; i++) {原创 2016-09-09 17:02:09 · 352 阅读 · 0 评论 -
Codeforces 369 D.Directed Roads(数学,判断图中每个环的边数)
题目链接D. Directed Roadstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputZS the Coder and Chris the Baboon原创 2016-09-03 10:16:39 · 487 阅读 · 0 评论 -
51nod 1537 分解 (矩阵快速幂)
题目链接1537 分解基准时间限制:0.5 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 收藏 取消关注 问(1+sqrt(2)) ^n 能否分解成 sqrt(m) +sqrt(m-1)的形式 如果可以 输出 m%1e9+7 否则 输出noInput一行,一个数原创 2016-09-30 00:38:40 · 610 阅读 · 0 评论 -
Codeforces Round #376 (Div. 2) F. Video Cards(前缀和,好题)
题目链接F. Video Cardstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Vlad is fond of popular comput原创 2016-10-17 15:46:23 · 560 阅读 · 0 评论 -
Codeforces Round #373 (Div. 1)C(线段树维护矩阵,矩阵快速幂)
题目链接C. Sasha and Arraytime limit per test5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSasha has an array of integers a原创 2016-10-02 23:58:06 · 1132 阅读 · 0 评论 -
51node1677treecnt(组合数学,好题)
treecnt﹡ LH (命题人)基准时间限制:1 秒 空间限制:131072 KB 分值: 40给定一棵n个节点的树,从1到n标号。选择k个点,你需要选择一些边使得这k个点通过选择的边联通,目标是使得选择的边数最少。现需要计算对于所有选择k个点的情况最小选择边数的总和为多少。样例解释:一共有三种可能:(下列原创 2016-12-05 19:21:34 · 477 阅读 · 0 评论 -
hdu 5950 Recursive sequence(矩阵快速幂,经典矩阵构造方法)
题目链接Recursive sequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 632 Accepted Submission(s): 301Problem Description原创 2016-12-13 15:42:20 · 286 阅读 · 0 评论 -
Codeforces Round #382 (Div. 2)D. Taxes(哥德巴赫猜想)
题目链接D. Taxestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMr. Funt now lives in a country with a ver原创 2016-12-08 13:10:24 · 343 阅读 · 0 评论 -
Codeforces Round #341 (Div. 2)E(矩阵快速幂优化dp,好题)
题目链接E. Wet Shark and Blockstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are b blocks of digit原创 2017-02-04 19:49:08 · 446 阅读 · 0 评论 -
poj3734Blocks(矩阵快速优化的dp)
BlocksTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6418 Accepted: 3090DescriptionPanda has received an assignment of painting a line of blocks. Since原创 2017-02-04 20:11:25 · 257 阅读 · 0 评论 -
Codeforces Round #341 (Div. 2) Editorial D - Rat Kwesh and Cheese(数学,高精度)
题目链接D. Rat Kwesh and Cheesetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWet Shark asked Rat Kwesh t原创 2017-02-05 10:45:26 · 298 阅读 · 0 评论 -
gym101138F(数学,暴力)
题目链接F. GukiZ Heighttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGukiZ loves hiking in the mountains原创 2017-02-07 22:09:22 · 459 阅读 · 0 评论 -
gym 101194 china final Problem H. Great Cells(数学,想法题,好题)
题目链接Problem H. Great Cells Input file:Output file: Time limit:Standard InputStandard Ouptut2 secondsMr. Panda likes playing puzzles with grid paper. Recently he inv原创 2017-02-24 20:30:17 · 1287 阅读 · 0 评论