gondola.cpp: In function 'int countReplacement(int, int*)':
gondola.cpp:101:8: error: expected '}' before 'else'
}else if(inputSeq[i] <= n && inputSeq[i] != idx)
^~~~
gondola.cpp: At global scope:
gondola.cpp:106:7: error: expected constructor, destructor, or type conversion before '(' token
sort(replaced.begin() + 1, replaced.end());
^
gondola.cpp:107:20: error: 'idx' was not declared in this scope
long long ans = (idx ? 1 : n);
^~~
gondola.cpp:107:20: note: suggested alternative: 'index'
long long ans = (idx ? 1 : n);
^~~
index
gondola.cpp:107:30: error: 'n' was not declared in this scope
long long ans = (idx ? 1 : n);
^
gondola.cpp:107:30: note: suggested alternative: 'yn'
long long ans = (idx ? 1 : n);
^
yn
gondola.cpp:108:3: error: expected unqualified-id before 'for'
for(int i = 1; i < replaced.size(); i++){
^~~
gondola.cpp:108:18: error: 'i' does not name a type
for(int i = 1; i < replaced.size(); i++){
^
gondola.cpp:108:39: error: 'i' does not name a type
for(int i = 1; i < replaced.size(); i++){
^
gondola.cpp:112:3: error: expected unqualified-id before 'return'
return ans;
^~~~~~
gondola.cpp:113:1: error: expected declaration before '}' token
}
^
gondola.cpp: In function 'int countReplacement(int, int*)':
gondola.cpp:105:3: warning: control reaches end of non-void function [-Wreturn-type]
}
^