Subpermutation Query

2 secs 1024 MB
mugeneloff's icon mugeneloff

s1.txt


入力

出力