# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
854967 | vjudge1 | Nuclearia (CEOI15_nuclearia) | C++17 | 915 ms | 910364 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#define pb push_back
#define pli pair<int,int>
#define fi first
#define se second
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);
using namespace std;
using ll=long long;
const ll maxN=2e5;
const ll inf=1e18;
const ll mod=1e9+7;
ll h,w;
vector<vector<ll>> p1,p2,p3;
vector<ll>a2,pre;
ll cd=0;
void add(ll x,ll y,ll a,ll b)
{
ll r=(a-1)/b;
// p1 p2 p3
// p1 la prefix sum cho a
// p2 la prefix sum cho b cheo 1
// p3 la prefix sum cho b cheo 2
p1[max(1ll,x-r)][max(1ll,y-r)]+=a-(r+1)*b;
p1[min(x+r+1,w+1)][max(1ll,y-r)]-=a-(r+1)*b;
p1[max(1ll,x-r)][min(h+1,y+r+1)]-=a-(r+1)*b;
p1[min(w+1,x+r+1)][min(h+1,y+r+1)]+=a-(r+1)*b;
ll k=min({x-1,y-1,r});
p2[x-k][y-k]+=b;
if(k!=r&&x<y)
# | 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... |
# | 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... |
# | 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... |