模拟
永夜莫明
菜是原罪
展开
-
Switches(模拟)
In the control panel of an enormous amphitheatre, there are N switches, numbered from 1 to N, that control the MM light bulbs of the place, which are numbered from 1 to M. Note that the number of swit...原创 2018-12-07 00:16:53 · 405 阅读 · 0 评论 -
小乐乐和25(模拟?)
链接:https://ac.nowcoder.com/acm/contest/301/J来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述小乐乐特别喜欢25这个数字,他想把所有的数字都变成25的倍数。现在小乐乐得到一个数字,想问问你最少用几次操作才可以把这个数字改造成25的倍数...原创 2018-12-08 23:49:49 · 149 阅读 · 0 评论 -
Beautiful Substrings(预处理)(思维 + 后缀和)
You are given two strings a and b consisting of lowercase English letters. A beautiful substring is defined as a substring of any length of string b such that the first and last letters of it are the ...原创 2018-12-16 12:03:19 · 291 阅读 · 0 评论 -
Multiplication Dilemma(乘法技巧模拟)
Multiplication operation is not always easy! For example, it is hard to calculate 27 × 20 using your mind, but it is easier to find the answer using the following methods: 30 × 20 - 3 × 20. It turns o...原创 2018-12-16 12:54:07 · 709 阅读 · 0 评论 -
Shortest Path!(最短路模拟)
Today, Husam was visiting his grandmother. Husam always takes a path such that the total distance he will walk is as minimum as possible. Husam decided to give you all information about his journey so...原创 2018-12-16 13:02:31 · 1223 阅读 · 0 评论 -
Stupid Submissions(模拟)
Abed is so motivated this year, his goal is qualifying for the 2019 ACM International Collegiate Programming Contest (ACM ICPC). Therefore, he always trains using Codeforces online judge. If you do no...原创 2018-12-16 13:35:17 · 487 阅读 · 0 评论 -
Cyclic Shift(字符串匹配水题)
You are given two strings a and b of the same length and consisting of lowercase English letters. You can pick at most one subsequence of string b and do a cyclic shift on that subsequence exactly onc...原创 2018-12-16 13:41:16 · 837 阅读 · 0 评论 -
I'm Bored!(水题,模拟???)
Being a judge is not always an interesting job! For example, it is very boring to wait for the first submission in the contest. So, judges used to entertain themselves using the “I’m Bored” tab in the...原创 2018-12-16 16:43:11 · 536 阅读 · 0 评论 -
Appearance Count(水题)
You will be given m strings. For each of those strings, you need to count the total number of appearances of that string as substrings in all possible strings of length n containing only lower case En...原创 2018-12-19 21:44:02 · 313 阅读 · 0 评论 -
A hard Aoshu Problem (暴力模拟)
Math Olympiad is called “Aoshu” in China. Aoshu is very popular in elementary schools. Nowadays, Aoshu is getting more and more difficult. Here is a classic Aoshu problem:ABBDE __ ABCCC = BDBDEIn th...原创 2018-12-27 00:35:49 · 251 阅读 · 0 评论 -
lgz学长哄女友
lgz学长哄女友Description 在我们lgz学长的面前,所有题都是水题,这题也不例外︿( ̄︶ ̄)︿。今天,lgz学长瞒着女朋友和小基佬一起偷偷打王者,可是没想到被女朋友逮到了( ̄ω ̄;)。为了哄女朋友,lgz学长只好带着女朋友打排位去了(・ω・`ll)。但是女朋友发话了,要是lgz这把表现得没她好的话,就一个月不理他(;へ:)。为了lgz下半生的幸福,可爱的学弟学妹一起来帮帮他...原创 2019-01-01 21:02:05 · 1227 阅读 · 0 评论 -
poj4044(最长连续公共子序列)
题目链接:http://poj.org/problem?id=4044大致题意:给出两个班级的成绩,先按降序排序,如果在一个班级里有某个成绩出现了多次,则只保留一个。然后求连续的最长公共子序列。输出时,先输出最长连续公共子序列,然后按个位数字递增的顺序输出,若个位数字一样就按成绩递增。两个循环变量一重循环#include<cstdio>#include<algor...原创 2019-01-01 21:11:41 · 174 阅读 · 0 评论 -
GZS and String
GZS and Stringhttps://qduoj.com/problem/6?tdsourcetag=s_pctim_aiomsgDescription GZS has two strings s and t.In each step, GZS can select arbitrary character c of s and insert any character d...原创 2019-01-06 00:08:06 · 467 阅读 · 0 评论 -
数数字(找规律+模拟)
数数字Description 统计一下 aaa ⋯ aaa * b(n 个 a × b) 的结果里面有多少个数字d,a,b,d均为一位数。样例解释:3333333333*3=9999999999,里面有10个9。Input 多组测试数据。第一行有一个整数T,表示测试数据的数目。(1≤T≤5000)接下来有T行,每一行表示一组测试数据,有4个整数a,b,d,n。 (...原创 2019-01-20 12:35:39 · 1426 阅读 · 0 评论 -
Captain Marmot (枚举/dfs+逆时针旋转+判断是否是正方形)
题目链接:http://codeforces.com/contest/474/myCaptain Marmot wants to prepare a huge and important battle against his enemy, Captain Snake. For this battle he has n regiments, each consisting of 4 moles....原创 2019-01-21 00:00:03 · 270 阅读 · 0 评论 -
L1-049 天梯赛座位分配 (20 分)
L1-049 天梯赛座位分配 (20 分)天梯赛每年有大量参赛队员,要保证同一所学校的所有队员都不能相邻,分配座位就成为一件比较麻烦的事情。为此我们制定如下策略:假设某赛场有 N 所学校参赛,第 i 所学校有 M[i] 支队伍,每队 10 位参赛选手。令每校选手排成一列纵队,第 i+1 队的选手排在第 i 队选手之后。从第 1 所学校开始,各校的第 1 位队员顺次入座,然后是各校的第 2 位队...原创 2019-03-07 08:46:31 · 164 阅读 · 0 评论 -
BrokenLED
You know, there are more and more LED Displays used for show numbers in everywhere, a general product is like the left picture below, called as 7 segments LED, because it can show all the digitals fro...原创 2019-03-12 16:53:49 · 217 阅读 · 0 评论 -
FZU2202 犯罪嫌疑人(逻辑推理+模拟)
题目链接:http://acm.fzu.edu.cn/problem.php?pid=2202福尔摩斯是个大侦探,他总是在解决疑难案件。这一次的案件也不例外,案件是这样的:有编号为1到N的N位嫌疑犯,他们其中有一个犯了罪,然后每个嫌疑犯都被询问,“哪一个人犯了罪?”犯罪嫌疑人的答案只能“编号ai的嫌疑犯犯了罪”或者“编号ai的嫌疑犯没有犯罪”。当然嫌疑犯也可以说他自己(ai = i).福尔...原创 2019-04-03 10:42:40 · 302 阅读 · 0 评论 -
2018CCPC吉林C-JUSTICE(思维模拟)
Put simply, the Justice card represents justice, fairness, truth and the law. You are being called to account for your actions and will be judged accordingly. If you have acted in a way that is in ali...原创 2019-05-03 16:43:20 · 1248 阅读 · 1 评论 -
Tic-Tac-Toe(模拟)
链接:https://ac.nowcoder.com/acm/contest/847/B来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述Alice和Bob正在下井字棋,顾名思义,在3*3棋盘上先完成三子连珠(横、竖,或者斜对角线)的玩家将获胜。Alice执白子...原创 2019-05-04 09:57:05 · 2943 阅读 · 0 评论 -
Little Sub and Enigma(思维模拟)
题目描述Little Sub builds a naive Enigma machine of his own. It can only be used to encrypt/decrypt lower-case letters by giving each letter a unique corresponding lower-case letter. In order to ensure ...原创 2019-05-04 14:47:42 · 377 阅读 · 0 评论 -
Watermelon(博弈?模拟)
链接:https://ac.nowcoder.com/acm/contest/893/E来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述在ACM队暑假集训的某一天,实验室里有 n个人。因为天气很热,大家都很想吃西瓜。于是Eric买了 m个西瓜拿到了实验室。Eric...原创 2019-05-07 21:43:44 · 383 阅读 · 0 评论 -
求小数点后第几位数(模拟+快速幂)
链接:https://ac.nowcoder.com/acm/contest/548/B来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述立华奏在学习初中数学的时候遇到了这样一道大水题:“设箱子内有 n 个球,其中给 m 个球打上标记,设一次摸球摸到每一个球的概...原创 2019-05-21 15:50:42 · 577 阅读 · 0 评论 -
求整数的二进制里有多少个1
求整数的二进制里有多少个1https://blog.csdn.net/m0_38121874/article/details/80139608链接:https://ac.nowcoder.com/acm/contest/908/C来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld...原创 2019-06-01 23:38:34 · 227 阅读 · 0 评论 -
通向宝可梦擂台之路!(贪心模拟)
https://cometoj.com/contest/42/problem/H题目描述小智接连得到两颗徽章,他非常自豪。小霞建议接下来去枯叶市,在那可以看见豪华客轮圣安妮。这种建议吸引不了小智,但是小刚却提醒小智枯叶市也有道馆。小智听闻立刻决定向枯叶市出发,路上有人建议他去向小明挑战。小明是位非常厉害的训练家,从未输过比赛。信心爆棚的小智决定去会会这位小明…...在小明的私人擂...原创 2019-06-02 00:32:02 · 174 阅读 · 0 评论 -
ABC(思维)
题目描述You are given a string s consisting of A, B and C.Snuke wants to perform the following operation on s as many times as possible:Choose a contiguous substring of s that reads ABC and replace it...原创 2019-07-03 18:16:16 · 287 阅读 · 0 评论 -
Subarray(思维+模拟+lazy标记+……)
https://ac.nowcoder.com/acm/contest/882/J当时开局ac率100%,然后就死磕这道题(主要是因为题目短,不想去读别的题),一发RE,一发MLE,然后放弃了……WJYTXDY当时的想法很朴素,就是对于每一个位置的前缀和,看在他左边比他小的前缀和的数量(很明显时间复杂度不行,k*1e9,当时抱着如果评测机跑的快的话,说不定……),因为有负数,所以加...原创 2019-07-23 21:21:55 · 166 阅读 · 0 评论 -
无聊游戏(博弈+思维+数学推导+模糊模拟)
问题 B: 无聊游戏问题 B: 无聊游戏时间限制: 1 Sec内存限制: 128 MB提交: 96解决: 18[提交] [状态] [命题人:admin]题目描述小N和小A在玩这样的一个游戏:给定初始数列Q,小N先把某个前缀(可以为空)的数字全部乘上−A,小A再把某个后缀(可以为空)的数字全部乘上−B,小N想让最后所有数的和尽量大,而小A想让最后所有数的和尽量的小。...原创 2019-07-31 19:48:27 · 303 阅读 · 0 评论 -
神秘代码FZ(暴力模拟/区间dp)
问题 D: 神秘代码FZ问题 D: 神秘代码FZ时间限制: 1 Sec内存限制: 128 MB提交: 42解决: 13[提交] [状态] [命题人:admin]题目描述Farmer John有一段长度至少为2的仅由大写字母组成的代码,现在他要对这段代码进行一次或一次以上的骚操作。对于一段代码S,Farmer John可以有如下的骚操作:把S的开头一个字母或结尾一个...原创 2019-07-31 22:26:54 · 755 阅读 · 0 评论 -
L1-064 估值一亿的AI核心代码 (20 分)
本题要求你实现一个稍微更值钱一点的 AI 英文问答程序,规则是:无论用户说什么,首先把对方说的话在一行中原样打印出来; 消除原文中多余空格:把相邻单词间的多个空格换成 1 个空格,把行首尾的空格全部删掉,把标点符号前面的空格删掉; 把原文中所有大写英文字母变成小写,除了I; 把原文中所有独立的can you、could you对应地换成I can、I could—— 这里“独立”...原创 2019-08-04 21:54:32 · 1215 阅读 · 2 评论 -
Gemstones(思维+栈/链表模拟)
链接:https://ac.nowcoder.com/acm/contest/888/G来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 524288K,其他语言1048576K64bit IO Format: %lld题目描述Gromah and LZR have entered the seventh level. There are a sequ...原创 2019-08-12 23:46:34 · 253 阅读 · 0 评论 -
2019百度之星初赛第二场 度度熊与排列
Problem Description度熊有一个机器,这个机器有一个 1∼M 的排列 p[1..M] 当作参数,若丢进一个长度为 M 的字符串,此机器会将此字符串重新排列后再输出,重新排列的方式为:原本第 iii 个位置的字符会变到第 p[i] 个位置。举例来说,当 M=3 p[1]=3,p[2]=1,p[3]=2,那么丢 "abc" 进入这个机器后,机器会输出"bca";若丢进的是 "d...原创 2019-08-18 20:54:44 · 588 阅读 · 0 评论 -
Uniqueness(思维+模拟)
https://codeforces.com/contest/1208/problem/BB. UniquenessYou are given an arraya1,a2,…,an. You can removeat most onesubsegment from it. The remaining elements should be pairwise distinct.In ...原创 2019-08-26 19:42:40 · 336 阅读 · 5 评论