【螺旋矩阵】三部曲:1、[ 找到 m、n ] 2、[ 开二维数组填充矩阵 ] 3、[ 输出矩阵 ] 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 bool cmp(int a, int b) { return a > b; } 5 6 in ...
分类:
其他好文 时间:
2020-07-28 22:39:21
阅读次数:
70
题面 #include <bits/stdc++.h> using namespace std; template<typename temp> void read(temp &x){ x = 0; temp f = 1; char ch; while(!isdigit(ch = getchar() ...
分类:
其他好文 时间:
2020-07-28 22:35:46
阅读次数:
61
#include<bits/stdc++.h> using namespace std; const int N=450; struct data { int to,stb,vol; } a[N]; int head[2*N],root,tot,v[N],f[N][101],n,p,o[N]; in ...
分类:
移动开发 时间:
2020-07-28 16:55:50
阅读次数:
98
WA代码如下: 1 #include<bits/stdc++.h> 2 using namespace std; 3 map<string, string> mmp; 4 map<string, int> has; 5 int main() 6 { 7 int n, m; cin >> n >> m ...
分类:
其他好文 时间:
2020-07-28 14:31:36
阅读次数:
56
AcWing 788. 逆序对的数量 #include <bits/stdc++.h> using namespace std; typedef long long LL; const int N=1e6+10; int q[N],tmp[N]; LL merge_sort(int l,int r) ...
AcWing 790. 数的三次方根 #include <bits/stdc++.h> using namespace std; int main(){ double n,mid; scanf("%lf",&n); double l=-1e6-10,r=1e6+10; while(r-l>1e-8) ...
AcWing 791. 高精度加法 #include <bits/stdc++.h> using namespace std; vector<int> add(vector<int> &A,vector<int> &B){ vector<int> C; int t=0; for(int i=0;i< ...
AcWing 792. 高精度减法 #include <bits/stdc++.h> using namespace std; bool cmp(vector<int> &A,vector<int> &B){ if(A.size()!=B.size()) return A.size()>B.size ...
AcWing 794. 高精度除法 #include <bits/stdc++.h> using namespace std; vector<int> div(vector<int> &A,int b,int &r){ vector<int> C; for(int i=A.size()-1;i>=0 ...
AcWing 795. 前缀和 #include <bits/stdc++.h> using namespace std; const int N=1e6+10; int a[N],S[N]; int main(){ int n,m; scanf("%d%d",&n,&m); for(int i=1 ...