結果

問題 No.398 ハーフパイプ(2)
ユーザー testestesttestestest
提出日時 2016-07-17 22:14:50
言語 C90
(gcc 11.4.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 446 bytes
コンパイル時間 368 ms
コンパイル使用メモリ 25,104 KB
実行使用メモリ 386,256 KB
最終ジャッジ日時 2023-09-08 08:46:35
合計ジャッジ時間 38,360 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,966 ms
149,784 KB
testcase_01 TLE -
testcase_02 TLE -
testcase_03 AC 1,929 ms
206,824 KB
testcase_04 MLE -
testcase_05 TLE -
testcase_06 MLE -
testcase_07 TLE -
testcase_08 TLE -
testcase_09 MLE -
testcase_10 AC 1,945 ms
209,352 KB
testcase_11 MLE -
testcase_12 MLE -
testcase_13 MLE -
testcase_14 MLE -
testcase_15 AC 1,970 ms
209,404 KB
testcase_16 MLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:4:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main(){
 ^~~~
main.c: In function ‘main’:
main.c:8:2: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
  scanf("%d.%d",&i,&k);
  ^~~~~
main.c:8:2: warning: incompatible implicit declaration of built-in function ‘scanf’
main.c:8:2: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
main.c:1:1:
+#include <stdio.h>
 #define min(p,q)(p<q?p:q)
main.c:8:2:
  scanf("%d.%d",&i,&k);
  ^~~~~
main.c:11:2: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
  printf("%ld",a);
  ^~~~~~
main.c:11:2: warning: incompatible implicit declaration of built-in function ‘printf’
main.c:11:2: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’

ソースコード

diff #

#define min(p,q)(p<q?p:q)
#define max(p,q)(p>q?p:q)
long dp[9][110][110][900],a;
main(){
	int i,m,M,s,k;
	for(m=0;m<=100;m++)for(M=m;M<=100;M++)dp[2][m][M][m+M]=m==M?1:2;
	for(i=2;i<6;i++)for(m=0;m<=100;m++)for(M=m;M<=100;M++)for(s=m*i;s<=i*100;s++)for(k=0;k<=100;k++)dp[i+1][min(m,k)][max(M,k)][s+k]+=dp[i][m][M][s];
	scanf("%d.%d",&i,&k);
	i=i*4+k/25;
	for(m=0;m<=100;m++)for(M=0;M<=100;M++)a+=dp[6][m][M][i+m+M];
	printf("%ld",a);
	return 0;
}
0