結果

問題 No.201 yukicoderじゃんけん
ユーザー %20%20
提出日時 2016-12-22 02:19:18
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 201 bytes
コンパイル時間 139 ms
コンパイル使用メモリ 20,224 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-08 10:54:52
合計ジャッジ時間 873 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 0 ms
5,376 KB
testcase_03 AC 0 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 0 ms
5,376 KB
testcase_07 AC 0 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 0 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 0 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 0 ms
5,376 KB
testcase_15 AC 0 ms
5,376 KB
testcase_16 AC 1 ms
5,376 KB
testcase_17 AC 1 ms
5,376 KB
testcase_18 AC 0 ms
5,376 KB
testcase_19 AC 0 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
    1 | i;char S[2][101],P[2][100000];
      | ^
main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int]
main.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    2 | main(t){
      | ^~~~
main.c: In function ‘main’:
main.c:2:1: warning: type of ‘t’ defaults to ‘int’ [-Wimplicit-int]
main.c:3:9: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
    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: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:3:9: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
main.c:4:16: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
    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];
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:4:16: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
main.c:6:12: warning: implicit declaration of function ‘puts’ [-Wimplicit-function-declaration]
    6 |         i=!puts((*P)[i]?S[t<0]:"-1");
      |            ^~~~
main.c:6:12: note: include ‘<stdio.h>’ or provide a declaration of ‘puts’

ソースコード

diff #

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);
	i=!puts((*P)[i]?S[t<0]:"-1");
}
0