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 "pyramids.h"
#include <vector>
using namespace std;
typedef vector<int> vi;
const int N = 100000;
long long ssa[N + 1], ssb[N + 1], n;
void init(vi aa, vi bb) {
n = aa.size();
for (int i = 0; i < n; i++)
ssa[i + 1] = ssa[i] + aa[i];
for (int i = 0; i < n; i++)
ssb[i + 1] = ssb[i] + bb[i];
}
bool can_transform(int l1, int r1, int l2, int r2) {
return ssa[r1 + 1] - ssa[l1] == ssb[r2 + 1] - ssb[l2];
}
# | 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... |