# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
440524 | KULIKOLD | 가로등 (APIO19_street_lamps) | C++17 | 295 ms | 17092 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
//#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl '\n'
const int DIM = 3E5+7;
int n,q;
int A[DIM];
struct node{
int type,a,b;
} Q[DIM];
const int SZ = 107;
vector<node> V[SZ];
int ans[DIM];
void solve(){
for(int i = q;i>=1;--i){
V[i] = V[i+1];
if (Q[i].type==1)
V[i].push_back({i,Q[i].a,Q[i].b});
}
for(int i = 1;i<=q;++i){
for(auto to:V[i]){
ll flag = 0;
for(int j = to.a;j<to.b;++j){
if (!A[j]){
flag = 1;
break;
}
}
if (!flag)
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |