Submission #19559794


Source Code Expand

Copy
#include<bits/stdc++.h>
using namespace std;
using ll = int64_t;
#define rep(i, n) for (int i = 0; i < (int)n; i++)

const ll M = 10000000000;
int main(){
   int N;cin>>N;
   string T;cin>>T;
   bool flag;
   ll ans = 0;
   rep(i, 3) {
      flag = true;
      ll a = (sz(T) + i + 2) / 3;
      ll add = M - a + 1;
      rep(j,N){
         char s = ((i+j)%3==2 ? '0' : '1');
         flag &= (T[j] == s);
      }
      if(flag){
         ans += add;
      }
   }
   cout<<ans<<endl;
}

Submission Info

Submission Time
Task B - Many 110
User Neccolini
Language C++ (GCC 9.2.1)
Score 0
Code Size 508 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:14:15: error: ‘sz’ was not declared in this scope
   14 |       ll a = (sz(T) + i + 2) / 3;
      |               ^~