MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / pow

Method pow

Math/FWHT.cpp:54–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 return vector<int> (P1, P1 + n);
53 }
54 vector<int> pow(int n, vector<int> A, long long k, int flag = XOR) {
55 assert(__builtin_popcount(n) == 1);
56 A.resize(n);
57 for (int i = 0; i < n; i++) P1[i] = A[i];
58 wt(P1, n, flag);
59 for(int i = 0; i < n; i++) P1[i] = POW(P1[i], k);
60 iwt(P1, n, flag);
61 return vector<int> (P1, P1 + n);
62 }
63}t;
64int32_t main() {
65 int n; cin >> n;

Callers 1

mainFunction · 0.45

Calls 2

resizeMethod · 0.80
POWFunction · 0.70

Tested by

no test coverage detected