結果

問題 No.201 yukicoderじゃんけん
コンテスト
ユーザー %20
提出日時 2016-12-22 02:18:46
言語 C90
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 198 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 209 ms
コンパイル使用メモリ 36,660 KB
最終ジャッジ日時 2026-02-23 23:55:42
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
    1 | i;char S[2][101],P[2][100000];
      | ^
main.c: In function 'main':
main.c:3:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |         scanf("%s%s%*s%s%s%*s",S[0],P[0],S[1],P[1]);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | i;char S[2][101],P[2][100000];
main.c:4:16: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    4 |         if(!(t=strlen(P[0])-strlen(P[1])))
      |                ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen'
  +++ |+#include <string.h>
    1 | i;char S[2][101],P[2][100000];

ソースコード

diff #
raw source code

i;char S[2][101],P[2][100000];
main(t){
	scanf("%s%s%*s%s%s%*s",S[0],P[0],S[1],P[1]);
	if(!(t=strlen(P[0])-strlen(P[1])))
		for(;i<strlen(*P)&!(t=P[0][i]-P[1][i]);++i);
	puts((*P)[i]?S[t<0]:"-1");
}
0