# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
101116 | gs14004 | Worst Reporter 3 (JOI18_worst_reporter3) | C++17 | 717 ms | 19820 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 500005;
typedef long long lint;
typedef pair<int, int> pi;
const int mod = 1e9 + 7;
int n, q, a[MAXN];
vector<pi> cnd;
int main(){
scanf("%d %d",&n,&q);
int prv = 1;
a[0] = 1;
for(int i=1; i<=n; i++){
scanf("%d",&a[i]);
prv = ((a[i] - 1) / prv + 1) * prv;
a[i] = prv;
}
for(int i=0; i<=n; ){
int e = i;
while(e <= n && a[i] == a[e]) e++;
cnd.push_back(pi(a[i], e - i));
i = e;
}
while(q--){
int l, r, t;
scanf("%d %d %d",&t,&l,&r);
int curp = t+1;
int ans = 0, pos = 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... |