Submission #06955


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include<bits/stdc++.h>
using namespace std;
inline void chmin(int& a, int b) { a = min(a, b); }
const int INF = INT_MAX;
char buff[32];
int N, A[1 << 17];
int main()
{
scanf("%d", &N);
for(int i = 0; i < N; i++) {
scanf("%d", &A[i]);
}
for(int a, b; scanf(" %s", buff), buff[0] != 'e'; ) {
if(buff[0] == 'u') {
scanf("%d %d", &a, &b);
A[a] = b;
} else {
scanf("%d %d", &a, &b);
int ret = INF;
for(int i = a; i <= b; i++) chmin(ret, A[i]);
printf("%d\n", ret);
}
}
}

ステータス

項目 データ
問題 0459 - セグメントツリー練習
ユーザー名 ei1333
投稿日時 2016-07-12 20:58:55
言語 C++11
状態 Accepted
得点 10
ソースコード長 557 Byte
最大実行時間 67 ms
最大メモリ使用量 1012 KB

セット

セット 得点 Cases
1 ALL 10 / 10 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
Input01 AC 20 ms 480 KB
1
Input02 AC 14 ms 456 KB
1
Input03 AC 19 ms 564 KB
1
Input04 AC 21 ms 672 KB
1
Input05 AC 20 ms 520 KB
1
Input06 AC 18 ms 500 KB
1
Input07 AC 16 ms 480 KB
1
Input08 AC 23 ms 584 KB
1
Input09 AC 25 ms 684 KB
1
Input10 AC 67 ms 1012 KB
1