首页 > TAG信息列表 > CF1699C

[CF1699C]The Third Problem

做题时间:2022.7.12 \(【题目描述】\) 给定一个长度为 \(N(N\leq 10^5)\) 的排列 \(a_i\) ,其中的数包括 \([0,n-1]\) ,求出有多少个排列 \(b_i\) 满足对于 \(\forall l,r,1\leq l\leq r\leq N\) ,满足: \[\operatorname{MEX}([a_l,a_{l+1},\ldots,a_r])=\operatorname{MEX}([b_l,b_{l+

CF1699C The Third Problem

思路: 找规律。 实现: 1 #include<bits/stdc++.h> 2 using namespace std; 3 int a[100005]; 4 int main(){ 5 //freopen("in.txt","r",stdin); 6 int t;cin>>t; 7 while(t--){ 8 int n;cin>>n; 9 vecto