結果
| 問題 |
No.170 スワップ文字列(Easy)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-25 06:38:33 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 363 bytes |
| コンパイル時間 | 519 ms |
| コンパイル使用メモリ | 64,000 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 05:44:03 |
| 合計ジャッジ時間 | 4,394 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 21 |
ソースコード
#include<iostream>
#include<string>
using namespace std;
int main(){
string s;
cin >> s;
int ans = 0;
for(int i=0;i < s.size();i++){
for(int j=0;j < s.size();j++){
swap(s[i],s[j]);
int x = stoi(s);
ans = max(ans,x);
swap(s[i],s[j]);
}
}
cout << ans << endl;
return 0;
}