
水题
文章平均质量分 51
ctsas
这个作者很懒,什么都没留下…
展开
-
【51nod】1008 N的阶乘 mod P
1008 N的阶乘 mod P基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注输入N和P(P为质数),求N! Mod P = ? (Mod 就是求模 %)例如:n = 10, P = 11,10! = 36288003628800 % 11 = 10Input原创 2016-12-09 23:32:06 · 1420 阅读 · 0 评论 -
[51NOD]-1087 1 10 100 1000 [思维]
1,10,100,1000…组成序列1101001000…,求这个序列的第N位是0还是1。 Input 第1行:一个数T,表示后面用作输入测试的数的数量。(1 <= T <= 10000) 第2 - T + 1行:每行1个数N。(1 <= N <= 10^9) Output 共T行,如果该位是0,输出0,如果该位是1,输出1。 Input示例 3 1 2 3 Output示例原创 2017-07-18 18:25:26 · 310 阅读 · 0 评论 -
[南阳]-19 擅长排列的小明 [STL/DFS]
擅长排列的小明时间限制:1000 ms | 内存限制:65535 KB输入第一行输入整数N(1<N<10)表示多少组测试数据,每组测试数据第一行两个整数 n m (1<n<9,0<m<=n)输出在1-n中选取m个字符进行全排列,按字典序全部输出,每种排列占一行,每组数据间不需分界。URL :http://acm.nyist.net/JudgeOnline/problemset.php?原创 2017-07-18 13:47:07 · 285 阅读 · 0 评论 -
2017年浙江工业大学之江学院程序设计竞赛预赛
来一波水题的题解。(E,G,O没写出来 题目链接 http://115.231.222.240:8081/JudgeOnline/contest.php?cid=1002A原创 2017-05-28 18:58:08 · 3522 阅读 · 0 评论 -
[51nod] 1013 3的幂的和 [逆元][水题]
求:30+31+...+3(N)mod10000000073^0 + 3^1 +...+ 3^(N) \mod 1000000007 Input 输入一个数 N(0<=N<=109)N(0 <= N <= 10^9) Output 输出:计算结果 Input示例 3 Output示例 40题解等比数列求和即可 ans=(1−3n+1)⋅2−1mod1000000007ans=(1-原创 2017-04-20 08:46:37 · 279 阅读 · 0 评论 -
codeforces 789/problem/B [map][坑]
B. Masha and geometric depression time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Masha really loves algebra. On the last lesson, her stric原创 2017-04-04 18:43:41 · 359 阅读 · 0 评论 -
codeforces 782/problem/B [二分]
B. The Meeting Place Cannot Be Changedtime limit per test5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe main road in Byt原创 2017-04-04 09:47:41 · 434 阅读 · 0 评论 -
[51NOD]1283 最小周长[数学]
一个矩形的面积为S,已知该矩形的边长都是整数,求所有满足条件的矩形中,周长的最小值。例如:S = 24,那么有{1 24} {2 12} {3 8} {4 6}这4种矩形,其中{4 6}的周长最小,为20。 Input 输入1个数S(1 <= S <= 10^9)。 Output 输出最小周长。 Input示例 24 Output示例 20题解#include<cstdio>#in原创 2017-03-04 15:44:08 · 612 阅读 · 0 评论 -
[HPU] 1075: KACA的数字排序 [排序][水题]
题目描述 PIPA想让KACA给一串数进行排序。KACA表示这是个简单的问题,然而当他看到这些数字后,顿时懵逼了。只见各种1234567890987654321……都是非常巨大的数字,但在他思考之后,还是选择接下了这个任务。输入 第一行是一个整数TT ( 1≤T≤1001≤T≤100 ),代表有TT组测试数据。每组数据第一行是一个整数nn ( 1≤n≤1001≤n≤100 ),代表有nn个数字。原创 2017-03-04 12:02:42 · 379 阅读 · 0 评论 -
Asphalting Roads [水题]
City X consists of n vertical and n horizontal infinite roads, forming n × n intersections. Roads (both vertical and horizontal) are numbered from 1 to n, and the intersections are indicated by the num原创 2017-03-04 10:29:09 · 451 阅读 · 0 评论 -
Alena's Schedule[水题]
Description Alena has successfully passed the entrance exams to the university and is now looking forward to start studying.One two-hour lesson at the Russian university is traditionally called a pair原创 2017-03-04 10:27:21 · 292 阅读 · 0 评论 -
Laurenty and Shop[水题]
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output A little boy Laurenty has been playing his favourite game Nota for quite a while and is now原创 2017-03-04 10:25:36 · 419 阅读 · 0 评论 -
[POJ]1142-Smith Numbers [暴力][容斥]
DescriptionWhile skimming his phone directory in 1982, Albert Wilansky, a mathematician of Lehigh University,noticed that the telephone number of his brother-in-law H. Smith had the following peculiar原创 2017-02-11 21:20:06 · 402 阅读 · 0 评论 -
[HDU]2848 The Euler function[欧拉函数][水题]
Problem Description The Euler function phi is an important kind of function in number theory, (n) represents the amount of the numbers which are smaller than n and coprime to n, and this function has原创 2017-02-17 21:19:28 · 425 阅读 · 0 评论 -
[HDU]1286 找新朋友 [欧拉函数]
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=1286Problem Description 新年快到了,“猪头帮协会”准备搞一个聚会,已经知道现有会员N人,把会员从1到N编号,其中会长的号码是N号,凡是和会长是老朋友的,那么该会员的号码肯定和N有大于1的公约数,否则都是新朋友,现在会长想知道究竟有几个新朋友?请你编程序帮会长计算出来。Input原创 2017-02-17 21:11:22 · 308 阅读 · 0 评论 -
Maximum GCD [水题]
Given the N integers, you have to find the maximum GCD (greatest common divisor) of every possible pair of these integers.InputThe first line of input is an integer N (1 < N < 100) that determines the原创 2017-02-16 14:03:58 · 956 阅读 · 0 评论 -
【51nod】1012 最小公倍数LCM - 辗转相除法
1012 最小公倍数LCM基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注输入2个正整数A,B,求A与B的最小公倍数。Input2个数A,B,中间用空格隔开。(1Output输出A与B的最小公倍数。Input示例30 105Outp原创 2016-12-09 23:43:55 · 357 阅读 · 0 评论 -
2016-2017 HPU暑期集训练习赛
2016-2017 HPU暑期集训练习赛 http://acm.hpu.edu.cn/vjudge/contest/题解贴到github了 https://github.com/luozui/luozui.github.io/tree/master/code/HPU%E6%9A%91%E6%9C%9F%201原创 2017-07-23 08:46:21 · 492 阅读 · 0 评论