結果
| 問題 | No.457 (^^*) |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-12-31 11:21:49 |
| 言語 | C90(gcc15) (gcc 15.2.0) |
| 結果 |
AC
|
| 実行時間 | 164 ms / 2,000 ms |
| コード長 | 268 bytes |
| 記録 | |
| コンパイル時間 | 162 ms |
| コンパイル使用メモリ | 37,080 KB |
| 最終ジャッジ日時 | 2026-02-24 00:02:17 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
コンパイルメッセージ
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: In function 'main':
main.c:7:12: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
7 | i=!printf("%d %d",sL,sR);
| ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.h>
1 | char s['~~'];i,j,L,R,tL,tR,sL,sR;
/usr/bin/ld: /tmp/ccjZLkkq.o: in function `main':
main.c:(.text.startup+0x17): 警告: the `gets' function is dangerous and should not be used.
ソースコード
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);
}
testestest