| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1210824 | Double_Slash | Sterilizing Spray (JOI15_sterilizing) | C++20 | 5090 ms | 1268 KiB |
#include <bits/stdc++.h>
#define debug(x) ([&] { auto _x = x; cerr << __LINE__ << ": " << #x << " = " << _x << endl; return _x; }())
using namespace std;
using ll = long long;
int main() {
int n, q, K;
cin >> n >> q >> K;
int x[n];
for (int &xi: x) cin >> xi;
while (q--) {
int s, t, u;
cin >> s >> t >> u;
if (s == 1) x[t - 1] = u;
else if (s == 2) {
for (int i = t - 1; i <= u - 1; ++i) x[i] /= K;
} else {
ll ans = 0;
for (int i = t - 1; i <= u - 1; ++i) ans += x[i];
cout << ans << endl;
}
}
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
