传送门 \(A\) 咕咕 const int N=1005; int a[N],n,T; int main(){ for(scanf("%d",&T);T;--T){ scanf("%d",&n); fp(i,1,10)a[i]=n%10,n/=10; R int fl=1; fp(i,1,9)if(a[i]<a[i+1]){fl=0;break;} if(!fl)puts("Impossible"); else print…
传送门 \(A\) 咕咕咕 const int N=1005; char s[N][N];int len[N],n,id; inline bool cmp(R int j,R int k){ R int l=min(len[j],len[k]); fp(i,1,l)if(s[j][i]!=s[k][i])return s[j][i]<s[k][i]; return len[j]<len[k]; } int main(){ scanf("%d",&n),id=1; f…