結果
| 問題 | No.39 桁の数字を入れ替え |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-26 02:05:10 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 352 bytes |
| 記録 | |
| コンパイル時間 | 1,885 ms |
| コンパイル使用メモリ | 193,380 KB |
| 最終ジャッジ日時 | 2025-01-12 05:43:07 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(int)(n); i++)
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
string s;
cin >> s;
int n = s.length();
string t = s;
REP (i, n) REP (j, n) {
swap(s[i], s[j]);
t = max(t, s);
swap(s[i], s[j]);
}
cout << t << endl;
return 0;
}