Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using namespace std;
using P = pair<int, int>; 
using ll = long long;

int main()
{
  int s;
  cin >> s;
  if(s[0] == s[1] && s[1] == s[2] && s[0] == s[2] || s[1] == s[2] && s[2] == s[3] && s[1] == s[3]){
    cout << "Yes" << endl;
  }
  else cout << "No" << endl;
                                                                                               
                                                                                               
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: invalid types 'int[int]' for array subscript
   12 |   if(s[0] == s[1] && s[1] == s[2] && s[0] == s[2] || s[1] == s[2] && s[2] == s[3] && s[1] == s[3]){
      |       ^
a.cc:12:15: error: invalid types 'int[int]' for array subscript
   12 |   if(s[0] == s[1] && s[1] == s[2] && s[0] == s[2] || s[1] == s[2] && s[2] == s[3] && s[1] == s[3]){
      |               ^
a.cc:12:23: error: invalid types 'int[int]' for array subscript
   12 |   if(s[0] == s[1] && s[1] == s[2] && s[0] == s[2] || s[1] == s[2] && s[2] == s[3] && s[1] == s[3]){
      |                       ^
a.cc:12:31: error: invalid types 'int[int]' for array subscript
   12 |   if(s[0] == s[1] && s[1] == s[2] && s[0] == s[2] || s[1] == s[2] && s[2] == s[3] && s[1] == s[3]){
      |                               ^
a.cc:12:39: error: invalid types 'int[int]' for array subscript
   12 |   if(s[0] == s[1] && s[1] == s[2] && s[0] == s[2] || s[1] == s[2] && s[2] == s[3] && s[1] == s[3]){
      |                                       ^
a.cc:12:47: error: invalid types 'int[int]' for array subscript
   12 |   if(s[0] == s[1] && s[1] == s[2] && s[0] == s[2] || s[1] == s[2] && s[2] == s[3] && s[1] == s[3]){
      |                                               ^
a.cc:12:55: error: invalid types 'int[int]' for array subscript
   12 |   if(s[0] == s[1] && s[1] == s[2] && s[0] == s[2] || s[1] == s[2] && s[2] == s[3] && s[1] == s[3]){
      |                                                       ^
a.cc:12:63: error: invalid types 'int[int]' for array subscript
   12 |   if(s[0] == s[1] && s[1] == s[2] && s[0] == s[2] || s[1] == s[2] && s[2] == s[3] && s[1] == s[3]){
      |                                                               ^
a.cc:12:71: error: invalid types 'int[int]' for array subscript
   12 |   if(s[0] == s[1] && s[1] == s[2] && s[0] == s[2] || s[1] == s[2] && s[2] == s[3] && s[1] == s[3]){
      |                                                                       ^
a.cc:12:79: error: invalid types 'int[int]' for array subscript
   12 |   if(s[0] == s[1] && s[1] == s[2] && s[0] == s[2] || s[1] == s[2] && s[2] == s[3] && s[1] == s[3]){
      |                                                                               ^
a.cc:12:87: error: invalid types 'int[int]' for array subscript
   12 |   if(s[0] == s[1] && s[1] == s[2] && s[0] == s[2] || s[1] == s[2] && s[2] == s[3] && s[1] == s[3]){
      |                                                                                       ^
a.cc:12:95: error: invalid types 'int[int]' for array subscript
   12 |   if(s[0] == s[1] && s[1] == s[2] && s[0] == s[2] || s[1] == s[2] && s[2] == s[3] && s[1] == s[3]){
      |                                                                                               ^