結果
問題 |
No.69 文字を自由に並び替え
|
ユーザー |
|
提出日時 | 2018-07-24 02:21:51 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 542 bytes |
コンパイル時間 | 864 ms |
コンパイル使用メモリ | 64,116 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-01-02 23:52:52 |
合計ジャッジ時間 | 1,501 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 15 |
ソースコード
#include<iostream> #include<string> #include<vector> //#include<windows.h> using namespace std; string rollstr(string _T) { char tmp_c = _T[_T.length() - 1]; for (int i = _T.length()-1; i > 0; i--) { _T[i] = _T[i-1]; } _T[0] = tmp_c; return _T; } int main() { string S, T; cin >> S >> T; bool flag = false; for (int i = 0; i <= S.length(); i++) { if (S == T) { flag = true; break; } T=rollstr(T); } if (flag)cout << "Yes" << endl; else cout << "No" << endl; //Sleep(30000); return 0; }