强联通分量及缩点 #include<bits/stdc++.h> #define re register #define v e[i].to using namespace std; const int lzw=1e4+3; int n,m,head[lzw],tot,h[lzw],cnt,dfn[ ...
分类:
其他好文 时间:
2020-11-06 01:55:25
阅读次数:
17
链接 : http://codeforces.com/problemset/problem/1443/C 标签 : binary search greedy sorting *1400 二分答案 AC代码 #include <bits/stdc++.h> using namespace std; # ...
分类:
其他好文 时间:
2020-11-06 01:18:03
阅读次数:
19
###题目 717. 1-bit and 2-bit Characters ###解题方法 将指针设置在第0个位置,当数组长度>1时,如果当前位置是1,就把前两个数pop掉,否则是0的话就把前1个数pop掉,遍历结束看看bits还有没有元素,有的话return True,没有就return Fals ...
分类:
其他好文 时间:
2020-11-04 19:23:49
阅读次数:
36
最短路 SPFA #include <bits/stdc++.h> using namespace std; #define N 10001 #define M 500001 struct node{ int to,w,next; }edge[M]; int cut=0; int head[N]; ...
分类:
编程语言 时间:
2020-11-04 18:47:58
阅读次数:
18
1 #include <bits/stdc++.h> 2 using namespace std; 3 const int mac=4e5+50; 4 int head[mac],vis[mac],dis[mac]; 5 int n,m,num,i,j,t; 6 struct edge{ 7 int ...
分类:
其他好文 时间:
2020-11-04 17:45:08
阅读次数:
15
b题:b其实不难题意就是不让k个连续字符成为一个周期。这提给我的教训就是中文翻译应该结合英文题目一起看, #include<bits/stdc++.h>#include<algorithm>#define ll long longusing namespace std;const ll nl=1e5 ...
分类:
其他好文 时间:
2020-11-02 10:12:11
阅读次数:
22
#include <bits/stdc++.h> using namespace std; const int mn=1e6+7; const int mod=1e9+7; int v[mn],p[mn],s[mn]; int main() { int n,tot=0; cin>>n; for(in ...
分类:
其他好文 时间:
2020-11-02 10:09:59
阅读次数:
47
#include <bits/stdc++.h> #include "opencv2/core.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/video.hpp" #include "opencv2/objdetect.hpp" #inc ...
分类:
其他好文 时间:
2020-11-02 10:01:48
阅读次数:
21
好题: #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 5e6 + 5; const LL Mod = 1e9 + 7; #define INF 1e9 #define dbg(x) c ...
分类:
其他好文 时间:
2020-11-01 22:04:43
阅读次数:
23
#include <stdio.h> #include <math.h> int reverse(int data) { //请在此填写代码,实现将参数data的值反转,并返回的功能 /* begin */ int ans=0,cnt=0,a[1000],flag=0; if(data<0){ fl ...
分类:
其他好文 时间:
2020-11-01 10:14:19
阅读次数:
13