D - Road Improvemen 思路:0没有逆元!!!! 不能直接除,要求前缀积和后缀积!!! ...
分类:
其他好文 时间:
2018-09-13 22:32:45
阅读次数:
243
cf 1 #include<iostream> 2 #include<cstdio> 3 #include<algorithm> 4 #include<vector> 5 #include<cstring> 6 #include<map> 7 #include<set> 8 #include<cma ...
分类:
其他好文 时间:
2018-09-13 20:53:55
阅读次数:
162
这题太能卡人了,都是输入输出卡的。 1.输入的5X5矩阵中,有时一行最后有多个空格和回车 2.输出格式中,每两个输出结果之间间隔一个空行,但是最后一个结果之后没有空行。 3.有时到第四位元素,直接不按空格,直接换行了。 其实思路很简单,先判断是否运动越界,如果是的话就输出无答案,如果没越界,就依次将 ...
分类:
其他好文 时间:
2018-09-13 17:31:34
阅读次数:
222
就是短 感谢Cptraser dalao的博客 留坑以后写pair的玄学用法 ...
分类:
其他好文 时间:
2018-09-11 19:35:42
阅读次数:
245
注意题目保证不会有一个矩形完全包括另一个矩形的情况 时间序上从后往前看,一个坐标$(x,y)$加进来之前,如果已经有$x_i define X first define Y second using namespace std; typedef long long LL; pair vz[50005 ...
分类:
其他好文 时间:
2018-09-11 01:11:26
阅读次数:
273
题目链接 题意 : 中文题、点链接 分析 : 对于给定的 X 和 Y 假设存在一个 Z 使得 X (xor) Z = Y 做一个变形 X (xor) Z (xor) Y = 0 X (xor) Y = Z 也就是原集合中 是否存在一个异或组合结果为 X (xor) Y 线性基模板一套、AC #inc ...
分类:
其他好文 时间:
2018-09-10 21:55:11
阅读次数:
224
#include<bits/stdc++.h> #define int long long using namespace std; const int maxn=1e6+10; const int mod=1e9+7; int dp[maxn][3]; int quick(int a,int n) ...
分类:
其他好文 时间:
2018-09-10 19:08:05
阅读次数:
234
Description Every cow's dream is to become the most popular cow in the herd. In a herd of N (1 <= N <= 10,000) cows, you are given up to M (1 <= M <= ...
分类:
其他好文 时间:
2018-09-09 18:16:17
阅读次数:
216
关联容器,也就是 ,一个非常神器的数据结构。 是啥鬼? 是利用红黑树实现的。 当你在写程序的时候,可能需要存储一些信息,例如存储学生姓名对应的分数,例如: ,`Bob 100 Alan 100`。 但是由于数组下标只能为非负整数,所以无法用姓名来存储,这个时候最简单的办法就是使用 STL 的 了! ...
分类:
其他好文 时间:
2018-09-09 12:03:55
阅读次数:
150
template <class T1, class T2> struct std::pair { typedef T1 first_type; typedef T2 second_type; T1 first; T2 second; pair() :first(T1()), second(T2()) ...
分类:
编程语言 时间:
2018-09-07 22:48:22
阅读次数:
324