結果

問題 No.865 24時間降水量
ユーザー tailstails
提出日時 2019-08-16 23:10:43
言語 cLay
(20240104-1)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 248 bytes
コンパイル時間 2,490 ms
コンパイル使用メモリ 160,848 KB
実行使用メモリ 12,020 KB
最終ジャッジ日時 2023-09-19 00:25:01
合計ジャッジ時間 8,524 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘long long int f(long long int, long long int)’:
main.cpp:143:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^

ソースコード

diff #

ll n,a[2d5],q,t,v;
ll b,s;
ll f(ll x,ll y){
	s=0;
	rep(i,max(0,x-24),x){
		s+=a[i];
	}
	rep(i,x,min(n,y)){
		s+=a[i];
		if(i-24>=0) s-=a[i-24];
		if(b<s) b=s;
	}
}
{
	rd(n,a(n),q);
	f(0,n);
	rep(q){
		rd(t,v);
		a[--t]=v;
		f(t,t+24);
		wt(b);
	}
}
0