Problem stonearranging2
User frostbyte
Submission Time 2026-03-12 19:23:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

stonearranging2.cpp: In function ‘int main()’:
stonearranging2.cpp:14:40: error: expected ‘;’ before ‘map’
14 | for(int i=1;i<=n;i++) color[i]=a[i]
| ^
| ;
15 | map<int,int> last;
| ~~~
stonearranging2.cpp:18:12: error: ‘last’ was not declared in this scope
18 | if(last.count(c)){
| ^~~~
stonearranging2.cpp:20:20: error: ‘st’ was not declared in this scope; did you mean ‘std’?
20 | while(!st.empty() && st.top() > j){
| ^~
| std
stonearranging2.cpp:29:9: error: ‘st’ was not declared in this scope; did you mean ‘std’?
29 | st.push(i);
| ^~
| std
stonearranging2.cpp:30:9: error: ‘last’ was not declared in this scope
30 | last[c] = i;