
脑洞题目
文章平均质量分 82
GKHack
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces Round #246 (Div. 2) 432C Prime Swaps(脑洞)
C. Prime Swaps time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You have an array a[1], a[2], ..., a[n], con原创 2016-07-12 13:28:57 · 886 阅读 · 0 评论 -
BestCoder Round #64 (div.2) HDOJ5586 Sum(脑洞)
Sum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 671 Accepted Submission(s): 355 Problem Description There is a number sequen原创 2015-12-03 23:43:25 · 934 阅读 · 0 评论 -
Codeforces Round #313 (Div. 2) 560C Gerald's Hexagon(脑洞)
C. Gerald's Hexagon time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Gerald got a very curious hexagon for h原创 2015-12-17 22:42:00 · 1122 阅读 · 0 评论 -
Codeforces Round #337 (Div. 2) 610C Harmony Analysis(脑洞)
C. Harmony Analysis time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output The semester is already ending, so Dani原创 2015-12-29 00:58:43 · 1054 阅读 · 0 评论 -
Codeforces Round #337 (Div. 2) 610B Vika and Squares(脑洞)
B. Vika and Squares time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vika has n jars with paints of distinct原创 2015-12-29 00:47:03 · 927 阅读 · 0 评论 -
BestCoder Round #62 (div.2) HDOJ5562 Clarke and food(脑洞)
Clarke and food Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 501 Accepted Submission(s): 292 Problem Description Clarke is a原创 2015-11-18 10:23:01 · 1021 阅读 · 0 评论 -
Codeforces Round #332 (Div. 2) 599C Day at the Beach(脑洞)
C. Day at the Beach time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output One day Squidward, Spongebob and Patric原创 2015-11-23 11:02:07 · 1370 阅读 · 0 评论 -
Codeforces Round #105 (Div. 2) 148C Terse princess(脑洞)
C. Terse princess time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output «Next please», — the princess called and c原创 2015-12-08 20:20:27 · 1067 阅读 · 0 评论 -
Codeforces Round #331 (Div. 2) 596ABC题解
题目链接: 点击打开链接 A: 给出n个点的坐标, 问你这n个点能不能确定一个矩形, 如果可以求出面积, 不可以则输出-1. 脑洞题, n为1输出-1, 其他情况则求面积, 若面积为0则不能确定, 注意数据初始化, 为此wa了一发. AC代码: #include "iostream" #include "cstdio" #include "cstring" #include "原创 2015-11-17 08:37:35 · 1350 阅读 · 0 评论 -
BestCoder Round #58 (div.2) HDOJ5494 5495 5496 5497题解
题目连接: 点击打开链接 A: 模拟题, 从小到大排序后求a的前m个和与b的后m个和作比较即可. AC代码: #include "iostream" #include "cstdio" #include "cstring" #include "algorithm" using namespace std; const int MAXN = 505; int n, m, a[MAXN]原创 2015-11-15 13:09:28 · 1093 阅读 · 0 评论 -
Educational Codeforces Round 2 600C Make Palindrome(脑洞)
C. Make Palindrome time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A string is called palindrome if it read原创 2016-01-22 10:31:56 · 1055 阅读 · 0 评论 -
Codeforces Round #334 (Div. 2) 604C Alternative Thinking(脑洞)
C. Alternative Thinking time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Kevin has just recevied his disappo原创 2016-01-22 11:08:01 · 738 阅读 · 0 评论 -
Educational Codeforces Round 3 609C Load Balancing(脑洞)
C. Load Balancing time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output In the school computer room there are n s原创 2016-01-23 16:53:52 · 658 阅读 · 0 评论 -
Manthan, Codefest 16 633D Fibonacci-ish(脑洞+stl)
D. Fibonacci-ish time limit per test 3 seconds memory limit per test 512 megabytes input standard input output standard output Yash has recently learnt about the Fibonac原创 2016-02-28 09:11:48 · 927 阅读 · 0 评论 -
BestCoder Round #43B HDOJ5265 pog loves szh II(脑洞)
pog loves szh II Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 2346 Accepted Submission(s): 677 Problem Description Pog and Sz原创 2016-02-27 22:36:22 · 583 阅读 · 0 评论 -
UVALive 7512 November 11th(脑洞)
题目链接:点击打开链接 给出坏凳子的位置, 座位不能挨着坐, 问最多可以做多少人, 以及最少可以坐多少人使得不能再有可以坐的位置. 最多可以坐多少人, 只要中间空一个即可, 本题wa点在最少坐的人数, 中间空两个也可以... 比如.S..S.所以空的位置大于2时, 分母为3. AC代码: #include "iostream" #include "cstdio" #include "cst原创 2016-03-29 17:04:08 · 870 阅读 · 0 评论 -
Codeforces Round #344 (Div. 2) 631C Report(脑洞+stl)
C. Report time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Each month Blake gets the report containing main原创 2016-03-04 16:51:06 · 1069 阅读 · 2 评论 -
UVALive 7410 Kingdom of Black and White(脑洞 + stl)
题目链接:点击打开链接 给出一个由01构成字符串, 可以修改字符一次, 问连续的0或1最大的平方和是多少. 题目即求最长的0串或者1串, 先求出给出字符串的平方和, 遍历一次, 分两种情况, 一种是当前为1, 一种是一般情况. 当前为1时, 要判断 前一段与后一段和是否大于最大. 求出最多增长加到ans即可. AC代码: #include "iostream" #include "cst原创 2016-03-29 16:54:57 · 544 阅读 · 0 评论 -
Codeforces Round #342 (Div. 2) 625C K-special Tables(脑洞)
C. K-special Tables time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output People do many crazy things to stand ou原创 2016-02-13 10:52:09 · 845 阅读 · 0 评论 -
Codeforces Round #342 (Div. 2) 625B War of the Corporations(stl)
B. War of the Corporations time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A long time ago, in a galaxy far原创 2016-02-13 10:25:58 · 718 阅读 · 0 评论 -
Educational Codeforces Round 4 612C Replace To Make Regular Bracket Sequence(脑洞)
C. Replace To Make Regular Bracket Sequence time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given st原创 2016-01-29 09:43:17 · 510 阅读 · 0 评论 -
Codeforces Round #297 (Div. 2) 525C Ilya and Sticks(脑洞)
C. Ilya and Sticks time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output In the evening, after the contest Ilya w原创 2015-12-23 23:36:30 · 835 阅读 · 0 评论 -
Codeforces Round #250 (Div. 2) 437C The Child and Toy(脑洞贪心)
C. The Child and Toy time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output On Children's Day, the child got a toy原创 2015-08-31 20:34:40 · 1553 阅读 · 0 评论 -
Codeforces Round #329 (Div. 2) 593AB题解
题目链接: 点击打开链接 A: 给出n个字符串, 要求从中挑选数个字符串构成一个长串最长, 该长串又一个或两个字母组成. 模拟题, 遍历n个字符串, 每次遍历通过两个字符a, b判断该字符串是否由一个或两个字母组成, 若是则数组中加上此字符串长度. 最终求 最大长度时, 如果字母相同, 则此时长度为dp[i][j]一半. AC代码: #include "iostream" #in原创 2015-11-10 00:07:51 · 957 阅读 · 0 评论 -
HDOJ1003 Max Sum(脑洞)
题目链接: t组样例,每组样例开始是n,后n个数字组成一个数组。问你连续的哪些数之和最大。 每读入一个数字加到tmp上,代表当前数之和,若tmp比ans大则更新ans,同时更新起始和结束的点。若tmp为负则更新起点为j+1, 且tmp重置为0。保证了ans能取得最大。 AC代码: #include "iostream" #include "cstdio" #inc原创 2015-09-25 23:10:14 · 1143 阅读 · 0 评论 -
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 · 1222 阅读 · 0 评论 -
Codeforces Round #322 (Div. 2) 581A 581B 581C
581A链接:点击打开链接 给你a只红袜子,b只蓝袜子,问你可以组成多少对颜色不同的袜子以及剩下多少对单色袜子。 小小的脑洞,答案分别为a, b最小值以及a - b绝对值的一半。 AC代码: #include "iostream" #include "cstdio" #include "cstring" #include "algorithm" using na原创 2015-09-29 10:51:14 · 1580 阅读 · 0 评论 -
Codeforces Round #320 (Div. 2) 579B Finding Team Member(脑洞)
题目链接:点击打开链接 给你一个n,接下来的2n - 1行第i行给你i - 1个数字,代表了队员i, j合作的分数,问你两个队员之间怎样组队可以使得分数最高。 用一个结构体存储数据,x代表第一个人,y代表第二个人,读入后按照分数由高到低排序,最后保存答案就好~ AC代码: #include "iostream" #include "cstdio" #include原创 2015-09-22 08:13:03 · 1333 阅读 · 0 评论 -
Codeforces Round #320 (Div. 2) 579A Raising Bacteria(脑洞)
题目链接:点击打开链接 给你一个盒子里面的细菌数,每个细菌可以分裂成两个细菌,问你最初盒子里面有几个细菌。 相当于问你这个数的二进制表示中有几个1. AC代码: #include "iostream" #include "cstdio" #include "cstring" #include "algorithm" using namespace std; int原创 2015-09-19 20:25:45 · 1297 阅读 · 0 评论 -
Codeforces Round #319 (Div. 2) 577A Multiplication Table(脑洞)
A. Multiplication Table time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Let's consider a table consisting of原创 2015-09-12 09:13:28 · 1288 阅读 · 0 评论 -
Codeforces Round #318 574C Bear and Elections(脑洞)
C. Bear and Poker time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Limak is an old brown bear. He often play原创 2015-08-30 08:43:52 · 1029 阅读 · 0 评论 -
Codeforces Round #251 (Div. 2) 439D Devu and his Brother(脑洞)
D. Devu and his Brother time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Devu and his brother love each other原创 2015-08-29 14:19:13 · 934 阅读 · 0 评论 -
Codeforces Round #251 (Div. 2) 439C Devu and Partitioning of the Array(脑洞)
C. Devu and Partitioning of the Array time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Devu being a small kid原创 2015-08-29 09:57:52 · 1051 阅读 · 0 评论 -
BestCoder Round #54 (div.2) HDOJ5430 Reflect(欧拉函数+脑洞)
Reflect Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 274 Accepted Submission(s): 162 Problem Description We send a light from原创 2015-09-07 06:53:39 · 999 阅读 · 0 评论 -
Codeforces Round #201 (Div. 2) 347A Difference Row(脑洞)
A. Difference Row time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You want to arrange n integers a1, a2, ..原创 2015-08-28 19:05:10 · 950 阅读 · 0 评论 -
BestCoder Round #54 (div.2) HDOJ5428 The Factor(脑洞)
The Factor Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 495 Accepted Submission(s): 154 Problem Description There is a sequen原创 2015-09-06 01:09:09 · 185 阅读 · 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 · 1148 阅读 · 0 评论 -
Codeforces Round #327 (Div. 2) 591ABC题解
题目链接:点击打开链接 A: 两个人在两端相向而行, 第一次碰面后掉头, 到端点后又掉头, 问第二次碰面时候距离左端点的距离. 脑洞题目, 第二次和第一次碰面在同一个地方, 要求精度在1e-4以内, 输出5位小数即可. AC代码: #include "iostream" #include "cstdio" #include "cstring" #include "algorithm原创 2015-11-09 23:48:27 · 1077 阅读 · 0 评论 -
Codeforces Round #324 (Div. 2) 584ABCD题解
题目链接:点击打开链接 A:给你一个n、t,让你输出长度为n且可以整除t的数。 注意到t的范围是1~10,把10特判一下,其他的情况直接输出n个t就好。 AC代码: #include "iostream" #include "cstdio" #include "cstring" #include "algorithm" using namespace std; int n, t;原创 2015-10-10 10:46:34 · 1033 阅读 · 0 评论 -
Codeforces Round #326 (Div. 2) 588ABC题解
题目链接:点击打开链接 A: 给出n天的需求和肉的价格, 问你满足每天的需求需要花费的最少买肉价格是多少. 脑洞题目, 因为肉价格是已知的, 所以对每个上升的子序列需求求和, 乘以最低价格, 然后累加起来就是答案. AC代码: #include "iostream" #include "cstdio" #include "cstring" #include "algorithm"原创 2015-10-22 00:54:41 · 1157 阅读 · 0 评论