- 博客(9)
- 收藏
- 关注
原创 欧拉函数学习笔记整理 POJ 2407+POJ 1284+POJ 2478+POJ 3090
定义欧拉函数φ(x)代表1-x中与x互质的数的个数。基本相关性质1.设x=a1p1∗a2p2∗...∗anpnx=a1p1∗a2p2∗...∗anpnx={a1}^{p1}*{a2}^{p2}*...*{an}^{pn} 则φ(x)=x∗(1−1a1)∗(1−1a2)∗...∗(1−1an)x∗(1−1a1)∗(1−1a2)∗...∗(1−1an)x*(1-\frac{1}{a1...
2017-04-27 19:18:11 599
原创 山东省第一届ACM省赛 Fairy tale(模拟)
Problem DescriptionIt is said that in a school’s underground, there is a huge treasure which can meet any desire of the owner.The Spy Union (SU) is very interest in this legend. After much investigati
2017-04-25 19:22:03 671
原创 POJ 3103 Astronomy
DescriptionThere are n planets in the planetary system of star X. They orbit star X in circular orbits located in the same plane. Their tangent velocities are constant. Directions of orbiting of all pl
2017-04-24 19:08:19 679
原创 POJ 1011 Sticks(深搜+剪枝)
DescriptionGeorge took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the original state, but he forgot how many sticks h
2017-04-23 17:57:31 450
原创 POJ 2891 Strange Way to Express Integers(扩展欧几里得)
DescriptionElina is reading a book written by Rujia Liu, which introduces a strange way to express non-negative integers. The way is described as following: Choose k different positive integers a1, a2
2017-04-18 17:08:15 418
原创 POJ 2115 C Looooops(扩展欧几里得)
DescriptionA Compiler Mystery: We are given a C-language style for loop of type for (variable = A; variable != B; variable += C)statement;I.e., a loop which starts by setting variable to value A and
2017-04-16 21:23:19 649
原创 POJ 1265 Area(Pick定理、向量积求面积)
DescriptionBeing well known for its highly innovative products, Merck would definitely be a good target for industrial espionage. To protect its brand-new research and development facility the company
2017-04-13 19:34:15 763
原创 最长公共子序列+最长递增子序列+最长递增公共子序列
//求最长公共子序列int dp[maxn][maxn];int a[maxn],b[maxn];int main(){ int m,n; scanf("%d %d",&m,&n); for(int i=1; i<=m; i++) scanf("%d",&a[i]); for(int i=1; i<=n; i++) scanf("
2017-04-11 09:42:20 958
原创 蓝桥杯 矩阵翻硬币
题意 问题描述 小明先把硬币摆成了一个 n 行 m 列的矩阵。 随后,小明对每一个硬币分别进行一次 Q 操作。 对第x行第y列的硬币进行 Q 操作的定义:将所有第 i*x 行,第 j*y 列的硬币进行翻转。 其中i和j为任意使操作可行的正整数,行号和列号都是从1开始。 当小明对所有硬币都进行了一次 Q 操作后,他发现了一个奇迹——所有硬币均为正面朝上。 小明想知道最开始有多少枚硬币
2017-04-04 21:32:11 444
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人