MCPcopy Create free account
hub / github.com/Ayush7614/Daily-Coding-DS-ALGO-Practice / preprocess

Function preprocess

Atcoder dp/N - Slimes.cpp:33–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void preprocess(vector<int>& v, int n)
34{
35 for(int i = 1; i <= n; i++)
36 {
37 for(int j = i; j <= n; j++)
38 {
39 sum[i][j] = v[j] + ((j == i) ? 0 : sum[i][j-1]);
40 }
41 }
42}
43int main() {
44 int n;
45 cin >> n ;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected