数学(杂)
文章平均质量分 71
A_ice_
1111
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDOJ 1290 献给杭电五十周年校庆的礼物
献给杭电五十周年校庆的礼物 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 10155 Accepted Submission(s): 5653 Problem Description 或许你曾经牢骚满腹 或许你依原创 2016-07-21 21:32:54 · 708 阅读 · 0 评论 -
LightOJ 1058 Parallelogram Counting【平行四边形的判定】
题目链接:http://lightoj.com/login_main.php?url=volume_showproblem.php?problem=1058 题解:判断是否是平行四边形,直接判断这两条对角线的中点在不在一个坐标上就可以了。然后一次记录下所有在一个坐标的中点,再进行组合。 这个题主要就是这两块,想到了就可以做出来了,想不到就没得玩了。 #include #inc原创 2016-08-15 16:07:54 · 550 阅读 · 0 评论 -
HDOJ 5777 domino
domino Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 588 Accepted Submission(s): 301 Problem Description Little White plays a ga原创 2016-08-01 08:59:39 · 405 阅读 · 0 评论 -
CodeForces 604A Uncowed Forces
A. Uncowed Forces time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Kevin Sun has just finished competing in C原创 2016-07-21 18:05:17 · 349 阅读 · 0 评论 -
CodeForces 612A The Text Splitting
A. The Text Splitting time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given the string s of length n原创 2016-07-21 18:08:53 · 436 阅读 · 0 评论 -
CodeForces 597A Divisibility
A. Divisibility time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Find the number of k-divisible numbers on th原创 2016-07-21 18:01:03 · 514 阅读 · 0 评论 -
CodeForces 612B HDD is Outdated Technology
B. HDD is Outdated Technology time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output HDD hard drives group data by原创 2016-07-21 18:13:14 · 337 阅读 · 0 评论 -
【多校训练】ZZUliOJ 1902 985的因子对难题
1902: 985的因子对难题 Time Limit: 2 Sec Memory Limit: 128 MB Submit: 131 Solved: 30 Description 985有n个正整数,他想知道存在多少个不同的因子对(a[i], a[j])使得 1 特别地,他认为(a[i],a[j])与(a[j],a[i])是一样的因子对。 Input原创 2016-08-04 20:33:14 · 663 阅读 · 0 评论 -
CodeForces 682A Alyona and Numbers
A. Alyona and Numbers time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output After finishing eating her bun, Alyona原创 2016-08-16 17:13:07 · 650 阅读 · 0 评论 -
CodeForces 580B Kefa and Company
B. Kefa and Company time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Kefa wants to celebrate his first big s原创 2016-07-21 19:30:46 · 463 阅读 · 0 评论 -
LightOJ 1104 Birthday Paradox【数学概率】
题目链接:http://lightoj.com/login_main.php?url=volume_showproblem.php?problem=1104 题意:如果一年有n天的话,问一个房间里至少有多少个人,才能让任意两个人是同一天的生日至少是0.5? 题解:就原创 2016-08-15 15:58:24 · 476 阅读 · 0 评论 -
【多校训练】ZZULIOJ 1893 985的数学难题【位运算】
1893: 985的数学难题 Time Limit: 2 Sec Memory Limit: 128 MB Submit: 138 Solved: 27 Description 985有n个正整数,他想快速知道下面函数的返回值 int a[N+1]; long long Solve() { int i, j; long long ans = 0;原创 2016-08-09 16:18:11 · 509 阅读 · 0 评论 -
NYOJ 1291 不是匹配
不是匹配 时间限制:1000 ms | 内存限制:65535 KB 难度:2 描述 有N个人,N个活动, 每个人只会对2个或者3个活动感兴趣, 每个活动也只有两个人或者两个活动对它兴趣,每个人参加一个 感兴趣的活动需要一天 ,且当天该活动被参加时,其他的人不能参加 如果每个人都参加完自己有兴趣的活动,应当怎样安排使得所用总天数时间最短 2原创 2016-08-22 08:56:00 · 435 阅读 · 0 评论 -
HDU 5671 Matrix
Matrix Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1398 Accepted Submission(s): 557 Problem Description There is a matrix M原创 2016-08-22 11:48:19 · 520 阅读 · 0 评论 -
CodeForces 632B Alice, Bob, Two Teams
B. Alice, Bob, Two Teams time limit per test 1.5 seconds memory limit per test 256 megabytes input standard input output standard output Alice and Bob are playing a game原创 2016-08-22 17:45:51 · 439 阅读 · 0 评论 -
CodeForces 660A Co-prime Array
A. Co-prime Array time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given an array of n elements, you原创 2016-08-22 18:00:53 · 400 阅读 · 0 评论 -
LightOJ 1045 Digits of Factorial【进制问题】
题目:http://lightoj.com/login_main.php?url=volume_showproblem.php?problem=1045 这个题思路好厉害啊……OTZ k进制的数可以表达为k的n次方。所以前面N!可以先以十进制的位数打表。然后需要几进制就可以按比例算出几进制。 #include #include #include double a[100000原创 2016-08-24 09:17:22 · 419 阅读 · 0 评论 -
LightOJ 1282 Leading and Trailing
题目:http://lightoj.com/login_main.php?url=volume_showproblem.php?problem=1282 这个题前半段是思维,后半段是快速幂。写的时候快速幂模板给忘了= =结果没写出来。 这个题的两个部分我的博客里都有写过。 算前面的n位数:HDOJ 1060 算后面的n位数:HDOJ 1061 #include #incl原创 2016-08-24 09:22:09 · 487 阅读 · 0 评论 -
HDOJ 1060 Leftmost Digit
Leftmost Digit Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 16383 Accepted Submission(s): 6481 Problem Description Given a positi原创 2016-07-20 17:49:22 · 439 阅读 · 0 评论 -
HRBUST 1037 组合数末尾的零
组合数末尾的零 Time Limit: 1000 MS Memory Limit: 65536 KB 64-bit integer IO format: %lld , %llu Java class name: Main [Submit] [Status] [Discuss] Description 从m个不同元素中取出n (n ≤ m)个元素的所有组合的个数,叫原创 2016-01-15 20:31:06 · 681 阅读 · 0 评论 -
HDOJ 2092 整数解
整数解 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 27843 Accepted Submission(s): 9706 Problem Description 有二个整数,它们加起来等于某个整数,乘起来又等于另原创 2016-01-16 21:14:47 · 375 阅读 · 0 评论 -
NYOJ 77 开灯问题
开灯问题 时间限制:3000 ms | 内存限制:65535 KB 难度:1 描述 有n盏灯,编号为1~n,第1个人把所有灯打开,第2个人按下所有编号为2 的倍数的开关(这些灯将被关掉),第3 个人按下所有编号为3的倍数的开关(其中关掉的灯将被打开,开着的灯将被关闭),依此类推。一共有k个人,问最后有哪些灯开着?输入:n和k,输出开着的灯编号。k≤n≤1000 输入输入一组数据:原创 2016-01-19 21:08:32 · 363 阅读 · 0 评论 -
NYOJ 97 兄弟郊游问题
兄弟郊游问题 时间限制:3000 ms | 内存限制:65535 KB 难度:2 描述兄弟俩骑车郊游,弟弟先出发,每分钟X米,M分钟后,哥哥带一条狗出发。以每分钟Y米的速度去追弟弟,而狗则以每分钟Z米的速度向弟弟跑去,追上弟弟后又立即返回,直到哥哥追上弟弟时,狗跑了多少米? 输入第一行输入一个整数N,表示测试数据的组数(N 每组测试数据占一行,是四个正整数原创 2016-01-20 18:58:35 · 369 阅读 · 0 评论 -
CodeForces 609B.The Best Gift
B. The Best Gift time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Emily's birthday is next week and Jack has原创 2016-01-13 22:11:50 · 555 阅读 · 0 评论 -
HDOJ 4505 小Q系列故事——电梯里的爱情
小Q系列故事——电梯里的爱情 Time Limit: 300/100 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 3611 Accepted Submission(s): 2279 Problem Description 细心的同事发现,小Q最原创 2016-03-19 20:32:45 · 516 阅读 · 0 评论 -
HDOJ 1280 前m大的数
前m大的数 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 15330 Accepted Submission(s): 5222 Problem Description 还记得Gardon给小希布置的那个作业原创 2016-03-19 20:34:45 · 406 阅读 · 0 评论 -
CodeForces 606A. Magic Spheres
A. Magic Spheres time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Carl is a beginner magician. He has a blue原创 2016-01-15 19:54:44 · 456 阅读 · 0 评论 -
CodeForces 66A Petya and Java
A. Petya and Java time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Little Petya has recently started attendi原创 2016-05-20 17:48:02 · 591 阅读 · 0 评论 -
CodeForces 75A Flea travel
A. Life Without Zeros time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Can you imagine our life if we remove原创 2016-05-20 17:51:36 · 470 阅读 · 0 评论 -
CodeForces 372 A Counting Kangaroos is Fun
A. Counting Kangaroos is Fun time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output There are n kangaroos with pock原创 2016-07-26 21:29:54 · 571 阅读 · 0 评论 -
HDOJ 2516 取石子游戏
取石子游戏 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3701 Accepted Submission(s): 2192 Problem Description 1堆石子有n个,两人轮流取.先取者第1次可以取任原创 2016-01-16 20:22:10 · 866 阅读 · 0 评论 -
NYOJ 40 公约数和公倍数
公约数和公倍数 时间限制:1000 ms | 内存限制:65535 KB 难度:1 描述小明被一个问题给难住了,现在需要你帮帮忙。问题是:给出两个正整数,求出它们的最大公约数和最小公倍数。 输入第一行输入一个整数n(0 随后的n行输入两个整数i,j(0 输出输出每组测试数据的最大公约数和最小公倍数 样例输入 3 6 6 12 11 33 22原创 2016-01-08 21:28:23 · 1216 阅读 · 0 评论 -
HDOJ 1212 Big Number【同余定理】
Big Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7156 Accepted Submission(s): 4938 Problem Description As we know, Big Num原创 2016-07-18 16:41:03 · 332 阅读 · 0 评论 -
NYOJ 105 九的余数【同余定理】
九的余数 时间限制:3000 ms | 内存限制:65535 KB 难度:3 描述 现在给你一个自然数n,它的位数小于等于一百万,现在你要做的就是求出这个数整除九之后的余数。 输入第一行有一个整数m(1 随后m行每行有一个自然数n。 输出输出n整除九之后的余数,每次输出占一行。 样例输入 3 4 5 465456541 样例输出 4原创 2016-01-20 19:27:47 · 527 阅读 · 0 评论 -
HDOJ 1050 Moving Tables
Moving Tables Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 29585 Accepted Submission(s): 9693 Problem Description The famous ACM原创 2016-07-20 16:41:48 · 299 阅读 · 0 评论
分享