# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1165957 | ines | Pyramids (IOI24_pyramids) | C++20 | 0 ms | 0 KiB |
#include <vector>
#include<numeric>
using namespace std;
vector<int> pyramidsA, pyramidsB;
void init(vector<int> A, vector<int> B) {
pyramidsA = A;
pyramidsB = B;
}
bool can_transform(int L, int R, int X, int Y) {
long long sumA=accumulate(pyramidsA.begin()+L,pyramids.begin()+R+1,0);
long long sumB=accumulate(pyramidsA.begin()+X,pyramids.begin()+Y+1,0);
if (sumA != sumB) {
return false;
}
else{
return true;
}
}