結果
問題 | No.138 化石のバージョン |
ユーザー |
|
提出日時 | 2015-01-31 16:41:54 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 592 bytes |
コンパイル時間 | 364 ms |
コンパイル使用メモリ | 21,120 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 12:59:43 |
合計ジャッジ時間 | 1,528 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:11:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%s",buf); | ^~~~~~~~~~~~~~~ main.c:15:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 15 | scanf("%s",buf); | ^~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>#include<string.h>#include<stdlib.h>int main(){int a,b,c,d,e,f;char buf[20];char token[10]=".";scanf("%s",buf);a=atoi(strtok(buf,token));b=atoi(strtok(NULL,token));c=atoi(strtok(NULL,token));scanf("%s",buf);d=atoi(strtok(buf,token));e=atoi(strtok(NULL,token));f=atoi(strtok(NULL,token));if (a>d) {printf("YES\n");} else if (a<d) {printf("NO\n");} else if (b>e) {printf("YES\n");} else if (b<e) {printf("NO\n");} else if (c>=f) {printf("YES\n");} else {printf("NO\n");}return 0;}