Language: C++

#include<bits/stdc++.h>
#include<string>
using namespace std;
//max=({});

int main() {
	int n;
	cin >> n;
	string S, T;
	cin >> S >> T;
	string ans= 'S[0]' + 'T[0]';
	for (int i = 1;i < n;++i) {
		ans += 'S[i]';
		ans += 'T[i]';
	}
	cout << ans << endl;
}
#include<bits/stdc++.h>
#include<string>
using namespace std;
//max=({});

int main() {
	int n;
	cin >> n;
	string S, T;
	cin >> S >> T;
	string ans= 'S[0]' + 'T[0]';
	for (int i = 1;i < n;++i) {
		ans += 'S[i]';
		ans += 'T[i]';
	}
	cout << ans << endl;
}


Compiler output:
a.cc:11:21: warning: multi-character character constant [-Wmultichar]
   11 |         string ans= 'S[0]' + 'T[0]';
      |                     ^~~~~~
a.cc:11:30: warning: multi-character character constant [-Wmultichar]
   11 |         string ans= 'S[0]' + 'T[0]';
      |                              ^~~~~~
a.cc:13:24: warning: multi-character character constant [-Wmultichar]
   13 |                 ans += 'S[i]';
      |                        ^~~~~~
a.cc:14:24: warning: multi-character character constant [-Wmultichar]
   14 |                 ans += 'T[i]';
      |                        ^~~~~~
a.cc:28:21: warning: multi-character character constant [-Wmultichar]
   28 |         string ans= 'S[0]' + 'T[0]';
      |                     ^~~~~~
a.cc:28:30: warning: multi-character character constant [-Wmultichar]
   28 |         string ans= 'S[0]' + 'T[0]';
      |                              ^~~~~~
a.cc:30:24: warning: multi-character character constant [-Wmultichar]
   30 |                 ans += 'S[i]';
      |                        ^~~~~~
a.cc:31:24: warning: multi-character character constant [-Wmultichar]
   31 |                 ans += 'T[i]';
      |                        ^~~~~~
a.cc: In function 'int main()':
a.cc:11:28: warning: integer overflow in expression of type 'int' results in '-1481219910' [-Woverflow]
   11 |         string ans= 'S[0]' + 'T[0]';
      |                     ~~~~~~~^~~~~~~~
a.cc:11:28: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
a.cc:13:24: warning: overflow in conversion from 'int' to 'char' changes value from '1398499677' to '93' [-Woverflow]
   13 |                 ans += 'S[i]';
      |                        ^~~~~~
a.cc:14:24: warning: overflow in conversion from 'int' to 'char' changes value from '1415276893' to '93' [-Woverflow]
   14 |                 ans += 'T[i]';
      |                        ^~~~~~
a.cc: At global scope:
a.cc:23:5: error: redefinition of 'int main()'
   23 | int main() {
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main() {
      |     ^~~~
a.cc: In function 'int main()':
a.cc:28:28: warning: integer overflow in expression of type 'int' results in '-1481219910' [-Woverflow]
   28 |         string ans= 'S[0]' + 'T[0]';
      |                     ~~~~~~~^~~~~~~~
a.cc:28:28: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
a.cc:30:24: warning: overflow in conversion from 'int' to 'char' changes value from '1398499677' to '93' [-Woverflow]
   30 |                 ans += 'S[i]';
      |                        ^~~~~~
a.cc:31:24: warning: overflow in conversion from 'int' to 'char' changes value from '1415276893' to '93' [-Woverflow]
   31 |                 ans += 'T[i]';
      |                        ^~~~~~