摘要:
#I love max and multiply ##problem6971 ##题意 Mr.I has two sequence Ai and Bi of length n,(0≤i≤n−1). Define an array C of length n, where Ck=max, satisf 阅读全文
摘要:
题意: 告诉你n个点,求这些点的凸包边长,或者在凸包边上点的数量。 #include <bits/stdc++.h> using namespace std; #define ll long long //#define int ll const int maxn = 1e5 + 10; const 阅读全文
摘要:
K - K-th Number POJ - 2104 You are working for Macrohard company in data structures department. After failing your previous task about key insertion y 阅读全文
摘要:
D. Fragmentation merging D. Fragmentation merging 题意:告诉你一段全排列的数组,你可以任意从中获取两端区间的数分别是两个集合A,B,当然前提是这两段数的交集为空集,当一开始的整个数组的长度大于1的时候A与B可以为空集。令C = A U B,C的最大值 阅读全文
摘要:
E.Don’t Really Like How The Story Ends E.Don’t Really Like How The Story Ends 题意:给你一个无向图,然你进行dfs,同时你可以进行加边操作,使得最后dfs序是1~n。 解题思路:dfs,我们在进行dfs时遍历该节点的子节点 阅读全文
摘要:
E. Even Degree Problem - E - Codeforces 找出欧拉图的欧拉回路,并将路径都存入数组中,计第一位l=1最后一位r=top(top为改欧拉图的边数) 找欧拉回路的操作: 从任意一点开始dfs,dfs的途中删除已经遍历过的边减小搜索规模,具体操作每次便利前向星的时候不 阅读全文
摘要:
Problem - A - Codeforces And RMQ 吉司机线段树 假设对于要让区间[l,r]对于x做与操作 对于区间[l,r]维护他们的区间或(用qh表示) 分三种情况讨论1.当qh|x=qh时,显然这一次修改不会造成影响,直接退出2.当qh|x!=qh 是递归左右子树,直到l=r # 阅读全文