Submission #1313286

#TimeUsernameProblemLanguageResultExecution timeMemory
1313286pushpita$ah@Pyramids (IOI24_pyramids)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; static vector<long long> sumA, sumB; void init(vector<int> A, vector<int> B) { int n = A.size(); for(int i = 0; i < n; i++){ sumA[i+1] = sumA[i] + A[i]; sumB[i+1] = sumB[i] + B[i]; } } bool can_transform(int l, int r, int x, int y) { for(int i = l; i <=r; i++){ sumA= sumA + A[i]; } for(int i = x; i <= r; i++){ sumB = sumB + B[i]; } return sumA == sumB; }

Compilation message (stderr)

pyramids.cpp: In function 'bool can_transform(int, int, int, int)':
pyramids.cpp:17:22: error: 'A' was not declared in this scope
   17 |         sumA= sumA + A[i];
      |                      ^
pyramids.cpp:20:23: error: 'B' was not declared in this scope
   20 |         sumB = sumB + B[i];
      |                       ^