Niu Ke

Question 100B of Niu Ke Practice Competition;

Hits: 0 Login—Professional IT Written Test Interview Preparation Platform_Nioke.com [100 Problem Solving in Niu Ke Practice Competition] #include<bits/stdc++.h> using namespace std; using ll=long long; const int N=2e5+10; ll n,a[N],col[N]; ll dp[2][2]; int main() { ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); cin>>n; for (int i=1; i<=n; ++i) cin>>a[i]; for (int i=1; i<=n; ++i) { char x; cin>>x; col[i]=(x=='R'?1:0); } for ( …

Question 100B of Niu Ke Practice Competition; Read More »