답안 #562768

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
562768 2022-05-15T09:32:09 Z SSRS Sterilizing Spray (JOI15_sterilizing) C++14
5 / 100
5000 ms 3720 KB
#include <bits/stdc++.h>
using namespace std;
int main(){
  int N, Q, K;
  cin >> N >> Q >> K;
  vector<int> C(N);
  for (int i = 0; i < N; i++){
    cin >> C[i];
  }
  for (int i = 0; i < Q; i++){
    int S, T, U;
    cin >> S >> T >> U;
    if (S == 1){
      T--;
      C[T] = U;
    }
    if (S == 2){
      T--;
      for (int j = T; j < U; j++){
        C[j] /= K;
      }
    }
    if (S == 3){
      T--;
      long long ans = 0;
      for (int j = T; j < U; j++){
        ans += C[j];
      }
      cout << ans << endl;
    }
  }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 340 KB Output is correct
2 Correct 4 ms 212 KB Output is correct
3 Correct 2 ms 308 KB Output is correct
4 Correct 6 ms 340 KB Output is correct
5 Correct 10 ms 384 KB Output is correct
6 Correct 10 ms 340 KB Output is correct
7 Correct 9 ms 380 KB Output is correct
8 Correct 10 ms 384 KB Output is correct
9 Correct 10 ms 340 KB Output is correct
10 Correct 10 ms 332 KB Output is correct
11 Correct 10 ms 340 KB Output is correct
12 Correct 9 ms 392 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4234 ms 2836 KB Output is correct
2 Correct 2578 ms 2520 KB Output is correct
3 Correct 4067 ms 2800 KB Output is correct
4 Execution timed out 5047 ms 3004 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 171 ms 776 KB Output is correct
2 Correct 336 ms 828 KB Output is correct
3 Correct 522 ms 876 KB Output is correct
4 Correct 1197 ms 1816 KB Output is correct
5 Correct 4593 ms 2300 KB Output is correct
6 Correct 4568 ms 2108 KB Output is correct
7 Correct 4751 ms 2548 KB Output is correct
8 Correct 4925 ms 2260 KB Output is correct
9 Execution timed out 5040 ms 1448 KB Time limit exceeded
10 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1745 ms 2244 KB Output is correct
2 Correct 1995 ms 2500 KB Output is correct
3 Correct 1079 ms 1820 KB Output is correct
4 Correct 1496 ms 2352 KB Output is correct
5 Correct 4690 ms 3528 KB Output is correct
6 Correct 4636 ms 3528 KB Output is correct
7 Correct 4651 ms 3512 KB Output is correct
8 Correct 4646 ms 3720 KB Output is correct
9 Execution timed out 5023 ms 2252 KB Time limit exceeded
10 Halted 0 ms 0 KB -