結果
| 問題 |
No.201 yukicoderじゃんけん
|
| コンテスト | |
| ユーザー |
%20
|
| 提出日時 | 2016-12-22 02:18:46 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 198 bytes |
| コンパイル時間 | 411 ms |
| コンパイル使用メモリ | 19,968 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-14 14:15:57 |
| 合計ジャッジ時間 | 1,117 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 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: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:9: warning: implicit declaration of function ‘puts’ [-Wimplicit-function-declaration]
6 | puts((*P)[i]?S[t<0]:"-1");
| ^~~~
main.c:6:9: note: include ‘<stdio.h>’ or provide a declaration of ‘puts’
ソースコード
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");
}
%20