# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
481551 | SlavicG | Restore Array (RMI19_restore) | C++17 | 130 ms | 484 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "bits/stdc++.h"
using namespace std;
#define ll long long
#define forn(i,n) for(int i=0;i<n;i++)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(),v.rend()
#define pb push_back
#define sz(a) (int)a.size()
bool check(vector<int>& a, vector<array<int,4>>& q)
{
int n = sz(a), m = sz(q);
vector<int> p(n);
forn(i, n){
p[i] = a[i];
if(i)p[i] += p[i - 1];
}
bool ok = true;
for(int i = 0;i < m;++i){
int l = q[i][0], r = q[i][1], k = q[i][2], val = q[i][3];
int zeroes = (r - l + 1) - p[r];
if(l)zeroes += p[l - 1];
int number = 0;
if(zeroes >= k)number = 0;
# | 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... |