結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
Haijinn
|
| 提出日時 | 2017-04-11 20:40:02 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 380 bytes |
| コンパイル時間 | 168 ms |
| コンパイル使用メモリ | 20,608 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-18 09:06:20 |
| 合計ジャッジ時間 | 1,037 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 WA * 4 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:15:23: warning: format ‘%c’ expects argument of type ‘char *’, but argument 5 has type ‘int *’ [-Wformat=]
15 | scanf("%d%c%d%c%d",&a[i],&c1[i],&b[i],&c[i],&c[i]);
| ~^ ~~~~~
| | |
| char * int *
| %lc
main.c:15:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
15 | scanf("%d%c%d%c%d",&a[i],&c1[i],&b[i],&c[i],&c[i]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void)
{
int a[100];
int b[100];
int c[100];
int i;
int a1;
int a2;
int a3;
char c1[2];
for(i=0;i<2;i++){
scanf("%d%c%d%c%d",&a[i],&c1[i],&b[i],&c[i],&c[i]);
}
if(a[0]>a[1]){
printf("YES\n");
}else if(a[0]==a[1]&&b[0]>b[1]){
printf("YES\n");
}else if(a[0]==a[1]&&b[0]==b[1]&&c[0]>c[1]){
printf("YES\n");
}else{
printf("NO\n");
}
return 0;
}
Haijinn