Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <queue>
#include <stack>
#include <string>

#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;

using namespace std;


int inputValue(){
    int a;
    cin >> a;
    return a;
};

void inputArray(int * p, int a){
    rep(i, a){
        cin >> p[i];
    }
};

void inputVector(vector<int> * p, int a){
    rep(i, a){
        int input;
        cin >> input;
        p -> push_back(input);
    }
}

template <typename T>
void output(T a, int precision) {
    if(precision > 0){
        cout << setprecision(precision)  << a << "\n";
    }
    else{
        cout << a << "\n";
    }
}

int main(int argc, const char * argv[]) {
    
  // source code
  string ss;
  cin >> ss;
  int vccount = 0;
  vector<string> vc;

  rep(i,ss.length())
  {
    vc.push_back(&ss[i]);
    if(vc.size() > 1 && (vc.at(vc.end() - 1) == ss[i]))
    {
      if(i == ss.Length() - 1)
      {
        cout << vc.size() - 1;
        return;
      }
      else
      {
        vc.at(vc.end()) = vc(vc.end()) + ss[i + 1];
        i++;
      }
    }
  }
  cout << vc.size();
  return;
  
  
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:60:31: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::at(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >)'
   60 |     if(vc.size() > 1 && (vc.at(vc.end() - 1) == ss[i]))
      |                          ~~~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; reference = std::__cxx11::basic_string<char>&; size_type = long unsigned int]'
 1180 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1180:20: note:   no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'std::vector<std::__cxx11::basic_string<char> >::size_type' {aka 'long unsigned int'}
 1180 |       at(size_type __n)
      |          ~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1199:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::at(size_type) const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; const_reference = const std::__cxx11::basic_string<char>&; size_type = long unsigned int]'
 1199 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1199:20: note:   no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'std::vector<std::__cxx11::basic_string<char> >::size_type' {aka 'long unsigned int'}
 1199 |       at(size_type __n) const
      |          ~~~~~~~~~~^~~
a.cc:62:18: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'Length'; did you mean 'length'?
   62 |       if(i == ss.Length() - 1)
      |                  ^~~~~~
      |                  length
a.cc:65:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   65 |         return;
      |         ^~~~~~
a.cc:69:14: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::at(std::vector<std::__cxx11::basic_string<char> >::iterator)'
   69 |         vc.at(vc.end()) = vc(vc.end()) + ss[i + 1];
      |         ~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; reference = std::__cxx11::basic_string<char>&; size_type = long unsigned int]'
 1180 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1180:20: note:   no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >::iterator' to 'std::vector<std::__cxx11::basic_string<char> >::size_type' {aka 'long unsigned int'}
 1180 |       at(size_type __n)
      |          ~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1199:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::at(size_type) const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; const_reference = const std::__cxx11::basic_string<char>&; size_type = long unsigned int]'
 1199 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1199:20: note:   no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >::iterator' to 'std::vector<std::__cxx11::basic_string<char> >::size_type' {aka 'long unsigned int'}
 1199 |       at(size_type __n) const
      |          ~~~~~~~~~~^~~
a.cc:69:29: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (std::vector<std::__cxx11::basic_string<char> >::iterator)'
   69 |         vc.at(vc.end()) = vc(vc.end()) + ss[i + 1];
      |                           ~~^~~~~~~~~~
a.cc:75:3: error: return-statement with no value, in function returning 'int' [-fpermissive]
   75 |   return;
      |   ^~~~~~