摘要:
题目: 补半年前的题=_= 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxn=1e5+10; 4 5 map<int,int> mp; 6 int L[maxn],R[maxn],val[maxn]; 7 int c 阅读全文
posted @ 2017-08-25 21:41
yijiull
阅读(108)
评论(0)
推荐(0)
摘要:
Two strings HDU - 6170 题意:给两个串s和p,问是否能匹配。其中p里面有两个特殊字符,'.'可以匹配任意字符,'*'可以让前一个字符出现任意次。 dp~ 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 const in 阅读全文
posted @ 2017-08-25 15:48
yijiull
阅读(154)
评论(0)
推荐(0)
摘要:
Just do it HDU - 6129 题意:给出n个元素的数组a,让你异或m次得到新的数组b。 每一次得到的b[i]都是a[0]一直异或到a[i],然后把b赋值给a,循环m次得到b。 碰到异或的题,一定要考虑很重要的一个性质,a^b^b==a !! 就是说异或偶数次同一个数之后值不变! 对于这 阅读全文
posted @ 2017-08-25 13:58
yijiull
阅读(232)
评论(0)
推荐(1)
摘要:
843C - Upgrading Tree 题意:给一棵n个点的树,允许不超过2*n次操作。操作:(x,y,z),删除边(x,y),添加边(y,x),要求满足三个条件(见原题) 题解: 待补~ 先贴上dalao代码: 1 #include <bits/stdc++.h> 2 3 using name 阅读全文
posted @ 2017-08-25 11:08
yijiull
阅读(298)
评论(0)
推荐(0)
摘要:
843B - Interactive LowerBound 有点懵比~~ 没看懂题解说的随机数概率什么的=_= 先贴上dalao代码 1 #include <bits/stdc++.h> 2 3 using namespace std; 4 5 inline pair <int, int> ask( 阅读全文
posted @ 2017-08-25 10:44
yijiull
阅读(222)
评论(0)
推荐(0)
摘要:
843A - Sorting by Subsequences 还好之前了解过一点白书上的permutation! 我写的递归,其实很容易直接写成递推啊 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxn=1e5+10; 阅读全文
posted @ 2017-08-25 10:00
yijiull
阅读(243)
评论(0)
推荐(0)
摘要:
844B - Rectangles 最多有2^50*2个!! 我也用long long 了,可是移位的时候忘记了,导致溢出,然后一早起来发现被hack了=_=|| 1<<temp; 1LL<<temp; 1 #include <bits/stdc++.h> 2 using namespace std 阅读全文
posted @ 2017-08-25 09:45
yijiull
阅读(293)
评论(0)
推荐(0)

浙公网安备 33010602011771号