随笔分类 -  思维

摘要:D - Handstand Time Limit: 2 sec / Memory Limit: 1024 MB Score : 400400 points Problem Statement NN people are arranged in a row from left to right. Yo 阅读全文
posted @ 2019-04-14 13:23 茄子Min 阅读(490) 评论(0) 推荐(0)
摘要:链接:https://ac.nowcoder.com/acm/contest/560/D来源:牛客网 题目描述 Give you a rectangular gird which is h cells high and w cells wide. Each grid is black initial 阅读全文
posted @ 2019-04-13 21:41 茄子Min 阅读(353) 评论(0) 推荐(0)
摘要:Let's suppose you have an array a, a stack s (initially empty) and an array b (also initially empty). You may perform the following operations until b 阅读全文
posted @ 2019-04-12 20:18 茄子Min 阅读(328) 评论(0) 推荐(0)
摘要:You are given an integer array of length nn. You have to choose some subsequence of this array of maximum length such that this subsequence forms a in 阅读全文
posted @ 2019-04-08 21:47 茄子Min 阅读(291) 评论(0) 推荐(0)
摘要:You are given a sequence of integers of length nn and integer number kk. You should print any integer number xx in the range of [1;109][1;109] (i.e. 1 阅读全文
posted @ 2019-04-07 20:04 茄子Min 阅读(316) 评论(0) 推荐(0)
摘要:Polycarp likes to play with numbers. He takes some integer number xx, writes it down on the board, and then performs with it n−1n−1 operations of the 阅读全文
posted @ 2019-04-07 11:17 茄子Min 阅读(273) 评论(0) 推荐(0)
摘要:Country of Metropolia is holding Olympiad of Metrpolises soon. It mean that all jury members of the olympiad should meet together in Metropolis (the c 阅读全文
posted @ 2019-04-06 00:10 茄子Min 阅读(328) 评论(0) 推荐(0)
摘要:Petya studies at university. The current academic year finishes with nn special days. Petya needs to pass mm exams in those special days. The special 阅读全文
posted @ 2019-04-03 22:43 茄子Min 阅读(327) 评论(0) 推荐(0)
摘要:The busses in Berland are equipped with a video surveillance system. The system records information about changes in the number of passengers in a bus 阅读全文
posted @ 2019-04-01 22:19 茄子Min 阅读(1019) 评论(0) 推荐(0)
摘要:You are given a connected undirected graph consisting of nn vertices and mm edges. There are no self-loops or multiple edges in the given graph. You h 阅读全文
posted @ 2019-04-01 19:46 茄子Min 阅读(370) 评论(0) 推荐(0)
摘要:历届试题 小朋友排队 时间限制:1.0s 内存限制:256.0MB 问题描述 n 个小朋友站成一排。现在要把他们按身高从低到高的顺序排列,但是每次只能交换位置相邻的两个小朋友。 每个小朋友都有一个不高兴的程度。开始的时候,所有小朋友的不高兴程度都是0。 如果某个小朋友第一次被要求交换,则他的不高兴程 阅读全文
posted @ 2019-03-13 13:06 茄子Min 阅读(309) 评论(0) 推荐(0)
摘要:问题如下:先给你一个含有N个整数的数组数组中的每一个元素只为1或者0而N的大小为1~100你可以删除一些元素(也可以选择不删除),使剩下的数组中,没有一个元素0在1后面出现。并且要使剩下的元素的数量最多,请输出剩下元素的数量。 思路: 没有一个元素0在1后面出现,。 那么操作后的数组只可能是这个样子 阅读全文
posted @ 2019-03-11 20:49 茄子Min 阅读(331) 评论(0) 推荐(0)
摘要:E. Magic Stones time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output E. Magic Stones time limi 阅读全文
posted @ 2019-02-08 14:43 茄子Min 阅读(421) 评论(0) 推荐(0)
摘要:B. Makes And The Product time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output B. Makes And Th 阅读全文
posted @ 2019-01-27 21:20 茄子Min 阅读(383) 评论(0) 推荐(0)
摘要:You have a garland consisting of nn lamps. Each lamp is colored red, green or blue. The color of the ii-th lamp is sisi ('R', 'G' and 'B' — colors of 阅读全文
posted @ 2019-01-24 12:25 茄子Min 阅读(677) 评论(0) 推荐(0)
摘要:You are given two segments [l1;r1][l1;r1] and [l2;r2][l2;r2] on the xx-axis. It is guaranteed that l1<r1l1<r1 and l2<r2l2<r2. Segments may intersect, 阅读全文
posted @ 2019-01-24 12:13 茄子Min 阅读(484) 评论(0) 推荐(0)
摘要:Emily the entrepreneur has a cool business idea: packaging and selling snowflakes. She has devised a machine that captures snowflakes as they fall, an 阅读全文
posted @ 2019-01-23 14:45 茄子Min 阅读(372) 评论(0) 推荐(0)
摘要:D. Game with modulo time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output D. Game with modulo t 阅读全文
posted @ 2019-01-23 14:00 茄子Min 阅读(577) 评论(0) 推荐(0)
摘要:D. Vladik and Favorite Game time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output D. Vladik an 阅读全文
posted @ 2019-01-19 23:46 茄子Min 阅读(266) 评论(0) 推荐(0)
摘要:链接:https://ac.nowcoder.com/acm/contest/358/A来源:牛客网 题目描述 众所周知,每个人都有自己的rp值(是个非负实数),膜别人可以从别人身上吸取rp值。 然而当你膜别人时,别人也会来膜你,互膜一段时间后,你们就平分了两人原有的rp值,当你膜过一个人之后,你就 阅读全文
posted @ 2019-01-18 22:02 茄子Min 阅读(747) 评论(0) 推荐(0)