Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<bits/stdc++.h>
#include<cmath>
using namespace etsd;

int main(){
  int N;
  cin>>N;
  char S[N];
  for(int i=0; i<N; ++i) cin>>S[i];
  vector<int> A;
  if(S[0]=='.') A.push_back(0);
  int count=0;
  for(int i=N-1; i>=0; --i){
    count++;
    if(S[i]!=S[i+1]) A.push_back(count);
    count=0;
  }
  
  int mn=100000000;
  for(int i=0; i<(A.size()+1)/2; ++i){
    int count=0;
    for(int j=0; j<2*i; ++j){
      if(j%2==0) count += A[j]; 
    }
    for(int j=2*i; j<A.size(); ++j){
      if(j%2==1) count += A[j];
    }
    mn=min(mn,count);
    count=0;
  }
  
  cout<<mn<<endl;
}

Compiler output:
a.cc:7:17: error: 'etsd' is not a namespace-name
    7 | using namespace etsd;
      |                 ^~~~
a.cc: In function 'int main()':
a.cc:11:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   11 |   cin>>N;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:14:3: error: 'vector' was not declared in this scope
   14 |   vector<int> A;
      |   ^~~~~~
a.cc:14:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:14:10: error: expected primary-expression before 'int'
   14 |   vector<int> A;
      |          ^~~
a.cc:15:17: error: 'A' was not declared in this scope
   15 |   if(S[0]=='.') A.push_back(0);
      |                 ^
a.cc:19:22: error: 'A' was not declared in this scope
   19 |     if(S[i]!=S[i+1]) A.push_back(count);
      |                      ^
a.cc:24:19: error: 'A' was not declared in this scope
   24 |   for(int i=0; i<(A.size()+1)/2; ++i){
      |                   ^
a.cc:32:8: error: 'min' was not declared in this scope; did you mean 'std::min'?
   32 |     mn=min(mn,count);
      |        ^~~
      |        std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:36:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   36 |   cout<<mn<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:36:13: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   36 |   cout<<mn<<endl;
      |             ^~~~
      |             std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~