Submission #1104483

#TimeUsernameProblemLanguageResultExecution timeMemory
1104483aaaaaarrozPyramids (IOI24_pyramids)C++17
100 / 100
52 ms9300 KiB
#include<bits/stdc++.h> #include "pyramids.h" using namespace std; typedef long long ll; vector<ll> prefixA, prefixB; void init(vector<int> A, vector<int> B) { ll N = A.size(); prefixA.resize(N + 1, 0); prefixB.resize(N + 1, 0); for (ll i = 0; i < N; ++i) { prefixA[i + 1] = prefixA[i] + A[i]; prefixB[i + 1] = prefixB[i] + B[i]; } } bool can_transform(int L, int R, int X, int Y) { ll sumA=(prefixA[R+1]-prefixA[L]); ll sumB=(prefixB[Y+1]-prefixB[X]); if(sumA==sumB){ return true; } else{ return false; } }
#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...