Subpermutation Query

2 secs 1024 MB
mugeneloff's icon mugeneloff

small_3.txt


入力

出力