結果
| 問題 | No.927 Second Permutation |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-11-22 21:33:48 |
| 言語 | cLay (20241019-1 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 213 bytes |
| 記録 | |
| コンパイル時間 | 2,060 ms |
| コンパイル使用メモリ | 176,228 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-05 13:26:43 |
| 合計ジャッジ時間 | 2,802 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 11 WA * 16 |
ソースコード
string s;
{
cin>>s;
sort(s.begin(), s.end());
auto ok=next_permutation(s.begin(), s.end());
ok &= s.back() != '0';
if (ok)
for(auto it=s.rbegin();it!=s.rend();++it) putchar(*it);
else
wt(-1);
}