結果

問題 No.201 yukicoderじゃんけん
コンテスト
ユーザー testestest
提出日時 2015-08-08 20:58:27
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 197 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 287 ms
コンパイル使用メモリ 28,872 KB
最終ジャッジ日時 2026-02-23 19:08:54
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:1: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
    5 | scanf("%s%s%*s%s%s%*s",a,b,c,d);
      | ^~~~~
main.c:2:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
    1 | #include <string.h>
  +++ |+#include <stdio.h>
    2 | int main(void) {
main.c:8:1: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
    8 | printf("%s",x?x>0?a:c:"-1");
      | ^~~~~~
main.c:8:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’

ソースコード

diff #
raw source code

#include <string.h>
int main(void) {
char a[101],b[10001],c[101],d[10001];
int x;
scanf("%s%s%*s%s%s%*s",a,b,c,d);
x=strlen(b)-strlen(d);
x=x?x:strcmp(b,d);
printf("%s",x?x>0?a:c:"-1");
return 0;
}
0