結果

問題 No.865 24時間降水量
ユーザー tailstails
提出日時 2019-08-16 23:03:02
言語 cLay
(20241019-1)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 248 bytes
コンパイル時間 2,001 ms
コンパイル使用メモリ 173,100 KB
実行使用メモリ 13,824 KB
最終ジャッジ日時 2024-07-05 13:22:41
合計ジャッジ時間 9,153 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample
other TLE * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
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]
  143 | }
      | ^

ソースコード

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),t){
		s+=a[i];
	}
	rep(i,t,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