03 2022 档案

摘要:最坑的是输入除了'Q','R'还有其他字母; 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int N=1e6+5; 5 int color[N],blg[N],cnt[N],ans[ 阅读全文
posted @ 2022-03-29 22:59 matt-11 阅读(24) 评论(0) 推荐(0) 编辑
摘要:1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int N=2e5+5; 5 int n,m,p,l=1,r=0,tot=0; 6 ll blg[N],suff[N],bin[N],f[ 阅读全文
posted @ 2022-03-27 22:27 matt-11 阅读(25) 评论(0) 推荐(0) 编辑
摘要:1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int N=5e4+5; 5 ll a[N],blg[N],cnt[N]; 6 string ans[N]; 7 inline ll gc 阅读全文
posted @ 2022-03-27 17:38 matt-11 阅读(27) 评论(0) 推荐(0) 编辑
摘要:long long ! long long ! long long! 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=3e6+5; 4 int inv[N]; 5 int main() 6 { 7 int n,p; 8 c 阅读全文
posted @ 2022-03-20 22:12 matt-11 阅读(33) 评论(0) 推荐(0) 编辑
摘要://1007为质数,运用二项式展开,且对于1-1006与1007互质,用费马小定理可以求组合数的分母mod1007,也就是求逆元 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int mod=1e4+7; 4 int a,b,k,n 阅读全文
posted @ 2022-03-17 22:29 matt-11 阅读(91) 评论(0) 推荐(0) 编辑
摘要:1 class Solution { 2 public: 3 bool isBipartite(vector<vector<int>>& graph) { 4 int n=graph.size(); 5 vector<int>G[n],f(n,0); 6 for(int i=0;i<n;i++) 7 阅读全文
posted @ 2022-03-15 21:54 matt-11 阅读(17) 评论(0) 推荐(0) 编辑
摘要:// 约旦消元相比朴素高斯消元,代码量少,而且都能判无解,无穷解,唯一解;无穷解是代码中判,结束后如果a[i][i]==0&&a[i][n+]!=0无解,否则唯一解 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 int main() 5 { 阅读全文
posted @ 2022-03-11 23:26 matt-11 阅读(39) 评论(0) 推荐(0) 编辑
摘要:1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 using namespace std; 5 const int mod=10000; 6 int n; 7 struct matrix 8 { 9 int data[2][2 阅读全文
posted @ 2022-03-10 21:09 matt-11 阅读(28) 评论(0) 推荐(0) 编辑
摘要:1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int N=1e5+5; 5 vector<ll>v[N]; 6 ll a[N],tag[N],blg[N],L[N],R[N],bloc 阅读全文
posted @ 2022-03-08 20:23 matt-11 阅读(28) 评论(0) 推荐(0) 编辑
摘要:1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int N=5e4+5; 5 vector<ll>v[50005]; 6 ll a[N],tag[N],blg[N],L[N],R[N], 阅读全文
posted @ 2022-03-08 07:57 matt-11 阅读(22) 评论(0) 推荐(0) 编辑
摘要:1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int N=5e4+5; 5 int blg[N],L[N],R[N],tag[N],sum[N],a[N],block,tot; 6 v 阅读全文
posted @ 2022-03-06 22:39 matt-11 阅读(39) 评论(0) 推荐(0) 编辑
摘要://POJ这题用map会TLE,自己造hash,而且要求最小的x;暴力枚举; 1 #include<iostream> 2 #include<cstdio> 3 #include<cmath> 4 #include<algorithm> 5 #include<map> 6 #include<vect 阅读全文
posted @ 2022-03-06 19:59 matt-11 阅读(26) 评论(0) 推荐(0) 编辑
摘要:The Luckiest number Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10897 Accepted: 2769 Description Chinese people think of '8' as the luc 阅读全文
posted @ 2022-03-05 19:15 matt-11 阅读(48) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2022-03-02 22:00 matt-11 阅读(0) 评论(0) 推荐(0) 编辑
摘要:1 class Solution { 2 public: 3 const double eps=1e-6; 4 int isok(vector<int>& cards) 5 { 6 vector<double>dp[4][4]; 7 for(int i=0;i<4;i++)dp[i][i].push 阅读全文
posted @ 2022-03-01 22:32 matt-11 阅读(30) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示