# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
341415 | ivan_tudor | Chessboard (IZhO18_chessboard) | C++14 | 1196 ms | 17576 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>
using namespace std;
const int N = 1e5 + 5;
struct eventhelp{
int t;
int l, r;
int val;
int type;
};
void add_int(int l, int r, long long val, long long &cnti, long long &cntp){
int pare, impare;
int dst = r - l + 1;
pare = dst/2;
impare = dst/2;
if(dst%2 == 1){
if(l%2 == 0)
pare++;
else
impare++;
}
cnti += 1LL * impare * val;
cntp += 1LL * pare * val;
}
vector<eventhelp> ev;
long long ans = LLONG_MAX;
int n;
bool cmpev(eventhelp a, eventhelp b){
if(a.t == b.t)
return a.type > b.type;
return a.t < b.t;
# | 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... |