
模拟&&思维
文章平均质量分 52
淼润淽涵
这个作者很懒,什么都没留下…
展开
-
洛谷--------P1003 铺地毯
题目描述为了准备一个独特的颁奖典礼,组织者在会场的一片矩形区域(可看做是平面直角坐标系的第一象限)铺上一些矩形地毯。一共有 n 张地毯,编号从 1 到n。现在将这些地毯按照编号从小到大的顺序平行于坐标轴先后铺设,后铺的地毯覆盖在前面已经铺好的地毯之上。地毯铺设完成后,组织者想知道覆盖地面某个点的最上面的那张地毯的编号。注意:在矩形地毯边界和四个顶点上的点也算被地毯覆盖。输入格...原创 2019-05-25 11:59:41 · 158 阅读 · 0 评论 -
CF-226D The table (思维)
Problem DescriptionHarry Potter has a difficult homework. Given a rectangular table, consisting of n × m cells. Each cell of the table contains the integer. Harry knows how to use two spells: the f...转载 2019-08-22 15:58:27 · 212 阅读 · 0 评论 -
CodeForces 246C . Beauty Pageant (思维)
题意:n个数a[1~n],每天可以选任意个数(每个数一天只能选一次),选k天,使得每天的和不同。分析:因为k<=n*(n+1)/2且a[i]会不相同,我们先对a排序,长度为1:a[1]a[2]……a[n]数目:n长度为2:a[n]+a[1]a[n]+a[2]……a[n]+a[n-1]数目:n-1长度为3a[n]+a[n-1]+a[1]a[n]+a[n-1]+a[2]……a[n]+a[n-1]+a[n-2]数目为n-2以此类推转载 2019-08-22 10:28:02 · 233 阅读 · 0 评论 -
洛谷--------P1205 [USACO1.2]方块转换 Transformations
题目描述一块N x N(1<=N<=10)正方形的黑白瓦片的图案要被转换成新的正方形图案。写一个程序来找出将原始图案按照以下列转换方法转换成新图案的最小方式:1:转90度:图案按顺时针转90度。2:转180度:图案按顺时针转180度。3:转270度:图案按顺时针转270度。4:反射:图案在水平方向翻转(以中央铅垂线为中心形成原图案的镜像)。5:组合:图案在水平...转载 2019-05-21 20:19:18 · 382 阅读 · 0 评论 -
洛谷-------P1201 [USACO1.1]贪婪的送礼者Greedy Gift Givers
Problem Description对于一群(NP个)要互送礼物的朋友,GY要确定每个人送出的钱比收到的多多少。在这一个问题中,每个人都准备了一些钱来送礼物,而这些钱将会被平均分给那些将收到他的礼物的人。然而,在任何一群朋友中,有些人将送出较多的礼物(可能是因为有较多的朋友),有些人有准备了较多的钱。给出一群朋友,没有人的名字会长于 14 字符,给出每个人将花在送礼上的钱,和将收到他的礼物...原创 2019-05-16 22:59:16 · 176 阅读 · 0 评论 -
洛谷-------P1202 [USACO1.1]黑色星期五Friday the Thirteenth
Problem Description13号又是一个星期五。13号在星期五比在其他日子少吗?为了回答这个问题,写一个程序,要求计算每个月的十三号落在周一到周日的次数。给出N年的一个周期,要求计算1900年1月1日至1900+N-1年12月31日中十三号落在周一到周日的次数,N为正整数且不大于400.这里有一些你要知道的:1、1900年1月1日是星期一.2、4,6,11和9月有30...原创 2019-05-16 22:49:11 · 547 阅读 · 0 评论 -
Codeforces 955B - Not simply beatiful strings(模拟)
Problem DescriptionLet's call a string adorable if its letters can be realigned in such a way that they form two consequent groups of equal symbols (note that different groups must contain differen...原创 2019-05-13 17:10:52 · 332 阅读 · 0 评论 -
CodeForces 955A - Feed the cat(模拟)
Problem DescriptionAfter waking up at hh:mm, Andrew realised that he had forgotten to feed his only cat for yet another time (guess why there's only one cat). The cat's current hunger level is H po...原创 2019-05-11 18:33:24 · 356 阅读 · 0 评论 -
Codeforces 957A - Tritonic Iridescence(模拟)
Problem DescriptionOverlooking the captivating blend of myriads of vernal hues, Arkady the painter lays out a long, long canvas.Arkady has a sufficiently large amount of paint of three colours: c...原创 2019-05-08 00:10:02 · 240 阅读 · 0 评论 -
CodeForces 959-A Mahmoud and Ehab and the even-odd game(模拟+找规律)
Problem DescriptionMahmoud and Ehab play a game called the even-odd game. Ehab chooses his favorite integer n and then they take turns, starting from Mahmoud. In each player's turn, he has to choos...原创 2019-05-07 22:46:20 · 297 阅读 · 0 评论 -
CodeForces 961-A Tetris(模拟)
Problem DescriptionYou are given a following process.There is a platform with n columns. 1×1 squares are appearing one after another in some columns on this platform. If there are no squares in t...原创 2019-05-04 09:52:59 · 236 阅读 · 0 评论 -
CF3A Shortest path of the king
题意翻译国王独自一人在棋盘上。尽管他很孤独,但他并不会灰心,因为他有国家大事要做。例如,他必须对广场T进行正式访问。因为国王没有浪费时间的习惯,所以他想从目前的位置上尽量走最少的步数。请你帮他做这件事。在一次移动中,国王可以到达有一个共同的边或一个共同的顶点的正方形上,(他通常可以移动到8个不同的方格上)。输入格式第一行包含方形s的棋盘坐标,第二行包含平方t。棋盘坐...原创 2019-06-07 18:52:52 · 377 阅读 · 1 评论