結果

問題 No.69 文字を自由に並び替え
ユーザー kaito_tateyama
提出日時 2017-08-07 18:39:04
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 347 bytes
コンパイル時間 399 ms
コンパイル使用メモリ 55,956 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-27 13:49:30
合計ジャッジ時間 998 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;

int main() {

  string a,b;
  cin >> a >> b;
  int count = a.size();
  for (int i = 0; i < count; i++) {
    char c = a[i];
    if (b.find(c) == string::npos) {
      cout << "NO" << "\n";
      break;
    }else if(i == count - 1){
      cout << "YES" << "\n";
    }
  }

  return 0;
}
0