結果
問題 | No.256 桁の数字を入れ替え (2) |
ユーザー | dnish |
提出日時 | 2017-07-03 00:38:46 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 296 bytes |
コンパイル時間 | 1,685 ms |
コンパイル使用メモリ | 165,176 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-04-15 12:47:37 |
合計ジャッジ時間 | 5,134 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
10,752 KB |
testcase_01 | WA | - |
testcase_02 | TLE | - |
testcase_03 | -- | - |
ソースコード
#include <bits/stdc++.h> #define REP(i,n,N) for(int i=(n);i<(int) N;i++) #define p(s) cout<<(s)<<endl using namespace std; int main(){ string N; cin>>N; string ans=N; REP(i,1,N.size()){ string a=N.substr(0,i); string b=N.substr(i,N.size()-i); ans=max(ans,b+a); } p(ans); return 0; }