結果
| 問題 |
No.69 文字を自由に並び替え
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-24 15:47:41 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 297 bytes |
| コンパイル時間 | 436 ms |
| コンパイル使用メモリ | 56,428 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-14 06:57:15 |
| 合計ジャッジ時間 | 1,077 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main()
{
string A, B;
cin >> A >> B;
for(int i = 0; i < A.length(); ++i)
{
if((int)B.find(A[i]) == -1)
{
cout << "NO" << endl;
return 0;
}
B.erase(B.begin() + B.find(A[i]));
}
cout << "YES" << endl;
return 0;
}