数学专题
文章平均质量分 77
GKHack
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #319 (Div. 2) 577C Vasya and Petya's Game(筛选法)
C. Vasya and Petya's Game time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya and Petya are playing a simp原创 2015-09-14 21:01:47 · 1182 阅读 · 0 评论 -
Codeforces Round #332 (Div. 2) 599D Spongebob and Squares(数学)
D. Spongebob and Squares time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Spongebob is already tired trying原创 2015-11-23 16:17:10 · 1188 阅读 · 0 评论 -
BestCoder Round #63 (div.2) HDOJ5570 balls(数学期望)
balls Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 90 Accepted Submission(s): 59 Problem Description There are n balls with原创 2015-11-23 00:10:00 · 903 阅读 · 0 评论 -
HDOJ1796 How many integers can you find(dfs+容斥)
How many integers can you find Time Limit: 12000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6048 Accepted Submission(s): 1735 Problem Descripti原创 2015-12-08 20:37:31 · 1024 阅读 · 0 评论 -
Codeforces Round #330 (Div. 2) 595AB题解
题目链接: 点击打开链接 A: 有n层楼, 每层有2 * m个窗户, 每家有2个窗户, 任何一个窗户亮说明这家还未休息, 问你有几家没有休息. 模拟题, 每层楼两个两个窗户遍历一次即可. AC代码: #include "iostream" #include "cstdio" #include "cstring" #include "algorithm" using namespac原创 2015-11-10 09:20:46 · 1189 阅读 · 0 评论 -
Codeforces Round #328 (Div. 2) 592ABC题解
题目链接: A: 给出8*8的一个棋盘, W为A的棋子, B为B的棋子. 每个棋子只能向上或者向下走, 且不能覆盖或者跳跃棋子, 问你最终谁获胜. 模拟题, 遍历每一列, 记录最考上的W以及最靠下的B的位置. AC代码: #include "iostream" #include "cstdio" #include "cstring" #include "algorithm" usi原创 2015-11-10 00:43:21 · 1125 阅读 · 0 评论 -
POJ2185 Milking Grid(kmp)
题目链接:点击打开链接 给你一个字符串矩阵,问你最小覆盖矩阵的面积是多少。 对每一行求最小覆盖子串的长度,对长度求最小公倍数,获得最小覆盖矩阵的长。同理,可以获得最小矩阵的宽。如果长或宽大于给 定矩阵的长或宽,那么所求最小覆盖矩阵的长或宽即为原矩阵的长或宽。 AC代码: #include "iostream" #include "cstdio" #include "cst原创 2015-10-08 17:41:18 · 800 阅读 · 0 评论 -
BestCoder Round #51 (div.2) & HDOJ5391 Zball in Tina Town(数论)
Zball in Tina Town Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 305 Accepted Submission(s): 186 Problem Description Tina To原创 2015-08-16 09:45:32 · 914 阅读 · 0 评论 -
HDOJ1717 小数化分数2(模拟)
小数化分数2 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3923 Accepted Submission(s): 1592 Problem Description Ray 在数学课上听老师说,任何小数都原创 2015-09-16 23:14:51 · 3513 阅读 · 0 评论 -
Codeforces Round #320 (Div. 2) 579C A Problem about Polyline(数学)
题目链接:点击打开链接 有一条折线,转折点是(0, 0) - (x, x) - (2x, 0) - (3x, x) - ... - (2kx, 0) - (2kx + x, x),给你一个点(a, b)在折线上面,问你最小的x是多少, 若不存在x则输出-1。 首先要考虑输出-1的情况,也就是b > a的时候,无法构成一个等腰直角三角形。想到平移斜率不同的线段最终可以确定两条直原创 2015-09-23 00:27:05 · 1058 阅读 · 0 评论 -
HDOJ1215 七夕节(暴力 & 筛选法)
七夕节 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 35637 Accepted Submission(s): 11170 Problem Description 七夕节那天,月老来到数字王国,他在城门上原创 2015-09-14 18:36:40 · 1763 阅读 · 1 评论 -
Codeforces Round #334 (Div. 2) 604D Modular Arithmetic(数学+快速幂)
D. Moodular Arithmetic time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output As behooves any intelligent schoolboy原创 2016-01-22 11:32:31 · 1069 阅读 · 0 评论