結果
| 問題 | No.204 ゴールデン・ウィーク(2) |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-03-09 23:21:13 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 190 bytes |
| 記録 | |
| コンパイル時間 | 94 ms |
| コンパイル使用メモリ | 29,128 KB |
| 最終ジャッジ日時 | 2026-02-23 20:51:37 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 WA * 15 |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class
2 | p,q,r=14,d,n,m;main(t){for(scanf("%d",&d);n=getchar(),~t;t=n-10?n:t)n-10?n-'o'?t<n|n<0?m=r>d?M(m,M(p,q)+d):M(m,p+q+r),p=q,q=0,r=1:r++:q++:0;n=!printf("%d",M(m,p+d));}
| ^
main.c: In function ‘main’:
main.c:2:28: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
2 | p,q,r=14,d,n,m;main(t){for(scanf("%d",&d);n=getchar(),~t;t=n-10?n:t)n-10?n-'o'?t<n|n<0?m=r>d?M(m,M(p,q)+d):M(m,p+q+r),p=q,q=0,r=1:r++:q++:0;n=!printf("%d",M(m,p+d));}
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | #define M(a,b)(a<b?b:a)
main.c:2:144: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
2 | p,q,r=14,d,n,m;main(t){for(scanf("%d",&d);n=getchar(),~t;t=n-10?n:t)n-10?n-'o'?t<n|n<0?m=r>d?M(m,M(p,q)+d):M(m,p+q+r),p=q,q=0,r=1:r++:q++:0;n=!printf("%d",M(m,p+d));}
| ^~~~~~
main.c:2:144: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
#define M(a,b)(a<b?b:a)
p,q,r=14,d,n,m;main(t){for(scanf("%d",&d);n=getchar(),~t;t=n-10?n:t)n-10?n-'o'?t<n|n<0?m=r>d?M(m,M(p,q)+d):M(m,p+q+r),p=q,q=0,r=1:r++:q++:0;n=!printf("%d",M(m,p+d));}
testestest