結果
| 問題 | No.69 文字を自由に並び替え |
| コンテスト | |
| ユーザー |
mosmos_21
|
| 提出日時 | 2016-10-05 22:23:55 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 289 bytes |
| 記録 | |
| コンパイル時間 | 45 ms |
| コンパイル使用メモリ | 29,184 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-24 14:18:37 |
| 合計ジャッジ時間 | 1,082 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 2 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%s%s",a,b);
| ^~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main(){
char a[11],b[11];
int c[26]={0},i=0;
scanf("%s%s",a,b);
while(a[i]!='\0')
c[a[i++]-'a']++;
while(i){
if(!c[b[i]-'a']){
printf("NO\n");
return 0;
}else{
c[b[i]-'a']--;
}
i--;
}
printf("YES\n");
return 0;
}
mosmos_21