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