Submission #1101128

#TimeUsernameProblemLanguageResultExecution timeMemory
1101128rainboyPyramids (IOI24_pyramids)C++17
100 / 100
57 ms9300 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...