ログイン
新規登録
AtsuoCoder Waseda Tour Finals 2025
読込中…
Home
Tasks
Clar
Submissions
Standings
提出 5dc0a859-5762-4d92-89f4-1b669c39e647
コード
#include <iostream> // cout, endl, cin #include <string> // string, to_string, stoi #include <vector> // vector #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <utility> // pair, make_pair #include <tuple> // tuple, make_tuple #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include <map> // map #include <queue> // queue, priority_queue #include <set> // set #include <stack> // stack #include <deque> // deque #include <unordered_map> // unordered_map #include <unordered_set> // unordered_set #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <cmath> // pow, sqrt #include <iomanip> // setprecision #define int int64_t #define double long double using namespace std; signed main() { //cout << fixed << setprecision(10); int n; cin >> n; vector<int> P(n + 1, 0); for (int i = 1; i <= n; i++) cin >> P.at(i); int d; cin >> d; for (int i = 0; i < d; i++) { int l, r, x, a, b; cin >> l >> r >> x >> a >> b; for (int j = l; j <= r; j++) P.at(j) += x; int ans = 0; for (int j = a; j <= b; j++) ans = max(ans, P.at(j)); cout << ans << endl; } return 0; }
結果
問題
点数
言語
結果
実行時間
メモリ
H - Gardening Diary
50
C++
TLE
2101 ms
4896 KiB