![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
暴力
文章平均质量分 73
kuronekonano
这个作者很懒,什么都没留下…
展开
-
"尚学堂杯"哈尔滨理工大学第七届程序设计竞赛——Hrbust2326 Blind Father
Blind Father Time Limit: 1000 MS Memory Limit: 512000 K Total Submit: 42(14 users) Total Accepted: 12(11 users) Rating: Special Judge: No Description Mr. Leng, who is the predominately inhe原创 2017-04-02 23:02:49 · 232 阅读 · 0 评论 -
牛客网暑假训练第九场——E Music Game(概率期望)
时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 Niuniu likes to play OSU! We simplify the game OSU to the following problem.Given n and m, there are n clicks. Ea...原创 2018-08-16 22:52:41 · 266 阅读 · 1 评论 -
Codeforces Round 49 C-Minimum Value Rectangle(最小面积周长比)
传送门:http://codeforces.com/problemset/problem/1027/C 题意:给出1e6+7条边,组成一个矩形,使得其周长面积比最小很水的一个暴力题,处理一下给出的数据即可。把每条边计数,然后去重离散化,两个两个为一组,接着直接计算从大到小排序后相邻两个的周长面积比,取最小即可。然而当时并没有想到这么做。。。。#include<bits/stdc++...原创 2018-08-23 09:52:48 · 165 阅读 · 0 评论 -
UPC-8377 Playoff(深搜暴力)
题目描述 The Minato Mirai Football Association hosts its annual championship as a single round-robin tournament, in which each team plays a single match against all the others. Unlike many other round-ro...原创 2018-08-27 21:32:54 · 217 阅读 · 0 评论 -
牛客网暑假训练第九场——F-Typing practice(多串并行 优化KMP详解)
链接:https://www.nowcoder.com/acm/contest/147/F 来源:牛客网时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 Niuniu is practicing typing.Given n words, Niuniu want to i...原创 2018-08-20 19:40:57 · 635 阅读 · 0 评论 -
牛客网暑假训练第九场——H Prefix Sum(CDQ分治)
链接:https://www.nowcoder.com/acm/contest/147/H来源:牛客网 时间限制:C/C++ 3秒,其他语言6秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述Niuniu has learned prefix sum and he found an interesting about...原创 2018-09-04 23:40:43 · 387 阅读 · 0 评论 -
【2018黑龙江省赛】UPC-7224 The puzzle(任意两数交换排序次数)
题目描述Kayaking is playing a puzzle game containing n different blocks. He marks the blocks with integers from 1 to n, which show the blocks’ original positions. Each time he can exchange two blocks and...原创 2018-09-23 10:53:02 · 939 阅读 · 0 评论 -
UPC-9264 Chip Factory(01字典树)
题目描述John is a manager of a CPU chip factory, the factory produces lots of chips everyday. To manage large amounts of products, every processor has a serial number. More specifically, the factory produ...原创 2018-10-04 11:46:10 · 176 阅读 · 0 评论 -
【2018年东北赛】UPC-7226 Memory Banks(模拟存储)
题目描述We have purchased 60 different types of memory banks, typed as 0 to 59, A bank of type i has 2i memory capacity. We have Xi memory banks of type i.We also have n workstations numbered from 1 to ...原创 2018-09-23 10:32:46 · 901 阅读 · 0 评论 -
【ICPC 2015 Shenyang】UVALive - 7239 Bazinga(并查集优化查找子串)
题目描述For n given strings S1 , S2 , … , Sn , labelled from 1 to n, you should find the largest i (1 ≤ i ≤ n) such that there exists an integer j (1 ≤ j < i) such that Sj is not a substring of Si . F...原创 2018-10-06 00:10:21 · 183 阅读 · 0 评论 -
Codeforces Round #509 D - Glider(枚举二分前缀和)
题意: 给出滑翔机的高度h 以及有n段上升气流区间,滑翔机在非上升气流区间会以每前进一个单位 高度就下降一个单位的 速度坠落 ,而在有上升气流的区间,滑翔机将持续前进,并不会下落,问在一维坐标上的哪个位置释放滑翔机能跑最远的距离。题解: 首先可以明确的是,我们应该尽量走最多的上升气流区域,使得尽量延缓下降的趋势,才能在有限的高度下走最远的距离。那么出发点一定是一个上升气流区间的开始。也就是说...原创 2018-09-30 00:04:27 · 248 阅读 · 0 评论 -
Codeforces Round #547 F1&F2. Same Sum Blocks(贪心)
题意:给一个长度为n的数组,在这个数组中找出一些不相邻且不相交的区间,使得区间和相等,最多能找到多少这样的区间,输出区间个数和区间左右边界。两道题同样的题面,改变了n值的大小,1500的长度其实也不是很大,支持N^2暴力,因此我们直接暴力计算出所有1500×1500个区间和,有了区间以及区间和,就可以从中根据某个和相等的情况下得到尽量多的不相邻相交区间。对于某个确定的区间和,有多个可能相交的...原创 2019-03-21 16:22:38 · 158 阅读 · 0 评论 -
UPC-6760 Problem H 九连环 【重庆OI2018】等比数列求和&JAVA高精度
题目描述 九连环是一种源于中国的传统智力游戏。如图所示,九个圆环套在一把“剑”上,并且互相牵连。游戏的目标是把九个圆环从“剑”上卸下。圆环的装卸需要遵守两个规则。 第一个(最右边)环任何时候都可以装上或卸下。 如果第k个环没有被卸下,且第k个环右边的所有环都被卸下,则第k+1个环(第k个环左边相邻的环)可以任意装上或卸下。 与魔方的千变万化不同,解九连环的最优策略是唯一的。为简单起见,...原创 2018-08-07 22:42:57 · 315 阅读 · 0 评论 -
CSU - 2087 Tragedy Words(字符串暴力枚举)
As is known to all, Wells doesn’t have a good command of English. As a result, some unfamiliar words, which may cause sadness of Wells, is called tragedy words. In more detail, a word will be defined ...原创 2018-06-23 18:37:34 · 204 阅读 · 0 评论 -
CSU - 2085 手游大佬(天数计算)
手游世界里,如何才能变强呢? 自古以来,强者无非三种:欧皇、肝帝、壕神。 冰弦在2018年4月22日打开天梯榜,仰望着那一个个大佬,想统计一下他们都是属于哪一类人。 在这个题目里,我们定义: 如果一个玩家注册以来,平均每天的充值金额达到100元,我们认为他属于壕神。 如果一个玩家注册以来,平均每天的在线时长达到12小时,我们认为他属于肝帝。 如果一个玩家不符合以上两个条件,然而他又在...原创 2018-06-23 18:23:44 · 238 阅读 · 0 评论 -
UPC-6022 跳马(数列增量求和&广搜打表找规律)
题目描述 一个骑士在一个无限大的国际象棋棋盘里跳。一开始,这个国际象棋棋盘的每一个格子都是被标记为未被走过的,而骑士一开始可以以任意的一个格子作为起点,并且这个格子标记为走过。然后,他可以以如下图的规则跳N次,每一个他所到过的格子都会被标记为已经走过。 现在,我们需要知道在N次跳跃之后,有多少个格子可能被标记为走过。 输入 第一行一个整数T,表示数据组数 接下来T行,每行一个整数N ...原创 2018-03-24 13:14:29 · 543 阅读 · 0 评论 -
牛客网-强迫症的序列(思维)
链接:https://www.nowcoder.com/acm/contest/90/J 来源:牛客网题目描述 牛客网是IT求职神器,提供海量C++、JAVA、前端等职业笔试题库,在线进行百度阿里腾讯网易等互联网名企笔试面试模拟考试练习,和牛人一起讨论经典试题,全面提升你的编程。作为acmer的小A,牛客网是他首选的题库。 小A是一个中度强迫症患者,每次做数组有关的题目都异常难受,他十...原创 2018-03-24 22:35:50 · 833 阅读 · 0 评论 -
"科林明伦杯"哈尔滨理工大学第八届程序设计竞赛——Hrbust -2370 SUM(快速幂)
Description Calculate MOD 1,000,000,007.(1≤n≤1e5, 1≤d≤1e9) Input The first line is an integer t(1≤t≤100), which is the number of test cases.Then t lines follow. Each line contains two numbers ...原创 2018-03-26 01:16:56 · 520 阅读 · 0 评论 -
UPC-6020 机智的AmyZhi(暴力)
题目描述 那年一个雨季,AmyZhi在校门外弯身买参考书。 这时SiriusRen走过来,一言不合甩给她一道(自认为)很难的题 给你一个数字N,求一个最小的正整数M,这个数字M的各个位的数字加上它本身之和恰好为N。 没有想到AmyZhi秒解了这道题 并把N扩大到了10^18 甩回给了SiriusRen SiriusRen苦苦思索,发现并不会这道题 可怜SiriusRen一世英名,在Am...原创 2018-03-22 00:42:33 · 348 阅读 · 0 评论 -
UPC-6199 LCYZ的道路(贪心)
题目描述 由于在修新教学楼,LCYZ的路上出现了N个坑。为了尽快填补好这N个坑,LCYZ决定对M处地段采取封闭措施。为了求解方便,假设LCYZ的路只有一条,而且是笔直的。现在给出N个坑的位置,请你计算,最少要对多远的路段采取封闭措施?输入 输入数据共两行,第一行为两个正整数N、M (2<=N<=15000,M<=N)。第二行给出了N个坑的坐标(坐标值均在int范围内,按从...原创 2018-03-28 01:49:37 · 225 阅读 · 0 评论 -
HDU - 1800 Flying to the Mars(水题)
In the year 8888, the Earth is ruled by the PPF Empire . As the population growing , PPF needs to find more land for the newborns . Finally , PPF decides to attack Kscinow who ruling the Mars . Here t...原创 2018-05-06 23:37:35 · 216 阅读 · 0 评论 -
HDU - 3183 A Magic Lamp(RMQ-ST)贪心
Kiki likes traveling. One day she finds a magic lamp, unfortunately the genie in the lamp is not so kind. Kiki must answer a question, and then the genie will realize one of her dreams. The question...原创 2018-05-07 00:01:02 · 120 阅读 · 0 评论 -
UPC-5115 Intelligence in Perpendicularia(数组区间更新转单点更新求前缀和)
题目描述 There are only two directions in Perpendicularia: vertical and horizontal. Perpendicularia government are going to build a new secret service facility. They have some proposed facility plans and...原创 2018-04-30 03:01:32 · 357 阅读 · 0 评论 -
UPC-5431 Barareh on Fire(广搜)
题目描述 The Barareh village is on fire due to the attack of the virtual enemy. Several places are already on fire and the fire is spreading fast to other places. Khorzookhan who is the only person remai...原创 2018-04-30 03:11:45 · 178 阅读 · 0 评论 -
UPC-6474 AtCoDeer and Rock-Paper(模拟)
题目描述 AtCoDeer the deer and his friend TopCoDeer is playing a game. The game consists of N turns. In each turn, each player plays one of the two gestures, Rock and Paper, as in Rock-paper-scissors, un...原创 2018-05-31 08:55:06 · 367 阅读 · 0 评论 -
UPC-6467 Many Formulas(深搜暴力)
题目描述 You are given a string S consisting of digits between 1 and 9, inclusive. You can insert the letter + into some of the positions (possibly none) between two letters in this string. Here, + must ...原创 2018-05-31 16:09:39 · 235 阅读 · 0 评论 -
Codeforces Round #547 E. Superhero Battle(思维+模拟)
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA superhero fights with a monster. The battle consists of rounds, each of which lasts exactly ...原创 2019-03-22 14:46:28 · 207 阅读 · 0 评论