上一页 1 2 3 4 5 6 7 8 ··· 15 下一页
摘要: 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 阅读(23) 评论(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 阅读(42) 评论(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 阅读(32) 评论(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 阅读(40) 评论(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 阅读(26) 评论(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 阅读(42) 评论(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 阅读(30) 评论(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 阅读(55) 评论(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 阅读(37) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 15 下一页