上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 63 下一页
摘要: #include<bits/stdc++.h> using namespace std; int shu[100005]; int ans[100005]; int main() { int total; cin>>total; while(total--) { int n; bool flag=t 阅读全文
posted @ 2019-12-01 03:00 晴屿 阅读(144) 评论(0) 推荐(0)
摘要: //只要从所有区间右端点的最小值覆盖到所有区间左端点的最大值即可 #include<iostream> using namespace std ; int x,y; int n; int t; int main() { cin>>t; while(t--) { cin>>n; if(n==1) { 阅读全文
posted @ 2019-12-01 01:48 晴屿 阅读(130) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std ; const int N=3030; int n; int a[N]; int b[N]; int f[N][N]; //f[i][j] //表示所有由第一个序列的前i个字母,和第二个序列的前j个字母构成的, //且以b 阅读全文
posted @ 2019-11-30 03:56 晴屿 阅读(145) 评论(0) 推荐(0)
摘要: //dp+dfs+贪心 //记一个全局变量 #include<iostream> using namespace std ; const int N=55; int n; int ans; int q[N]; int up[N],down[N];//表示上升子序列结尾和下降子序列结尾 void df 阅读全文
posted @ 2019-11-30 01:59 晴屿 阅读(170) 评论(0) 推荐(0)
摘要: //贪心加dp #include<iostream> using namespace std ; const int N=1010; int n; int q[N]; int f[N]; int g[N];//存每个序列末尾的数字 int main() { while(cin>>q[n]) n++; 阅读全文
posted @ 2019-11-30 01:42 晴屿 阅读(173) 评论(0) 推荐(0)
摘要: #include <iostream> #include<algorithm> #include<queue> #include<vector> #include <cstdio> using namespace std; typedef long long ll; const int maxn=1 阅读全文
posted @ 2019-11-28 17:02 晴屿 阅读(119) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5+10; int a[N]; int n; bool prime(int x) {//判断是否为质数 for(int i = 2; 阅读全文
posted @ 2019-11-28 00:15 晴屿 阅读(194) 评论(0) 推荐(0)
摘要: //为了连贯,采取一条路形式,从第一行开始 也就是s型 #include <bits/stdc++.h> using namespace std; const int MAXN = 106; char str[MAXN][MAXN]; vector<char> ch;//存放鸡的名字 void in 阅读全文
posted @ 2019-11-27 22:38 晴屿 阅读(232) 评论(0) 推荐(0)
摘要: #include<iostream> #include<algorithm> using namespace std ; typedef pair<int,int>PII; const int N=5050; PII a[N]; int f[N]; int main() { int n; cin>> 阅读全文
posted @ 2019-11-27 21:18 晴屿 阅读(150) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std ; const int N=1010; int f[N]; int a[N]; int main() { int n; cin>>n; int res=0; for(int i=1; i<=n; i++) cin>>a[i 阅读全文
posted @ 2019-11-27 21:18 晴屿 阅读(85) 评论(0) 推荐(0)
上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 63 下一页