- 博客(99)
- 收藏
- 关注
原创 nyoj 众数问题 95 (数学)
众数问题时间限制:3000 ms | 内存限制:65535 KB难度:3描述 所谓众数,就是对于给定的含有N个元素的多重集合,每个元素在S中出现次数最多的成为该元素的重数,多重集合S重的重数最大的元素成为众数。例如:S={1,2,2,2,3,5},则多重集S的众数是2,其重数为3。现在你的任务是:对于给定的由m个自然数组成的多重集S,计算出S的
2015-10-31 22:39:21 431
原创 hdoj Game 5523 (判断)
GameAccepts: 369Submissions: 2320Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Problem DescriptionXY is playing a game:there are N pill
2015-10-31 22:15:57 462
原创 hdoj Numbers 5522 (判断)
NumbersAccepts: 571Submissions: 1212Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/262144 K (Java/Others)Problem DescriptionThere are n numbers A1,A2....An{A}_
2015-10-31 22:12:57 328
原创 nyoj 整数划分 90 (母函数)
整数划分时间限制:3000 ms | 内存限制:65535 KB难度:3描述 将正整数n表示成一系列正整数之和:n=n1+n2+…+nk, 其中n1≥n2≥…≥nk≥1,k≥1。 正整数n的这种表示称为正整数n的划分。求正整数n的不 同划分个数。 例如正整数6有如下11种不同的划分: 6; 5+1; 4+2,4+1+1; 3
2015-10-31 21:29:21 468
原创 nyoj 星际之门(一) 127 (无根树转有根树)
星际之门(一)时间限制:3000 ms | 内存限制:65535 KB难度:3描述 公元3000年,子虚帝国统领着N个星系,原先它们是靠近光束飞船来进行旅行的,近来,X博士发明了星际之门,它利用虫洞技术,一条虫洞可以连通任意的两个星系,使人们不必再待待便可立刻到达目的地。帝国皇帝认为这种发明很给力,决定用星际之门把自己统治的各个星系连结在一起。
2015-10-31 18:09:13 269
原创 nyoj 有趣的数 85 (简单数学规律)
有趣的数时间限制:3000 ms | 内存限制:65535 KB难度:2描述 把分数按下面的办法排成一个数表。1/1 1/2 1/3 1/4.....2/1 2/2 2/3....3/1 3/2 ....4/1..............我们以z字型方法给上表的每项编号。特定方法:第一项是1/1,然后是1/2、2/1、3/1、2/2
2015-10-31 17:36:57 559
原创 hdoj 1454&&poj 1039 Pipe 1454 (数学计算几何) 枚举
PipeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 235 Accepted Submission(s): 94Problem DescriptionThe GX Light Pipeline Compan
2015-10-31 15:46:49 594
原创 nyoj 管道问题 142 (数学计算几何)
管道问题时间限制:3000 ms | 内存限制:1000 KB难度:3描述 有一宽度为1的折线管道,如图所示,上面的各个定点为 (x0,y0),(x1,y1),(x2,y2) ……(xn,yn),下面各个定点为(x0,y0-1),(x1,y1-1),(x2,y2-1)……(xn,yn-1),假设管道都是不透明的,不反射的,光线从左边入口的(x0,y0),(
2015-10-31 15:40:37 840
原创 nyoj 最大四边形 952 (数学几何+技巧) 好题
最大四边形时间限制:1000 ms | 内存限制:65535 KB难度:2描述 平面坐标上有n个点,你知道能组成四边形中面积最大的是多少吗?输入有多组测试数据第一行整数n,表示有n个点,( 4然后n行,每行x,y表示点的坐标。(没有重复的点)输出最大四边形的面积.(保留六位小数)样例输入50 00 44 04 42 3样例
2015-10-30 18:29:17 503
原创 nyoj 圈水池 78 (二维凸包 数学几何) 凸包入门
圈水池时间限制:3000 ms | 内存限制:65535 KB难度:4描述 有一个牧场,牧场上有很多个供水装置,现在牧场的主人想要用篱笆把这些供水装置圈起来,以防止不是自己的牲畜来喝水,各个水池都标有各自的坐标,现在要你写一个程序利用最短的篱笆将这些供水装置圈起来!(篱笆足够多,并且长度可变)输入第一行输入的是N,代表用N组测试数据(1第二行输
2015-10-30 18:01:54 399
原创 nyoj 三点顺序 68 (数学几何)
三点顺序时间限制:1000 ms | 内存限制:65535 KB难度:3描述 现在给你不共线的三个点A,B,C的坐标,它们一定能组成一个三角形,现在让你判断A,B,C是顺时针给出的还是逆时针给出的?如:图1:顺时针给出图2:逆时针给出 输入每行是一组测试数据,有6
2015-10-30 13:57:12 408
原创 poj Intersecting Lines 1269 (数学几何 判断两条直线是否相交)
Intersecting LinesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 12837 Accepted: 5702DescriptionWe all know that a pair of distinct points on a plane def
2015-10-29 22:13:32 375
原创 poj Intersection 1410 (数学几何 求线段方程)
IntersectionTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 13147 Accepted: 3426DescriptionYou are to write a program that has to decide whether a given l
2015-10-29 21:14:11 467
原创 poj Prime Cuts 1595 (素数打表 选择性素数输出)
Prime CutsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 10948 Accepted: 4160DescriptionA prime number is a counting number (1, 2, 3, ...) that is evenly
2015-10-29 19:45:19 475
原创 hdoj Score 2534 (数学)
ScoreTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1055 Accepted Submission(s): 454Problem Description大家都知道,pfz是“成电杰出学生”,在成电杰出学生的颁奖典礼
2015-10-29 18:06:27 322
原创 poj C Looooops 2115 (拓展欧几里得+数学)
C LooooopsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 20725 Accepted: 5598DescriptionA Compiler Mystery: We are given a C-language style for loop of t
2015-10-28 22:35:48 336
原创 hdoj Color the ball 1556 (线段树&&树状数组 区间值更新)
Color the ballTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13501 Accepted Submission(s): 6783Problem DescriptionN个气球排成一排,从左到右依
2015-10-28 18:08:31 343
原创 hdoj Minimum Transport Cost 1385 (floyd++路径输出)
Minimum Transport CostTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9069 Accepted Submission(s): 2389Problem DescriptionThese a
2015-10-27 22:30:29 360
原创 hdoj 遮挡判断 2540 (简单数学)
遮挡判断Time Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 917 Accepted Submission(s): 299Problem Description在一个广场上有一排沿着东西方向排列的石柱子,阳光从东
2015-10-27 20:03:41 367
原创 九度oj Prime Number 1040 (素数打表)
Prime Number 题目描述:Output the k-th prime number.输入:k≤10000输出:The k-th prime number.样例输入:37样例输出:517#include#include#define N 10010int p[N];bool pp[N];i
2015-10-26 22:28:31 451
原创 hdoj 分拆素数和 2089 (素数打表++枚举)
分拆素数和Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 27337 Accepted Submission(s): 11945Problem Description把一个偶数拆成两个不同素数的和,有几种拆法呢
2015-10-26 22:05:23 341
原创 poj Sum of Consecutive Prime Numbers 2739 (素数打表)
http://blog.csdn.net/smcwwh/article/details/5734341素数打表
2015-10-25 22:17:54 312
原创 nyoj 小珂的苦恼 144 (简单拓展欧几里得)
小珂的苦恼时间限制:1000 ms | 内存限制:1000 KB难度:2描述 小珂是一名初中生,她现在很苦恼,因为老师布置了一个让她苦恼的作业,你能不能帮助她呢?题目信息如下。 已知二元一次方程 a*x+b*y=n, 判断这个二元一次方程有没有整数解,x,y为未知数,其中a,b,n都为整数且不等于零,同时满足0输入第一行有一个
2015-10-25 21:59:41 509
原创 hdoj A/B 1576 (拓展欧几里得) 数学变换
A/BTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3341 Accepted Submission(s): 2535Problem Description要求(A/B)%9973,但由于A很大,我们只给出n
2015-10-25 21:24:20 366
原创 poj 青蛙的约会 1061 (拓展欧几里得 模板)
青蛙的约会Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 99588 Accepted: 18979Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止
2015-10-25 19:00:37 302
原创 poj Substrings 1226 (KMP&&枚举)
SubstringsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 13039 Accepted: 4626DescriptionYou are given a number of case-sensitive strings of alphabetic ch
2015-10-25 11:27:36 265
原创 poj Corporate Identity 3450 (KMP&&枚举) 好题
Corporate IdentityTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 5804 Accepted: 2108DescriptionBeside other services, ACM helps companies to clearly st
2015-10-25 10:51:54 282
原创 lightoj 最长回文字符串 1258 (KMP&manacher)
最长回文字符串DescriptionA string is said to be a palindrome if it remains same when read backwards. So, 'abba', 'madam' both are palindromes, but 'adam' is not.Now you are given a non-empty
2015-10-25 09:28:51 388
原创 zoj Modular Inverse 3609 (拓展欧几里德)
ZOJ Problem Set - 3609Modular InverseTime Limit: 2 Seconds Memory Limit: 65536 KB The modular modular multiplicative inverse of an integer a modulo m is an integer x such that a-1
2015-10-24 22:25:30 312
原创 codeforces Line 7C (拓展欧几里德+思想 模板) 好题
C. LineDescriptionA line on the plane is described by an equation Ax + By + C = 0. You are to find any point on this line, whose coordinates are integer numbers from - 5·1018 to 5·1018 incl
2015-10-24 21:04:17 798
原创 lightoj 1148 - Mad Counting (数学规律&模拟)
1148 - Mad CountingPDF (English) Statistics ForumTime Limit: 0.5 second(s) Memory Limit: 32 MBMob was hijacked by the mayor of the Town "TruthTown". Mayor wants Mob to count the total population
2015-10-24 20:18:25 304
原创 lightoj Rooks 1005 (棋盘放车问题) (数学规律)
1005 - RooksPDF (English)StatisticsForumTime Limit: 1 second(s)Memory Limit: 32 MBA rook is a piece used in the game of chess which is played on a b
2015-10-24 19:05:34 563
原创 UVA Josephus Problem 11089 (约瑟夫环) 数学好题
Josephus ProblemTime Limit: 2000msMemory Limit: 32768KBThis problem will be judged on LightOJ. Original ID: 117964-bit integer IO format: %lld Java class name: MainPrev Submit Statu
2015-10-24 12:06:33 684
原创 nyoj 1的个数 514 (数学)
1的个数时间限制:1000 ms | 内存限制:65535 KB难度:3描述给你两个数a和b,你的任务是计算出1在a和b之间出现的次数,比如说,如果a=1024,b=1032,那么a和b之间的数就是:1024 1025 1026 1027 1028 1029 1030 1031 1032则有10个1出现在这些数中。输入输入不会超过500行
2015-10-23 23:16:22 376
原创 hdoj Happy Matt Friends 5119 (DP) 好题
Happy Matt FriendsTime Limit: 6000/6000 MS (Java/Others) Memory Limit: 510000/510000 K (Java/Others)Total Submission(s): 1828 Accepted Submission(s): 725Problem DescriptionMatt has N
2015-10-23 20:47:41 323
原创 Lottery (水题)
LotteryTime Limit:2000MS Memory Limit:524288KB 64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 589IDescriptionToday Berland holds a lottery with a prize —
2015-10-22 21:32:36 615
原创 hdoj Stars 1541 (树状数组模板&&线段树)
StarsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6683 Accepted Submission(s): 2665Problem DescriptionAstronomers often examin
2015-10-22 13:03:26 404
原创 hdoj Junk-Mail Filter 2473 (并查集的删点) 好题
Junk-Mail FilterTime Limit: 15000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7727 Accepted Submission(s): 2439Problem DescriptionRecognizing
2015-10-22 11:17:35 650
原创 hdoj Be the Winner 2509 (NIM博弈)
Be the WinnerTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2713 Accepted Submission(s): 1484Problem DescriptionLet's consider m
2015-10-21 22:05:01 341
原创 hdoj Cactus 3594 (强连通分量)
CactusTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1566 Accepted Submission(s): 723Problem Description1. It is a Strongly Conn
2015-10-21 14:13:55 361
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人