結果
問題 |
No.69 文字を自由に並び替え
|
ユーザー |
![]() |
提出日時 | 2016-11-26 22:15:43 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 337 bytes |
コンパイル時間 | 126 ms |
コンパイル使用メモリ | 21,248 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 13:36:47 |
合計ジャッジ時間 | 688 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 6 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:13:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%s%s",a,b); | ^~~~~~~~~~~~~~~~~
ソースコード
#include<string.h> #include<stdio.h> int main(){ int i; int w=0; int q; int s; char a[100]; char b[100]; char x; scanf("%s%s",a,b); q=strlen(a); for(i=0;i<q;i++){ for(s=0;s<q;s++){ if(b[s]==a[i]){ b[s]=0;break; if(s==q){break;} } } } if(i==q){ printf("YES\n"); }else{ printf("NO\n"); } return 0; }