結果

問題 No.69 文字を自由に並び替え
ユーザー tmsb
提出日時 2018-10-27 00:30:59
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 387 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 28,500 KB
実行使用メモリ 6,816 KB
最終ジャッジ日時 2024-11-19 06:33:00
合計ジャッジ時間 668 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <string.h>

int main(void)
{
  int i, j, temp;
  char a[11], b[11];

  scanf("%s%s", a, b);
  for(i = 0; a[i] != '\0'; i++){
    for(j = 0; b[j] != '\0'; j++){
      if(a[i] == b[j]){
        temp = b[i];
        b[i] = b[j];
        b[j] = temp;
      }
    }
  }
  if(strcmp(a, b) == 0){
    printf("YES\n");
  }else{
    printf("NO\n");
  }

  return 0;
}
0