# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
959271 | typ_ik | Sterilizing Spray (JOI15_sterilizing) | C++17 | 5102 ms | 3696 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx,avx2")
#define ll long long
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define watch(x) cout << (#x) << " : " << x << '\n'
#define boost ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
const int N = 100100;
int c[N];
void solve() {
int n, q, k;
cin >> n >> q >> k;
for (int i = 1; i <= n; i++)
cin >> c[i];
while (q--) {
int s, l, r;
cin >> s >> l >> r;
if (s == 1) {
c[l] = r;
}
if (s == 2) {
for (int x = l; x <= r; x++)
c[x] /= k;
}
if (s == 3) {
ll ans = 0ll;
for (int x = l; x <= r; x++)
ans += c[x];
cout << ans << '\n';
}
}
}
main() {
boost;
solve();
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |