摘要: D. Minimax Problem time limit per test 5 seconds memory limit per test 512 megabytes input standard input output standard output You are given nn arra 阅读全文
posted @ 2020-02-01 22:09 cherish__lin 阅读(175) 评论(0) 推荐(0) 编辑
摘要: There are nn people at the round gaming table. Each of them has a set of cards. Every card contains some number xx. Players make turns consecutively, 阅读全文
posted @ 2019-12-05 20:54 cherish__lin 阅读(379) 评论(0) 推荐(0) 编辑
摘要: Ujan has a lot of useless stuff in his drawers, a considerable part of which are his math notebooks: it is time to sort them out. This time he found a 阅读全文
posted @ 2019-12-02 21:10 cherish__lin 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 题目描述 对于序列A,它的逆序对数定义为满足i<j,且Ai>Aj的数对(i,j)的个数。给1到n的一个排列,按照某种顺序依次删除m个元素,你的任务是在每次删除一个元素之前统计整个序列的逆序对数。 输入格式 输入第一行包含两个整数n和m,即初始元素的个数和删除的元素个数。以下n行每行包含一个1到n之间 阅读全文
posted @ 2019-11-30 20:25 cherish__lin 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 题目背景 这是一道模板题 可以使用bitset,CDQ分治,K-DTree等方式解决。 题目描述 有 nn 个元素,第 ii 个元素有 a_iai​、b_ibi​、c_ici​ 三个属性,设 f(i)f(i) 表示满足 a_j \leq a_iaj​≤ai​ 且 b_j \leq b_ibj​≤bi 阅读全文
posted @ 2019-11-30 16:52 cherish__lin 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 题目描述 聪聪和可可是兄弟俩,他们俩经常为了一些琐事打起来,例如家中只剩下最后一根冰棍而两人都想吃、两个人都想玩儿电脑(可是他们家只有一台电脑)……遇到这种问题,一般情况下石头剪刀布就好了,可是他们已经玩儿腻了这种低智商的游戏。 他们的爸爸快被他们的争吵烦死了,所以他发明了一个新游戏:由爸爸在纸上画 阅读全文
posted @ 2019-11-29 15:18 cherish__lin 阅读(142) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> #define ll long long using namespace std; int compare(string str1,string str2)//小于0代表小于,大于0代表大于,0代表相等 { if(str1.length()>str2 阅读全文
posted @ 2019-11-23 17:30 cherish__lin 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 1:圆的k次交面积(n个圆,area[i]代表被覆盖i次及以上的面积) #include<bits/stdc++.h> using namespace std; #define maxn 1010 typedef long long ll; const double eps=1e-8; const 阅读全文
posted @ 2019-10-31 16:48 cherish__lin 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Mrs. Panda’s birthday is coming. Mr. Panda wants to compose a song as gift for her birthday. It is known that Mrs. Panda does not like a song if and o 阅读全文
posted @ 2019-10-30 17:16 cherish__lin 阅读(425) 评论(0) 推荐(1) 编辑
摘要: 题目链接:https://vj.z180.cn/b4aacc08fc7aab6ce14e7baf13816c24?v=1571542994 题目要求n个灯(R,B),给出m组赋值方式,每一组中至少有两个是正确的,问是否能找到一组正确的赋值方式. 2-SAT模板运用强连通分量解决此类真值指派问题. 对 阅读全文
posted @ 2019-10-23 09:08 cherish__lin 阅读(381) 评论(0) 推荐(0) 编辑