結果

問題 No.457 (^^*)
ユーザー 👑 testestesttestestest
提出日時 2016-12-31 11:18:42
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 267 bytes
コンパイル時間 425 ms
コンパイル使用メモリ 20,224 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-05-09 14:29:17
合計ジャッジ時間 1,963 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
6,944 KB
testcase_02 AC 0 ms
6,940 KB
testcase_03 AC 1 ms
6,944 KB
testcase_04 WA -
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 WA -
testcase_08 AC 1 ms
6,944 KB
testcase_09 AC 2 ms
6,940 KB
testcase_10 AC 11 ms
6,944 KB
testcase_11 AC 47 ms
6,940 KB
testcase_12 AC 135 ms
6,944 KB
testcase_13 AC 186 ms
6,944 KB
testcase_14 WA -
testcase_15 AC 135 ms
6,940 KB
testcase_16 AC 175 ms
6,940 KB
testcase_17 WA -
testcase_18 AC 1 ms
6,944 KB
testcase_19 AC 0 ms
6,940 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:8: warning: multi-character character constant [-Wmultichar]
    1 | char s['~~'];i,L,R,tL,tR,sL,sR;
      |        ^~~~
main.c:1:14: warning: data definition has no type or storage class
    1 | char s['~~'];i,L,R,tL,tR,sL,sR;
      |              ^
main.c:1:14: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int]
main.c:1:16: warning: type defaults to ‘int’ in declaration of ‘L’ [-Wimplicit-int]
    1 | char s['~~'];i,L,R,tL,tR,sL,sR;
      |                ^
main.c:1:18: warning: type defaults to ‘int’ in declaration of ‘R’ [-Wimplicit-int]
    1 | char s['~~'];i,L,R,tL,tR,sL,sR;
      |                  ^
main.c:1:20: warning: type defaults to ‘int’ in declaration of ‘tL’ [-Wimplicit-int]
    1 | char s['~~'];i,L,R,tL,tR,sL,sR;
      |                    ^~
main.c:1:23: warning: type defaults to ‘int’ in declaration of ‘tR’ [-Wimplicit-int]
    1 | char s['~~'];i,L,R,tL,tR,sL,sR;
      |                       ^~
main.c:1:26: warning: type defaults to ‘int’ in declaration of ‘sL’ [-Wimplicit-int]
    1 | char s['~~'];i,L,R,tL,tR,sL,sR;
      |                          ^~
main.c:1:29: warning: type defaults to ‘int’ in declaration of ‘sR’ [-Wimplicit-int]
    1 | char s['~~'];i,L,R,tL,tR,sL,sR;
      |                             ^~
main.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    2 | main(j){
      | ^~~~
main.c: In function ‘main’:
main.c:2:1: warning: type of ‘j’ defaults to ‘int’ [-Wimplicit-int]
main.c:3:13: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
    3 |         for(gets(s);s[i]=='('&&s[++j]?
      |             ^~~~
main.c:7:12: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
    7 |         i=!printf("%d %d",sL,sR);
      |            ^~~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
  +++ |+#include <stdio.h>

ソースコード

diff #

char s['~~'];i,L,R,tL,tR,sL,sR;
main(j){
	for(gets(s);s[i]=='('&&s[++j]?
		tL<2&s[j]=='^'|tL==2&s[j]=='*'?++tL:s[j]==')'?tL+=tL>2,sL+=tL>3:0,
		tR<3&tR>0&s[j]=='^'|!tR&s[j]=='*'?++tR:s[j]==')'?tR+=tR>2,sR+=tR>3:0,1
	:(tL=tR=0,s[j=++i]););
	i=!printf("%d %d",sL,sR);
}
0