結果

問題 No.69 文字を自由に並び替え
ユーザー Haijinn
提出日時 2017-07-22 19:08:20
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 354 bytes
コンパイル時間 128 ms
コンパイル使用メモリ 21,120 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-14 06:42:01
合計ジャッジ時間 770 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15
権限があれば一括ダウンロードができます
コンパイルメッセージ
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);
      | ^~~~~~~~~~~~~~~~~

ソースコード

diff #

#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++;
		a[j]=0;
		break;
		
	}
	
	
	}
	/*c[i]=s;
	printf("%d\n",c[i]);
	s=0;
	*/
	
}
if(s==x){
printf("YES\n");
}else{
	
	printf("NO\n");
}
	return 0;
}
0