![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
暴力模拟
旺旺_碎_冰冰
这个作者很懒,什么都没留下…
展开
-
2018年全国多校算法寒假训练营练习比赛(第五场)A:逆序数(小技巧)
链接:https://www.nowcoder.com/acm/contest/77/A来源:牛客网 时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 131072K,其他语言262144K64bit IO Format: %lld题目描述在一个排列中,如果一对数的前后位置与大小顺序相反,即前面的数大于后面的数,那么它们就称为一个逆序。一个排列中逆序的总数就称为这个...原创 2018-02-27 17:46:52 · 361 阅读 · 0 评论 -
Blue Jeans poj 3080(暴力&kmp)
The Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands of contributors to map how the Earth was...原创 2018-05-30 19:32:41 · 250 阅读 · 0 评论 -
HRBUST - 2322 Team(倒着来模拟)
Kim 正在玩一款手游,在这款游戏中,Kim可以选择若干个角色编成一队作战。为了挑战不同的关卡,Kim需要不断的调整编队阵容。然而随着游戏不断更新,队伍成员变得越来越多,Kim已经记不清哪些角色在队伍中,哪些角色不在队伍中了。请你写一个程序来帮助他。具体来说,Kim有三种可以执行的操作。 1 x :把 x 号角色加入队伍。如果x号角色已经在队伍中,什么都不会发生。 2 x :把原创 2018-04-04 19:30:37 · 241 阅读 · 0 评论 -
HDU - 5391(打表找规律)
Tina Town is a friendly place. People there care about each other. Tina has a ball called zball. Zball is magic. It grows larger every day. On the first day, it becomes1 time as large as its原创 2018-03-28 21:53:38 · 290 阅读 · 0 评论 -
UVALive - 7500(找规律)
题目链接:点击打开链接题意:a个球装在一个盒子里,再拿一个新的盒子,在所有旧盒子中取一个球放入新的盒子中,然后将这些盒子里的球数量从小到大排序,若连着两次盒子个数以及每个盒子中的球的个数相同,那么这个数就是我们要的。(举个栗子:a=2-->1,1-->2(出现了相同的数但不是连着的,那么2不是我们要的数), 再如a=3-->1,2-->1,2 , 那么3就是我们要的数,再如a=6-->1,5-原创 2018-04-04 00:11:40 · 332 阅读 · 0 评论 -
小数数字 HihoCoder - 1720 (模拟除法)
给定一个真分数P/Q(P 例如1/2=0.5,只包含数字5;1/3=0.33333……,只包含数字3,1/7=0.142857142857……,包含数字124578。Input两个整数P和Q,1 ≤ P Output从小到大输出小数部分出现的所有数字Sample Input13 123Sample Output01569思路:模拟一下除法原创 2018-04-10 23:02:12 · 534 阅读 · 0 评论 -
cf(950B)Intercepted Message(简单模拟)
B. Intercepted Messagetime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputHacker Zhorik wants to decipher two secret mess原创 2018-03-14 12:32:56 · 300 阅读 · 0 评论 -
E:回旋星空 (简单模拟)第13届景驰-埃森哲杯广东工业大学ACM程序设计大赛
链接:https://www.nowcoder.com/acm/contest/90/E来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 131072K,其他语言262144K64bit IO Format: %lld题目描述曾经有两个来自吉尔尼斯的人(A和C)恋爱了,他们晚上经常在一起看头上的那片名为假的回旋星空,原创 2018-03-26 20:16:33 · 246 阅读 · 0 评论 -
CodeForces - 940C(模拟)
And where the are the phone numbers?You are given a string s consisting of lowercase English letters and an integerk. Find the lexicographically smallest stringt of length k, such that its set o原创 2018-03-27 17:11:14 · 611 阅读 · 0 评论 -
CodeForces - 940B(模拟)
Right now she actually isn't. But she will be, if you don't solve this problem.You are given integers n, k, A and B. There is a number x, which is initially equal ton. You are allowed to perfo原创 2018-03-27 17:30:35 · 339 阅读 · 0 评论 -
CodeForces - 907B Tic-Tac-Toe(模拟题)
B. Tic-Tac-Toetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo bears are playing tic-tac-toe via mail. It's borin原创 2018-04-02 18:01:06 · 357 阅读 · 0 评论 -
J:强迫症的序列(逆向转换思维) (第13届景驰-埃森哲杯广东工业大学ACM程序设计大赛)
链接:https://www.nowcoder.com/acm/contest/90/J来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述牛客网是IT求职神器,提供海量C++、JAVA、前端等职业笔试题库,在线进行百度阿里腾讯网易等互联网名原创 2018-03-26 17:35:50 · 547 阅读 · 0 评论 -
Treasure CodeForces - 494A(栈模拟)
Malek has recently found a treasure map. While he was looking for a treasure he found a locked door. There was a string s written on the door consisting of characters '(', ')' and '#'. Below there was...原创 2018-03-30 05:02:22 · 226 阅读 · 0 评论 -
Predict Outcome of the Game CodeForces - 451C (分情况讨论)
There are n games in a football tournament. Three teams are participating in it. Currently k games had already been played.You are an avid football fan, but recently you missed the whole k games. Fort...原创 2018-03-30 02:17:05 · 280 阅读 · 0 评论 -
字符串排序 HihoCoder - 1712
一般我们在对字符串排序时,都会按照字典序排序。当字符串只包含小写字母时,相当于按字母表"abcdefghijklmnopqrstuvwxyz"的顺序排序。 现在我们打乱字母表的顺序,得到一个26个字母的新顺序。例如"bdceafghijklmnopqrstuvwxyz"代表'b'排在'd'前,'d'在'c'前,'c'在'e'前…… 给定N个字符串,请你按照新的字母顺序对它们排序。Input第一...原创 2018-03-30 00:10:17 · 1165 阅读 · 2 评论 -
CodeForces - 451C(模拟)
Berland, 2016. The exchange rate of currency you all know against the burle has increased so much that to simplify the calculations, its fractional part was neglected and the exchange rate is now assu...原创 2018-03-29 23:12:57 · 400 阅读 · 0 评论 -
POJ 3087 Shuffle'm Up (简单模拟)
给定两个长度为len的字符串s1和s2, 接着给出一个长度为len*2的字符串s12。将字符串s1和s2通过一定的变换变成s12,找到变换次数变换规则如下:假设s1=12345,s2=67890变换后的序列 s=6172839405如果s和s12完全相等那么输出变换次数如果不完全相等,s的前半部分作为s1,后半部分作为s2,重复上述过程。 Inp原创 2018-03-13 18:47:44 · 228 阅读 · 0 评论 -
无题(暴力模拟+技巧)
简单题Description给出一个长度为n的数列,求最少删除几个数可以让剩下的数中 最大值-最小值Input第一行输入两个数n,m(1≤n≤100,0≤m≤100)第二行有n个数(0≤xi≤100)ps:本题为多组输入Output输出所求答案Sample Input 1 3 12 1 4Sample Output 1原创 2018-03-11 15:54:55 · 313 阅读 · 0 评论 -
Maximum of Maximums of Minimums codeforces 872 B(简单思路)
题意:给你一个数组,长度为n,要你把数组分为k组,注意每一组都必须要是连续的,从每段里面取最小值,然后从k个最小值里面找出最大值就是答案。#include<stdio.h>#include<algorithm>using namespace std;const int N=1e5+5;int a[N],maxa,mina;int main(){ i...原创 2018-08-15 09:55:40 · 322 阅读 · 0 评论