03 2018 档案
摘要:#1097 : 最小生成树一·Prim算法 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 最近,小Hi很喜欢玩的一款游戏模拟城市开放出了新Mod,在这个Mod中,玩家可以拥有不止一个城市了! 但是,问题也接踵而来——小Hi现在手上拥有N座城市,且已知这N座城市中任意两
阅读全文
摘要:#1089 : 最短路径·二:Floyd算法 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 万圣节的中午,小Hi和小Ho在吃过中饭之后,来到了一个新的鬼屋! 鬼屋中一共有N个地点,分别编号为1..N,这N个地点之间互相有一些道路连通,两个地点之间可能有多条道路连通,但
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/82/A来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制
阅读全文
摘要:Pairs Forming LCM Find the result of the following code: long long pairsFormLCM( int n ) { long long res = 0; for( int i = 1; i <= n; i++ ) for( int j
阅读全文
摘要:Dr. Mob has just discovered a Deathly Bacteria. He named it RC-01. RC-01 has a very strange reproduction system. RC-01 lives exactly x days. Now RC-01
阅读全文
摘要:Fantasy of a Summation If you think codes, eat codes then sometimes you may get stressed. In your dreams you may see huge codes, as I have seen once.
阅读全文
摘要:Pick The Sticks Time Limit: 15000/10000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 2540 Accepted Submission(s): 85
阅读全文
摘要:#1043 : 完全背包 时间限制:20000ms 单点时限:1000ms 内存限制:256MB 描述 且说之前的故事里,小Hi和小Ho费劲心思终于拿到了茫茫多的奖券!而现在,终于到了小Ho领取奖励的时刻了! 等等,这段故事为何似曾相识?这就要从平行宇宙理论说起了………总而言之,在另一个宇宙中,小H
阅读全文
摘要:时间限制:20000ms 单点时限:1000ms 内存限制:256MB 描述 且说上一周的故事里,小Hi和小Ho费劲心思终于拿到了茫茫多的奖券!而现在,终于到了小Ho领取奖励的时刻了! 小Ho现在手上有M张奖券,而奖品区有N件奖品,分别标号为1到N,其中第i件奖品需要need(i)张奖券进行兑换,同
阅读全文
摘要:Oulipo Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 45875 Accepted: 18311 Description The French author Georges Perec (1936–1982) once w
阅读全文
摘要:Prime Distance Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20709 Accepted: 5563 Description The branch of mathematics called number the
阅读全文
摘要:Help Hanzo Amakusa, the evil spiritual leader has captured the beautiful princess Nakururu. The reason behind this is he had a little problem with Han
阅读全文
摘要:Yu Zhou likes to play Go with Su Lu. From the historical research, we found that there are much difference on the rules between ancient go and modern
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/90/E来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/90/L来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/90/K来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/90/J来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/90/G来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/90/F来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/90/A来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/79/C来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制
阅读全文
摘要:分析:题目给出一个公式f(n)=n*n+n+41,输入a和b,0<=a<=b<=10000, 问在区间[a,b]中满足f(k)是素数的数所占的百分比。 b的范围不大,直接暴力素数打表即可。 最后输出保留两位小数,卡精度,必须在结果加上1e-5(或者更小)保证精度。 例如,输入 6000 9999,不
阅读全文
摘要:We all know the Super Powers of this world and how they manage to get advantages in political warfare or even in other sectors. But this is not a poli
阅读全文
摘要:You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 1*2*...*N. For e
阅读全文
摘要:Given two integers, a and b, you should check whether a is divisible by b or not. We know that an integer a is divisible by an integer b if and only i
阅读全文
摘要:Farey Sequence Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 17894 Accepted: 7179 Description The Farey Sequence Fn for any integer n wit
阅读全文
摘要:Sigma Function Sigma function is an interesting function in Number Theory. It is denoted by the Greek letter Sigma (σ). This function actually denotes
阅读全文
摘要:It's said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. Here we are concerned about the fi
阅读全文
摘要:I was trying to solve problem '1234 - Harmonic Number', I wrote the following code long long H( int n ) { long long res = 0; for( int i = 1; i <= n; i
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/70/E来源:牛客网 题目描述 有一只乌龟,初始在0的位置向右跑。 这只乌龟会依次接到一串指令,指令T表示向后转,指令F表示向前移动一个单位。乌龟不能忽视任何指令。 现在我们要修改其中正好n个指令(一个指令可以被改多次,
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/85/C来源:牛客网 题目描述 毕竟是元宵节,晚上还是要吃几个元宵。 Etéreo 家可是个大家庭,元宵的数量,甚至是餐具的数量,都多的惊人。现在,爱数学的 Etéreo 又来问你有趣的数学题了,快来秒掉它! Etére
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/70/C来源:牛客网 题目描述 定义一个数字为幸运数字当且仅当它的所有数位都是4或者7。 比如说,47、744、4都是幸运数字而5、17、467都不是。 假设现在有一个数字d,现在想在d上重复k次操作。 假设d有n位,用
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/70/B来源:牛客网 题目描述 定义一个数字为幸运数字当且仅当它的所有数位都是4或者7。 比如说,47、744、4都是幸运数字而5、17、467都不是。 定义next(x)为大于等于x的第一个幸运数字。给定l,r,请求出
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/70/F来源:牛客网 在一个n*n的国际象棋棋盘上有m个皇后。 一个皇后可以攻击其他八个方向的皇后(上、下、左、右、左上、右上、左下、右下)。 对于某个皇后,如果某一个方向上有其他皇后,那么这个方向对她就是不安全的。 对
阅读全文
摘要:Harmonic Number In mathematics, the nth harmonic number is the sum of the reciprocals of the first n natural numbers: In this problem, you are given n
阅读全文
摘要:Leading and Trailing You are given two integers: n and k, your task is to find the most significant three digits, and least significant three digits o
阅读全文
摘要:Goldbach's Conjecture Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7550 Accepted Submission(s)
阅读全文
摘要:青蛙的约会 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 123444 Accepted: 26326 Description 两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上
阅读全文
摘要:Mathematically Hard Mathematically some problems look hard. But with the help of the computer, some problems can be easily solvable. In this problem,
阅读全文
摘要:Bi-shoe and Phi-shoe Bamboo Pole-vault is a massively popular sport in Xzhiland. And Master Phi-shoe is a very popular coach for his success. He needs
阅读全文
摘要:Find The Multiple Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 37787 Accepted: 15781 Special Judge Description Given a positive integer
阅读全文
摘要:Curling 2.0 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 23996 Accepted: 9692 Description On Planet MM-21, after their Olympic games thi
阅读全文
摘要:Sudoku Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 21946 Accepted: 10406 Special Judge Description Sudoku is a very simple task. A squa
阅读全文
摘要:Buttons Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4117 Accepted: 1137 Description As you surely already know, Yekaterinburg has gotte
阅读全文
摘要:邂逅明下 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5303 Accepted Submission(s): 2468 Problem De
阅读全文
摘要:悼念512汶川大地震遇难同胞——选拔志愿者 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11092 Accepted Submission(s
阅读全文
摘要:Brave Game Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13783 Accepted Submission(s): 9310 Pro
阅读全文