結果
| 問題 |
No.865 24時間降水量
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-16 21:37:56 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 483 bytes |
| コンパイル時間 | 1,588 ms |
| コンパイル使用メモリ | 170,152 KB |
| 実行使用メモリ | 13,756 KB |
| 最終ジャッジ日時 | 2024-09-22 15:18:40 |
| 合計ジャッジ時間 | 5,473 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | AC * 15 TLE * 1 -- * 2 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
vector<int> A(N);
for(int i=0; i<N; i++) cin >> A[i];
vector<int> S(N+24);
for(int i=0; i<N; i++) for(int j=0; j<24; j++) S[i+j] += A[i];
int Q;
cin >> Q;
while(Q--){
int t, v;
cin >> t >> v;
t--;
for(int j=0; j<24; j++) S[t+j] += v - A[t];
A[t] = v;
cout << *max_element(S.begin(), S.end()) << endl;
}
return 0;
}