結果
| 問題 |
No.69 文字を自由に並び替え
|
| コンテスト | |
| ユーザー |
suppy193
|
| 提出日時 | 2015-05-28 15:53:08 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 341 bytes |
| コンパイル時間 | 558 ms |
| コンパイル使用メモリ | 20,608 KB |
| 実行使用メモリ | 6,940 KB |
| 最終ジャッジ日時 | 2024-06-27 09:44:31 |
| 合計ジャッジ時間 | 1,283 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 WA * 1 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%s", A);
| ^~~~~~~~~~~~~~
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%s", B);
| ^~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void) {
char A[11], B[11];
int i, j, num_a[26] = {0}, num_b[26] = {0};
scanf("%s", A);
scanf("%s", B);
i = 0;
while(A[i] != '\0'){
num_a[A[i] - 97]++;
num_b[B[i] - 97]++;
i++;
}
for(j = 0;j < i;j++){
if(num_a[j] != num_b[j]){
printf("NO\n");
return 0;
}
}
printf("YES");
return 0;
}
suppy193