結果

問題 No.69 文字を自由に並び替え
ユーザー Haijinn
提出日時 2016-11-26 22:12:43
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 334 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 20,992 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-27 13:36:46
合計ジャッジ時間 653 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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);
      | ^~~~~~~~~~~~~~~~~

ソースコード

diff #

#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;
}
0