Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
62139 Masterxuan 新数 C++ Accepted 0 MS 244 KB 295 2025-03-09 15:17:16

Tests(1/1):


#include <bits/stdc++.h> using namespace std; string fun(string s) { string x=s; prev_permutation(x.begin(), x.end()); if(x>s){ return "-1"; } else{ return x; } } int main() { string n; cin >> n;; cout<<fun(n); return 0; }


Judgement Protocol: