結果
問題 | No.201 yukicoderじゃんけん |
ユーザー | 👑 testestest |
提出日時 | 2015-08-08 20:59:00 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 177 bytes |
コンパイル時間 | 84 ms |
コンパイル使用メモリ | 19,840 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-18 06:04:11 |
合計ジャッジ時間 | 721 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 0 ms
6,816 KB |
testcase_01 | AC | 0 ms
6,944 KB |
testcase_02 | AC | 0 ms
6,944 KB |
testcase_03 | AC | 1 ms
6,944 KB |
testcase_04 | AC | 0 ms
6,940 KB |
testcase_05 | AC | 0 ms
6,944 KB |
testcase_06 | AC | 0 ms
6,940 KB |
testcase_07 | AC | 1 ms
6,940 KB |
testcase_08 | AC | 1 ms
6,940 KB |
testcase_09 | AC | 1 ms
6,940 KB |
testcase_10 | AC | 1 ms
6,944 KB |
testcase_11 | AC | 0 ms
6,944 KB |
testcase_12 | AC | 1 ms
6,940 KB |
testcase_13 | AC | 0 ms
6,940 KB |
testcase_14 | AC | 1 ms
6,940 KB |
testcase_15 | AC | 1 ms
6,944 KB |
testcase_16 | AC | 1 ms
6,940 KB |
testcase_17 | AC | 1 ms
6,944 KB |
testcase_18 | AC | 1 ms
6,944 KB |
testcase_19 | AC | 1 ms
6,940 KB |
コンパイルメッセージ
main.c: In function ‘main’: main.c:4:1: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 4 | scanf("%s%s%*s%s%s%*s",a,b,c,d); | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | int main(void) { main.c:4:1: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 4 | scanf("%s%s%*s%s%s%*s",a,b,c,d); | ^~~~~ main.c:4:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:5:3: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration] 5 | x=strlen(b)-strlen(d); | ^~~~~~ main.c:1:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’ +++ |+#include <string.h> 1 | int main(void) { main.c:5:3: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch] 5 | x=strlen(b)-strlen(d); | ^~~~~~ main.c:5:3: note: include ‘<string.h>’ or provide a declaration of ‘strlen’ main.c:6:7: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration] 6 | x=x?x:strcmp(b,d); | ^~~~~~ main.c:6:7: note: include ‘<string.h>’ or provide a declaration of ‘strcmp’ main.c:7:1: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 7 | printf("%s",x?x>0?a:c:"-1"); | ^~~~~~ main.c:7:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:7:1: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] main.c:7:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
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; }