![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
思维
weixin_44705665
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #593 (Div. 2) C. Labs
题目链接 题意:n^2个数,n行n列,每行每个数字比另一行数字大的个数总和的最小值最大。 例如: 在第一次测试中我们可以分开9实验室分组{2,8,5},{9,3,4},{7,6,1}. 从第一组到第二组我们可以传送4水单位(8→3,8→4,5→3,5→4). 从第一组到第三组,我们可以运输。5水单位(2→1,8→7,8→6,8→1,5→1). 从第二组到第一组我们可以传送5水单位(9→...原创 2019-10-24 23:26:18 · 140 阅读 · 0 评论 -
Codeforces Round #590 (Div. 3) C. Pipes
题目链接 Types of pipes Examples of connected pipes Let's describe the problem using some example: The first example input And its solution is below: 题意: 从左上角入,从右下角出,每一个图形可以无数次旋转90度。 思路: ...原创 2019-10-14 23:24:11 · 83 阅读 · 0 评论 -
CodeForces - 659D 思维题
小明从小就喜欢骑自行车,自行车环湖骑行大赛马上开始了,小明当然也参加了。为了能取得更好地成绩,小明想知道在哪些地方需要格外的注意,以防掉湖。 现在已知该湖为n边形且形状均由直线和直角组成(可以参照样例解释),小明从起始点沿着环湖路线顺时针骑到终点,求小明可能由于忘记拐弯而导致掉湖的次数。 Input 第一行一个整数n(4<=n<=1000) 下面n+1行每行包含两个数,为每个直角...原创 2019-09-02 21:45:37 · 202 阅读 · 0 评论 -
2019ICPC上海网络赛 B. Light bulbs 思维+差分思想
题目链接 题目大意:有n个灯,m次操作,每次修改[l,r]内的灯,(off - on ,on - off),问最后有几盏灯亮着. 题目思路: 因为外层有个T,并且n太大,并且卡内存!!! 我们只能对m下手,注意到: 把每一个端点存起来之后(并且排序),毎两个点之间的区间的 亮与否至于左边有关,不包括右边. 当时r没有加一,崩溃了。 我们把端点 排好序之后,就直接跑一遍m 如果当前...原创 2019-09-16 09:48:59 · 112 阅读 · 0 评论 -
zzulioj 2494: 考试排座位
题目描述 每到考试时,为了保证每位同学和其周围的同学都不认识,小明想出了如下策略: 假设某个考场有 N 个学校的考生,第 i 所学校有 t名考生参加考试。令每校考生排成一列纵队,第 i+1 队的考生排在第 i 队考生之后。 从第 1 所学校开始,各校的第 1 位考生顺次入座,然后是各校的第 2 位考生…… 以此类推。如果最后只剩下 1 所学校还没有分配座位,则需要安排他们的考生隔位就坐。 但是小...原创 2019-09-21 08:27:27 · 195 阅读 · 0 评论 -
codeforces1221B Knights (思维)
题目链接 You are given a chess board withnnrows andnncolumns. Initially all cells of the board are empty, and you have to put a white or a black knight into each cell of the board. A knight is a che...原创 2019-09-21 09:15:09 · 186 阅读 · 0 评论 -
Codeforces Round #588 (Div. 2) C. Anadi and Domino (思维+暴力)
题目链接 Anadi has a set of dominoes. Every domino has two parts, and each part contains some dots. For everyaaandbbsuch that1≤a≤b≤61≤a≤b≤6, there is exactly one domino withaadots on one half and...原创 2019-09-25 09:12:45 · 181 阅读 · 0 评论 -
Codeforces Round #588 (Div. 2) D. Marcin and Training Camp
题目链接 Marcin is a coach in his university. There arennstudents who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other...原创 2019-09-26 21:33:38 · 123 阅读 · 0 评论