# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
366854 | leinad2 | 조개 줍기 (KOI17_shell) | C++17 | 2074 ms | 126188 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#define int long long
using namespace std;
int n, i, j, k, a, b, B[1510][1510], ans;
char c;
struct tree
{
int seg[6010], lazy[6010];
void busy(int id, int s, int e, int m)
{
seg[id*2]+=(m-s+1)*lazy[id];
seg[id*2+1]+=(e-m)*lazy[id];
lazy[id*2]+=lazy[id];
lazy[id*2+1]+=lazy[id];
lazy[id]=0;
}
void update(int id, int s, int e, int l, int r, int v)
{
if(l>r)return;
if(e<l||r<s)return;
if(l<=s&&e<=r)
{
seg[id]+=v;
lazy[id]+=v;
return;
}
int m=s+e>>1;
busy(id, s, e, m);
update(id*2, s, m, l, r, v);
update(id*2+1, m+1, e, l, r, v);
컴파일 시 표준 에러 (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... |