結果
| 問題 |
No.1234 典型RMQ
|
| コンテスト | |
| ユーザー |
紙ぺーぱー
|
| 提出日時 | 2017-04-26 23:59:18 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 500 bytes |
| コンパイル時間 | 1,589 ms |
| コンパイル使用メモリ | 166,260 KB |
| 実行使用メモリ | 11,168 KB |
| 最終ジャッジ日時 | 2024-07-20 00:47:44 |
| 合計ジャッジ時間 | 16,806 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | AC * 20 TLE * 1 -- * 6 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,N) for(int i=0;i<N;i++)
using namespace std;
typedef long long ll;
constexpr ll ten(int n){return n==0?1:10*ten(n-1);}
const int B=350;
const ll MX=ten(15);
int n,q;
ll a[ten(5)];
int main(){
scanf("%d",&n);
rep(i,n)scanf("%lld",&a[i]);
scanf("%d",&q);
rep(i,q){
int k,l,r,c;
scanf("%d%d%d%d",&k,&l,&r,&c);
l--;
if(k==1)for(int i=l;i<r;i++)a[i]+=c;
else{
ll ma=ten(18);
for(int i=l;i<r;i++)ma=min(ma,a[i]);
printf("%lld\n",ma);
}
}
}
紙ぺーぱー