結果
問題 |
No.457 (^^*)
|
ユーザー |
👑 ![]() |
提出日時 | 2016-12-31 11:18:42 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 267 bytes |
コンパイル時間 | 505 ms |
コンパイル使用メモリ | 20,480 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-16 04:22:10 |
合計ジャッジ時間 | 2,253 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 WA * 5 |
コンパイルメッセージ
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>
ソースコード
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); }