結果

問題 No.69 文字を自由に並び替え
ユーザー Haijinn
提出日時 2017-01-22 15:59:38
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 344 bytes
コンパイル時間 122 ms
コンパイル使用メモリ 20,992 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-14 06:27:31
合計ジャッジ時間 764 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:16:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   16 | scanf("%s%s",a,b);
      | ^~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
#include<string.h>




int main(){


char a[10];
char b[10];
int f;
int i;
int d;
int s=0;
scanf("%s%s",a,b);
f=strlen(a);
for(i=0;i<f;i++){
	for(d=0;d<f;d++){
		if(a[i]==b[d]){
			//printf("%c=%c\n",a[i],b[d]);
			s++;
			b[d]=0;
			break;
		}
	}
}

if(s==f){
	
	printf("YES\n");
}else{
	
	printf("NO\n");
	
}




return 0;
}
0