結果
| 問題 | 
                            No.138 化石のバージョン
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Haijinn
                         | 
                    
| 提出日時 | 2017-04-11 20:41:34 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 1 ms / 5,000 ms | 
| コード長 | 394 bytes | 
| コンパイル時間 | 293 ms | 
| コンパイル使用メモリ | 20,608 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-12-29 14:20:24 | 
| 合計ジャッジ時間 | 1,352 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 33 | 
コンパイルメッセージ
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]||c[0]==c[1])){
	printf("YES\n");
}else{
	printf("NO\n");
}
	return 0;
}
            
            
            
        
            
Haijinn