Language: C++

#include <bits/stdc++.h>
using namespace std;

int placeChild(int now, int numberR, int numberL, bector<int> &kids){
    int Lstart = now - numberL;
    int Rstart = Lstart - numberR;

    int kidsOnL = R / 2 + (L + 1) / 2;
    int kidsOnR = numberR + numberL - kidsOnL;

    kids[Lstart - 1] = kidsOnR;
    kids[Lstart] = kidsOnL;
}

int main(){
    string s;
    cin >> s;
    int size = (int)s.size()
    vector<char> cs(size);
    vector<int> children(size, 0);
    for (int tsumugi = 0; tsumugi < size; tsumugi++){
        cs[tsumugi] = s[tsumugi];
    }
    
    //csは文字列の配列
    //childrenは最終的な子供の配置とする
    //childrenに答えを代入していく

    int R_renzoku = 0;
    int L_renzoku = 0;
    int L_start;
    bool flag =false;  //R連続からL連続になったときtrueとする
    
    for (int matsuri = 0; matsuri < size; matsuri++){
        if (cs[matsuri] == "R" and flag == false){
            R_renzoku++;
        }
        else if (cs[matsuri] == "L"){
            L_renzoku++:
            if (flag == false){
                L_start = matsuri;
            }
            flag = true;
        }
        else if (cs[matsuri] == "R" and flag == true){
            placeChild(matsuri, R_renzoku, L_renzoku, children);
            R_renzoku = 1;
            L_renzoku = 0;
        }
        else if (matsuri = size - 1){
            placeChild(matsuri + 1, R_renzoku, L_renzoku + 1, children);
        }
    }

    for (int kaori = 0; kaori < size, kaori++){
        cout << children[kaori] << " "
    }
    cout << endl;
    return 0;
}

Compiler output:
a.cc:4:51: error: 'bector' has not been declared
    4 | int placeChild(int now, int numberR, int numberL, bector<int> &kids){
      |                                                   ^~~~~~
a.cc:4:57: error: expected ',' or '...' before '<' token
    4 | int placeChild(int now, int numberR, int numberL, bector<int> &kids){
      |                                                         ^
a.cc: In function 'int placeChild(int, int, int, int)':
a.cc:8:19: error: 'R' was not declared in this scope
    8 |     int kidsOnL = R / 2 + (L + 1) / 2;
      |                   ^
a.cc:8:28: error: 'L' was not declared in this scope
    8 |     int kidsOnL = R / 2 + (L + 1) / 2;
      |                            ^
a.cc:11:5: error: 'kids' was not declared in this scope
   11 |     kids[Lstart - 1] = kidsOnR;
      |     ^~~~
a.cc:13:1: warning: no return statement in function returning non-void [-Wreturn-type]
   13 | }
      | ^
a.cc: In function 'int main()':
a.cc:19:5: error: expected ',' or ';' before 'vector'
   19 |     vector<char> cs(size);
      |     ^~~~~~
a.cc:22:9: error: 'cs' was not declared in this scope; did you mean 's'?
   22 |         cs[tsumugi] = s[tsumugi];
      |         ^~
      |         s
a.cc:35:13: error: 'cs' was not declared in this scope; did you mean 's'?
   35 |         if (cs[matsuri] == "R" and flag == false){
      |             ^~
      |             s
a.cc:39:24: error: expected ';' before ':' token
   39 |             L_renzoku++:
      |                        ^
      |                        ;
a.cc:46:55: error: cannot convert 'std::vector<int>' to 'int'
   46 |             placeChild(matsuri, R_renzoku, L_renzoku, children);
      |                                                       ^~~~~~~~
      |                                                       |
      |                                                       std::vector<int>
a.cc:4:51: note:   initializing argument 4 of 'int placeChild(int, int, int, int)'
    4 | int placeChild(int now, int numberR, int numberL, bector<int> &kids){
      |                                                   ^~~~~~
a.cc:51:63: error: cannot convert 'std::vector<int>' to 'int'
   51 |             placeChild(matsuri + 1, R_renzoku, L_renzoku + 1, children);
      |                                                               ^~~~~~~~
      |                                                               |
      |                                                               std::vector<int>
a.cc:4:51: note:   initializing argument 4 of 'int placeChild(int, int, int, int)'
    4 | int placeChild(int now, int numberR, int numberL, bector<int> &kids){
      |                                                   ^~~~~~
a.cc:55:46: error: expected ';' before ')' token
   55 |     for (int kaori = 0; kaori < size, kaori++){
      |                                              ^
      |                                              ;
a.cc:56:39: error: expected ';' before '}' token
   56 |         cout << children[kaori] << " "
      |                                       ^
      |                                       ;
   57 |     }
      |     ~