結果
| 問題 |
No.69 文字を自由に並び替え
|
| コンテスト | |
| ユーザー |
Haijinn
|
| 提出日時 | 2016-11-26 22:17:26 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 326 bytes |
| コンパイル時間 | 156 ms |
| コンパイル使用メモリ | 20,736 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-27 13:36:48 |
| 合計ジャッジ時間 | 756 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 9 |
コンパイルメッセージ
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;
}
Haijinn