
2019牛客暑假多校训练营(第八场)
bootdubbo
这个作者很懒,什么都没留下…
展开
-
G-Gemstones
#include<bits/stdc++.h> using namespace std; stack<int>sta; int main(){ string str; cin>>str; int ans=0; for(int i=0;i<str.length();i++){ if(sta.size()>=2){ char t1=sta...原创 2019-08-10 17:30:34 · 160 阅读 · 0 评论 -
B-Beauty Values
题意:给定n个正整数,a1,a2…an,求所有区间里面不同数的个数之后 输入 4 1 2 1 3 输出 18 The beauty values of subintervals【1,1】【2,2】【3,3】【4,4】are all 1 The beauty values of subintervals【1,2】【1,3】【2,3】【3,4】are all 2 The beauty values o...原创 2019-08-10 17:47:44 · 385 阅读 · 1 评论 -
C-CDMA
构造题 #include<bits/stdc++.h> using namespace std; #define maxn 1100 int mp[maxn][maxn]; void solve(int x){ for(int i=x/2+1;i<=x;i++){ for(int j=1;j<=x/2;j++) mp[i][j]=mp[i-x/2][j]; } f...原创 2019-08-10 17:59:31 · 167 阅读 · 0 评论 -
A-All-one Matrices【单调栈裸题】
比赛没做出来,有点遗憾 具体看代码吧 #include<bits/stdc++.h> using namespace std; #define maxn 3010 #define INF 0x3f3f3f3f typedef long long ll; int mp[maxn][maxn],h[maxn][maxn],mx[maxn][maxn],l[maxn],r[maxn]; in...原创 2019-08-10 21:26:03 · 178 阅读 · 0 评论