
数学(杂)
文章平均质量分 71
A_ice_
1111
展开
-
CodeForces 606A. Magic Spheres
A. Magic Spherestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputCarl is a beginner magician. He has a blue原创 2016-01-15 19:54:44 · 394 阅读 · 0 评论 -
HDOJ 5777 domino
dominoTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 588 Accepted Submission(s): 301Problem DescriptionLittle White plays a ga原创 2016-08-01 08:59:39 · 354 阅读 · 0 评论 -
CodeForces 604A Uncowed Forces
A. Uncowed Forcestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputKevin Sun has just finished competing in C原创 2016-07-21 18:05:17 · 298 阅读 · 0 评论 -
CodeForces 612A The Text Splitting
A. The Text Splittingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given the string s of length n原创 2016-07-21 18:08:53 · 377 阅读 · 0 评论 -
CodeForces 597A Divisibility
A. Divisibilitytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFind the number of k-divisible numbers on th原创 2016-07-21 18:01:03 · 452 阅读 · 0 评论 -
CodeForces 612B HDD is Outdated Technology
B. HDD is Outdated Technologytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputHDD hard drives group data by原创 2016-07-21 18:13:14 · 273 阅读 · 0 评论 -
【多校训练】ZZUliOJ 1902 985的因子对难题
1902: 985的因子对难题Time Limit: 2 Sec Memory Limit: 128 MBSubmit: 131 Solved: 30Description985有n个正整数,他想知道存在多少个不同的因子对(a[i], a[j])使得1 特别地,他认为(a[i],a[j])与(a[j],a[i])是一样的因子对。Input原创 2016-08-04 20:33:14 · 580 阅读 · 0 评论 -
CodeForces 682A Alyona and Numbers
A. Alyona and Numberstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter finishing eating her bun, Alyona原创 2016-08-16 17:13:07 · 585 阅读 · 0 评论 -
CodeForces 580B Kefa and Company
B. Kefa and Companytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputKefa wants to celebrate his first big s原创 2016-07-21 19:30:46 · 368 阅读 · 0 评论 -
HDOJ 1290 献给杭电五十周年校庆的礼物
献给杭电五十周年校庆的礼物Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10155 Accepted Submission(s): 5653Problem Description或许你曾经牢骚满腹或许你依原创 2016-07-21 21:32:54 · 613 阅读 · 0 评论 -
【多校训练】ZZULIOJ 1893 985的数学难题【位运算】
1893: 985的数学难题Time Limit: 2 Sec Memory Limit: 128 MBSubmit: 138 Solved: 27Description985有n个正整数,他想快速知道下面函数的返回值int a[N+1];long long Solve() { int i, j; long long ans = 0;原创 2016-08-09 16:18:11 · 425 阅读 · 0 评论 -
NYOJ 1291 不是匹配
不是匹配时间限制:1000 ms | 内存限制:65535 KB难度:2描述 有N个人,N个活动, 每个人只会对2个或者3个活动感兴趣, 每个活动也只有两个人或者两个活动对它兴趣,每个人参加一个 感兴趣的活动需要一天 ,且当天该活动被参加时,其他的人不能参加 如果每个人都参加完自己有兴趣的活动,应当怎样安排使得所用总天数时间最短2原创 2016-08-22 08:56:00 · 375 阅读 · 0 评论 -
HDU 5671 Matrix
MatrixTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1398 Accepted Submission(s): 557Problem DescriptionThere is a matrix M原创 2016-08-22 11:48:19 · 466 阅读 · 0 评论 -
CodeForces 632B Alice, Bob, Two Teams
B. Alice, Bob, Two Teamstime limit per test1.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice and Bob are playing a game原创 2016-08-22 17:45:51 · 378 阅读 · 0 评论 -
CodeForces 660A Co-prime Array
A. Co-prime Arraytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array of n elements, you原创 2016-08-22 18:00:53 · 338 阅读 · 0 评论 -
LightOJ 1045 Digits of Factorial【进制问题】
题目:http://lightoj.com/login_main.php?url=volume_showproblem.php?problem=1045这个题思路好厉害啊……OTZk进制的数可以表达为k的n次方。所以前面N!可以先以十进制的位数打表。然后需要几进制就可以按比例算出几进制。#include#include#includedouble a[100000原创 2016-08-24 09:17:22 · 362 阅读 · 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 · 444 阅读 · 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 · 467 阅读 · 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 · 422 阅读 · 0 评论 -
HDOJ 1050 Moving Tables
Moving TablesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 29585 Accepted Submission(s): 9693Problem DescriptionThe famous ACM原创 2016-07-20 16:41:48 · 256 阅读 · 0 评论 -
HRBUST 1037 组合数末尾的零
组合数末尾的零Time Limit: 1000 MS Memory Limit: 65536 KB64-bit integer IO format: %lld , %llu Java class name: Main[Submit] [Status] [Discuss]Description从m个不同元素中取出n (n ≤ m)个元素的所有组合的个数,叫原创 2016-01-15 20:31:06 · 607 阅读 · 0 评论 -
HDOJ 2092 整数解
整数解Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 27843 Accepted Submission(s): 9706Problem Description有二个整数,它们加起来等于某个整数,乘起来又等于另原创 2016-01-16 21:14:47 · 329 阅读 · 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 · 305 阅读 · 0 评论 -
NYOJ 97 兄弟郊游问题
兄弟郊游问题时间限制:3000 ms | 内存限制:65535 KB难度:2描述兄弟俩骑车郊游,弟弟先出发,每分钟X米,M分钟后,哥哥带一条狗出发。以每分钟Y米的速度去追弟弟,而狗则以每分钟Z米的速度向弟弟跑去,追上弟弟后又立即返回,直到哥哥追上弟弟时,狗跑了多少米?输入第一行输入一个整数N,表示测试数据的组数(N每组测试数据占一行,是四个正整数原创 2016-01-20 18:58:35 · 309 阅读 · 0 评论 -
CodeForces 609B.The Best Gift
B. The Best Gifttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputEmily's birthday is next week and Jack has原创 2016-01-13 22:11:50 · 499 阅读 · 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): 2279Problem Description 细心的同事发现,小Q最原创 2016-03-19 20:32:45 · 461 阅读 · 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): 5222Problem Description还记得Gardon给小希布置的那个作业原创 2016-03-19 20:34:45 · 349 阅读 · 0 评论 -
CodeForces 66A Petya and Java
A. Petya and Javatime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Petya has recently started attendi原创 2016-05-20 17:48:02 · 478 阅读 · 0 评论 -
CodeForces 75A Flea travel
A. Life Without Zerostime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputCan you imagine our life if we remove原创 2016-05-20 17:51:36 · 406 阅读 · 0 评论 -
CodeForces 372 A Counting Kangaroos is Fun
A. Counting Kangaroos is Funtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n kangaroos with pock原创 2016-07-26 21:29:54 · 480 阅读 · 0 评论 -
HDOJ 2516 取石子游戏
取石子游戏Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3701 Accepted Submission(s): 2192Problem Description1堆石子有n个,两人轮流取.先取者第1次可以取任原创 2016-01-16 20:22:10 · 804 阅读 · 0 评论 -
NYOJ 40 公约数和公倍数
公约数和公倍数时间限制:1000 ms | 内存限制:65535 KB难度:1描述小明被一个问题给难住了,现在需要你帮帮忙。问题是:给出两个正整数,求出它们的最大公约数和最小公倍数。输入第一行输入一个整数n(0随后的n行输入两个整数i,j(0输出输出每组测试数据的最大公约数和最小公倍数样例输入36 612 1133 22原创 2016-01-08 21:28:23 · 1154 阅读 · 0 评论 -
HDOJ 1212 Big Number【同余定理】
Big NumberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7156 Accepted Submission(s): 4938Problem DescriptionAs we know, Big Num原创 2016-07-18 16:41:03 · 294 阅读 · 0 评论 -
NYOJ 105 九的余数【同余定理】
九的余数时间限制:3000 ms | 内存限制:65535 KB难度:3描述现在给你一个自然数n,它的位数小于等于一百万,现在你要做的就是求出这个数整除九之后的余数。输入第一行有一个整数m(1随后m行每行有一个自然数n。输出输出n整除九之后的余数,每次输出占一行。样例输入345465456541样例输出4原创 2016-01-20 19:27:47 · 474 阅读 · 0 评论 -
HDOJ 1060 Leftmost Digit
Leftmost DigitTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16383 Accepted Submission(s): 6481Problem DescriptionGiven a positi原创 2016-07-20 17:49:22 · 379 阅读 · 0 评论