模拟
qq_37383726
这个作者很懒,什么都没留下…
展开
-
【Codeforces Round #429 (Div. 2)】 A B C
A. Generous Kefa time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output One day Kefa found n baloons. For convenience, we denote color of i-th ba原创 2017-09-21 20:30:18 · 195 阅读 · 0 评论 -
HPU 周练一
HDU - 2709 Farmer John commanded his cows to search for different sets of numbers that sum to a given number. The cows use only numbers that are an integer power of 2. Here are the possible sets of nu原创 2017-10-02 15:27:19 · 268 阅读 · 0 评论 -
【CodeForces - 879】 A B C【构造+思维】
A - Borya’s Diagnosis It seems that Borya is seriously sick. He is going visit n doctors to find out the exact diagnosis. Each of the doctors needs the information about all previous visits, so Borya原创 2017-10-27 14:42:31 · 724 阅读 · 0 评论 -
【CodeForces - 864】 A B C【模拟】 D【贪心+优先队列】
A - Fair Game Petya and Vasya decided to play a game. They have n cards (n is an even number). A single integer is written on each card.Before the game Petya will choose an integer and after that Vas原创 2017-10-22 23:23:09 · 581 阅读 · 0 评论 -
【Codeforces Round #427】A(模拟) B (贪心) C (DP)
A - Key races Two boys decided to compete in text typing on the site “Key races”. During the competition, they have to type a text consisting of s characters. The first participant types one characte原创 2017-10-13 17:56:13 · 173 阅读 · 0 评论 -
【HDU - 5929】 Basic Data Structure 【双向链表+模拟】
Mr. Frog learned a basic data structure recently, which is called stack.There are some basic operations of stack: ∙∙ PUSH x: put x on the top of the stack, x must be 0 or 1. ∙∙ POP: throw the element原创 2017-11-08 23:09:22 · 212 阅读 · 0 评论 -
【CodeForces - 834】 A【模拟】 B【模拟】C【思维】
A The Useless Toy Walking through the streets of Marshmallow City, Slastyona have spotted some merchants selling a kind of useless toy which is very popular nowadays – caramel spinner! Wanting to join原创 2017-10-24 22:43:30 · 431 阅读 · 0 评论 -
【第五届“图灵杯”NEUQ-ACM程序设计大赛】A C D【哈夫曼树】E【手写链表】 F G H【圆周排列生成】 I
A 逃出生天 题目描述: gold学长从昏迷中醒来以后发现自己被困在一个山洞里,他找了很久,终于找到一个门。门上写着:想要逃出去,只有一个办法 你可以选择一个数n,设m=1 * 2 * … * (n-1)。如果m是n的倍数,那么门就会自动打开,否则你就别想出去了。 gold学长内心充满了绝望,他想了一些数,但他不知道这些数能不能保证自己逃出去。你能帮助gold学长逃出生天吗? 输入: 第一原创 2017-12-04 15:40:40 · 1042 阅读 · 0 评论 -
【第八届河南理工大学程序设计大赛(正式赛)】 BDE F GHIJKLM
问题 F: GCD与LCM 题目描述 Ocean某天遇到了一个很简单的数学题,但是他的大脑已经超负荷了。现在请你帮帮他吧:已知D = GCD(x, y) + LCM(x, y),求合法组合(x, y)总数,其中x > 0且y > 0。输入 第一行输入一个整数T,代表有T组测试数据。接下来每行输入一个整数D。注:1<=T,D<=1051<=T,D<=105。输出 对每组测试数据,输出一个整数代原创 2017-12-11 21:28:20 · 1257 阅读 · 0 评论 -
【牛客练习赛13】 A B C D【康拓展开】 E【DP or 记忆化搜索】 F 【思维】
A 幸运数字Ⅰ链接:https://www.nowcoder.com/acm/contest/70/A 来源:牛客网时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 定义一个数字为幸运数字当且仅当它的所有数位都是4或者7。 比如说,47、744、4都是幸运数字而5...原创 2018-03-17 11:09:13 · 4921 阅读 · 0 评论 -
【L2-002. 】链表去重 【模拟】
给定一个带整数键值的单链表L,本题要求你编写程序,删除那些键值的绝对值有重复的结点。即对任意键值K,只有键值或其绝对值等于K的第一个结点可以被保留。同时,所有被删除的结点必须被保存在另外一个链表中。例如:另L为21→-15→-15→-7→15,则你必须输出去重后的链表21→-15→-7、以及被删除的链表-15→15。输入格式:输入第一行包含链表第一个结点的地址、以及结点个数N(<= ...原创 2018-03-26 20:51:43 · 146 阅读 · 0 评论 -
【ACM-ICPC 2018 南京赛区网络预赛】 G Lpl and Energy-saving Lamps 【线段树+模拟】
分析: 线段树暴力求解,因为看到了查询中最大的月份才是1e5,那么我们就可以直接模拟求出 1~max(dpdpd_p) 中相应的值,然后逐一回答。 对于当月所可以修的房子,可以用线段树 查找整个所有屋子中第一个小于等于你手中所拥有的灯泡数目 的房子序号,之后还要更新当前房子的灯泡数为INF,表示这个屋子修理过了。 代码中,因为有查找区间第一个大于等于val的模板,所以我直接将值取反,...原创 2018-09-01 20:20:29 · 304 阅读 · 0 评论 -
【CodeForces - 869】 A B C E 【组合数打表】
A The Artful Expedient Rock… Paper!After Karen have found the deterministic winning (losing?) strategy for rock-paper-scissors, her brother, Koyomi, comes up with a new game as a substitute. The game原创 2017-10-17 19:02:24 · 326 阅读 · 0 评论 -
Owl Geeks 【map 模拟】
The owls have the following equation:Y = a × x2 + b × xWith a, b, and N given, they decide to put into a set the integer values of Y that are less than or equal to N and that are outputted from the equ原创 2017-08-21 14:56:58 · 382 阅读 · 0 评论 -
问题E 铺地毯 [模拟]
1092: 铺地毯 [模拟]时间限制: 2 Sec 内存限制: 128 MB题目描述PIPA计划在一片矩形区域铺上一些矩形地毯。现在PIPA已经给每张地毯进行了编号,她按照编号从小到大进行铺设,后铺的地毯覆盖在前面已经铺好的地毯之上。在全部完成后,PIPA想知道某一个位置最上面的地毯编号是多少。输入多组测试数据。第一行是一个数字n,代原创 2017-03-11 19:36:00 · 539 阅读 · 0 评论 -
Bulbs 【模拟】or 【set】
Bulbs Vasya wants to turn on Christmas lights consisting of m bulbs. Initially, all bulbs are turned off. There are n buttons, each of them is connected to some set of bulbs. Vasya can press any of t原创 2017-04-13 20:28:52 · 234 阅读 · 0 评论 -
【stl】
MG is a lucky boy. He is always be able to find gold from underground. It is known that the gold is a sequence with nn elements, which has its own color CC.MG can dig out a continuous area of sequence原创 2017-04-06 08:46:52 · 317 阅读 · 0 评论 -
加密 【打表】
先生与加密 Time Limit: 1 Sec Memory Limit: 128 MB Submit: 396 Solved: 255 [Submit][Status][Web Board] Description L先生最近想给暗恋的同班女神Z写一封情书,但是需要经过同学A、B、C、D、E、F、G转交,为了保证情书内容不被公之于众(否则后果,你懂的),他决定采用高大上的维吉尼亚加密原创 2017-05-29 16:50:37 · 346 阅读 · 0 评论 -
paulzhou的数学?TAT? 【二分打表找规律】
paulzhou的数学?TAT? Time Limit : 3000/1000ms (Java/Other) Memory Limit : 65535/32768K (Java/Other) Total Submission(s) : 4 Accepted Submission(s) : 4 Font: Times New Roman | Verdana | Georgia Font原创 2017-06-08 23:51:48 · 240 阅读 · 0 评论 -
Codeforces Round #424 Div.2 A
A. Unimodal Array time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Array of integers is unimodal, if:it is strictly increasing in the beginn原创 2017-07-14 14:47:09 · 164 阅读 · 0 评论 -
Codeforces Round #424 Div.2 B 【map】
B. Keyboard Layouts time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output There are two popular keyboard layouts in Berland, they differ only in原创 2017-07-14 14:55:01 · 211 阅读 · 0 评论 -
Berland Bingo 【模拟】
B. Berland Bingo time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Lately, a national version of a bingo game has become very popular in Berl原创 2017-07-14 16:18:30 · 256 阅读 · 0 评论 -
小X分集合 【map】+【模拟】
小X有n个互不相同的整数: p1,p2,…,pnp1,p2,…,pn 。他想把这些整数分到两个集合A和B里边。但是要符合下面两个条件。・ 如果x属于A,那么a-x也肯定属于A。・ 如果x属于B,那么b-x也肯定属于B。判断一下是否存在一种方案来分配这些数字到集合A,B中。注意:如果一个集合为空也是可以的。Input 单组测试数据。 第一行有三个整数n,a,b (1≤转载 2017-07-19 09:04:44 · 333 阅读 · 0 评论 -
Red packet 【模拟】
New Year is coming! Our big boss Wine93 will distribute some “Red Package”, just like Alipay and Wechat.Wine93 has m yuan, he decides to distribute them to n people and everyone can get some money(0 yu原创 2017-07-20 08:51:00 · 1380 阅读 · 0 评论 -
【HPUOJ 1415】小ho的0 【字符串】
题目描述 有一个由0和1组成的字符串,它好长呀——–一望无际恩,说正题,小ho的数学不太好,虽然是学计算机的但是看见0和1也是很头疼的,现在他的老师想让他计算出来包含K个1的子串有多少个—–呀,头要炸了!!!小ho知道你的数学棒棒哒,所以来找你帮忙了。输入 第一行是一个数K。第二行是一个字符串str。0 < |str| ≤ 106输出 一个数S,代表了满足条件的个数。样例输入 2 1010原创 2017-08-12 22:00:38 · 198 阅读 · 0 评论