結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
6,812 KB
testcase_01 AC 1 ms
6,944 KB
testcase_02 AC 1 ms
6,944 KB
testcase_03 AC 1 ms
6,940 KB
testcase_04 AC 1 ms
6,940 KB
testcase_05 AC 1 ms
6,944 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 1 ms
6,944 KB
testcase_08 AC 1 ms
6,944 KB
testcase_09 AC 2 ms
6,944 KB
testcase_10 AC 12 ms
6,944 KB
testcase_11 AC 49 ms
6,940 KB
testcase_12 AC 130 ms
6,944 KB
testcase_13 AC 176 ms
6,940 KB
testcase_14 AC 0 ms
6,940 KB
testcase_15 AC 133 ms
6,940 KB
testcase_16 AC 175 ms
6,940 KB
testcase_17 AC 0 ms
6,940 KB
testcase_18 AC 1 ms
6,940 KB
testcase_19 AC 0 ms
6,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:8: warning: multi-character character constant [-Wmultichar]
    1 | char s['~~'];i,j,L,R,tL,tR,sL,sR;
      |        ^~~~
main.c:1:14: warning: data definition has no type or storage class
    1 | char s['~~'];i,j,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 ‘j’ [-Wimplicit-int]
    1 | char s['~~'];i,j,L,R,tL,tR,sL,sR;
      |                ^
main.c:1:18: warning: type defaults to ‘int’ in declaration of ‘L’ [-Wimplicit-int]
    1 | char s['~~'];i,j,L,R,tL,tR,sL,sR;
      |                  ^
main.c:1:20: warning: type defaults to ‘int’ in declaration of ‘R’ [-Wimplicit-int]
    1 | char s['~~'];i,j,L,R,tL,tR,sL,sR;
      |                    ^
main.c:1:22: warning: type defaults to ‘int’ in declaration of ‘tL’ [-Wimplicit-int]
    1 | char s['~~'];i,j,L,R,tL,tR,sL,sR;
      |                      ^~
main.c:1:25: warning: type defaults to ‘int’ in declaration of ‘tR’ [-Wimplicit-int]
    1 | char s['~~'];i,j,L,R,tL,tR,sL,sR;
      |                         ^~
main.c:1:28: warning: type defaults to ‘int’ in declaration of ‘sL’ [-Wimplicit-int]
    1 | char s['~~'];i,j,L,R,tL,tR,sL,sR;
      |                            ^~
main.c:1:31: warning: type defaults to ‘int’ in declaration of ‘sR’ [-Wimplicit-int]
    1 | char s['~~'];i,j,L,R,tL,tR,sL,sR;
      |                               ^~
main.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function ‘main’:
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);
      |            ^~~~~~

ソースコード

diff #

char s['~~'];i,j,L,R,tL,tR,sL,sR;
main(){
	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