結果
| 問題 |
No.69 文字を自由に並び替え
|
| コンテスト | |
| ユーザー |
nanatutmc
|
| 提出日時 | 2019-09-28 00:44:38 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 458 bytes |
| コンパイル時間 | 184 ms |
| コンパイル使用メモリ | 28,544 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-25 03:49:10 |
| 合計ジャッジ時間 | 810 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 9 |
コンパイルメッセージ
main.c:3:1: warning: return type defaults to 'int' [-Wimplicit-int]
3 | main() {
| ^~~~
ソースコード
#include <stdio.h>
main() {
char str1[10], str2[10];
int count1[26], count2[26];
scanf("%s", str1);
scanf("%s", str2);
for (int i=0; i<10; i++) {
if (str1[i] == 0)
break;
count1[str1[i]-'a']++;
count2[str2[i]-'a']++;
}
for (int i=0; i<26; i++) {
if (count1[i] != count2[i]) {
printf("NO\n");
return 0;
}
}
printf("YES\n");
}
nanatutmc