#include<iostream> #include<algorithm> #include<cstring> #include<vector> using namespace std; const int INF=0x3f3f3f3f; struct node{ int l,s,h; }; ve ...
分类:
其他好文 时间:
2020-01-28 15:50:15
阅读次数:
83
RLE编码,还不会,先搬运一下大佬的代码,理解之后再用Java自己实现 1 #include <map> 2 #include <vector> 3 #include <cstdlib> 4 #include <iostream> 5 using namespace std; 6 static in ...
分类:
编程语言 时间:
2020-01-28 15:48:37
阅读次数:
80
题解 利用前缀和维护钻石的价值,然后枚举左端点,二分查找右端点。 代码 #include<bits/stdc++.h> using namespace std; int n,m,pre_sum[100005]; vector<int> ans; void check(int i,int &j,int ...
分类:
其他好文 时间:
2020-01-28 15:33:52
阅读次数:
65
"题目链接" problem 给出一个多项式f,求一个多项式g使得$f(x) g(x) \equiv 1 (mod \ x ^ n)$ solution 利用倍增。假设现在我们已经求出了$f(x)$在$mod \ x ^ n$的逆元$g(x)$,考虑如何求出在$mod\ x ^{2n}$下的逆元$g ...
分类:
其他好文 时间:
2020-01-28 13:55:55
阅读次数:
57
#include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; const int maxn = 100010; struct node{ //bool lea ...
分类:
其他好文 时间:
2020-01-27 23:31:00
阅读次数:
89
Q:在一个二维数组中(每个一维数组的长度相同),每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序。请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。 C:时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32M,其他语言64M A: T: ...
分类:
编程语言 时间:
2020-01-27 22:09:20
阅读次数:
80
反转 方法一:使用vector自带的反转迭代器reverse_iterator,rbegin(),rend() vector<int>::reverse_iterator riter; for (riter=arrayInt.rbegin();riter!=arrayInt.rend();riter ...
分类:
其他好文 时间:
2020-01-27 22:05:37
阅读次数:
66
#include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <queue> using namespace std; const int maxn = 100010; vector<int> child[maxn] ...
分类:
其他好文 时间:
2020-01-27 22:04:05
阅读次数:
73
圆桌问题 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 6252 Accepted Submission(s): 2380 Problem De ...
分类:
其他好文 时间:
2020-01-27 21:54:12
阅读次数:
82
应该也可以用线段树/树状数组区间更新怪兽的生命值来做 1 #define HAVE_STRUCT_TIMESPEC 2 #include<bits/stdc++.h> 3 using namespace std; 4 long long pre[200007]; 5 int main(){ 6 io ...
分类:
其他好文 时间:
2020-01-27 17:31:04
阅读次数:
62