数论
文章平均质量分 66
chm_wt
csdn 已停更,请移步 https://www.cnblogs.com/chmwt/
展开
-
合唱队形 number 中国剩余定理&&拓展欧几里得
题目描述 学校要进行合唱比赛了,于是班主任小刘准备给大家排个队形。 他首先尝试排成 m1 行,发现最后多出来 a1 个同学;接着他尝试排成 m2 行,发现最后多出来 a2 个同学,……,他们尝试了 n 种排队方案,但每次都不能让同学们正好排成 mi 行。于是小刘寻求同事小明的帮助,以便给同学们排好队型。但小刘来去太匆忙,忘记告诉小明他们班有多少人了。没办法,现在只能根据上述信息求个满足要求的最...原创 2018-08-06 22:20:04 · 160 阅读 · 0 评论 -
POJ2976 - Dropping tests——分数规划
题目描述 In a certain course, you take n tests. If you get ai out of bi questions correct on test i, your cumulative average is defined to be Given your test scores and a positive integer k, determine h...原创 2018-08-06 22:04:35 · 109 阅读 · 0 评论 -
poj2249 Binomial Showdown——组合数
题目描述 In how many ways can you choose k elements out of n elements, not taking order into account? Write a program to compute this number. 输入 The input will contain one or more test cases. Each ...原创 2018-08-06 21:47:57 · 110 阅读 · 0 评论 -
poj2407 Relatives ——欧拉函数
题目描述Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if there are no integers x > 1, y > 0, z > 0 suc...原创 2018-08-06 21:30:33 · 167 阅读 · 0 评论 -
NOI2002荒岛野人 (savage)——拓展欧几里得
欢迎使用 Markdown 编辑器写博客本 Markdown 编辑器使用 StackEdit 修改而来,用它写博客,将会带来全新的体验哦:Markdown 和扩展 Markdown 简洁的语法代码块高亮图片链接和图片上传 LaTex 数学公式 UML 序列图和流程图离线写博客导入导出 Markdown 文件丰富的快捷键快捷键加粗 Ctrl + B ...原创 2018-08-06 21:16:14 · 738 阅读 · 0 评论 -
POJ-1284-Primitive Roots——欧拉函数
题目描述 We say that integer x, 0 <x < p, is a primitive root modulo odd prime p if and only if the set { (x i mod p) | 1 <= i <= p-1} is equal to {1, …, p-1}. For example, the consecutive po...原创 2018-08-06 21:36:14 · 211 阅读 · 0 评论