Main.cpp:47:30: error: expected constructor, destructor, or type conversion before '(' token
47 | ios_base::sync_with_stdio(0);
| ^
Main.cpp:48:5: error: 'cin' does not name a type; did you mean 'sin'?
48 | cin.tie(0), cout.tie(0);
| ^~~
| sin
Main.cpp:50:5: error: 'cin' does not name a type; did you mean 'sin'?
50 | cin >> n >> m;
| ^~~
| sin
Main.cpp:51:5: error: expected unqualified-id before 'for'
51 | for (int i = 1; i <= m; i++) {
| ^~~
Main.cpp:51:21: error: 'i' does not name a type
51 | for (int i = 1; i <= m; i++) {
| ^
Main.cpp:51:29: error: 'i' does not name a type
51 | for (int i = 1; i <= m; i++) {
| ^
Main.cpp:60:5: error: expected unqualified-id before 'for'
60 | for (int i = 1; i <= n; i++) {
| ^~~
Main.cpp:60:21: error: 'i' does not name a type
60 | for (int i = 1; i <= n; i++) {
| ^
Main.cpp:60:29: error: 'i' does not name a type
60 | for (int i = 1; i <= n; i++) {
| ^
Main.cpp:65:5: error: 'cout' does not name a type
65 | cout << res + 1;
| ^~~~
Main.cpp:66:1: error: expected declaration before '}' token
66 | }
| ^