Skip to content

Instantly share code, notes, and snippets.

@Caesar-Victory
Last active October 26, 2022 02:50
Show Gist options
  • Save Caesar-Victory/a00b706fd1204138bafebf7cb370abb9 to your computer and use it in GitHub Desktop.
Save Caesar-Victory/a00b706fd1204138bafebf7cb370abb9 to your computer and use it in GitHub Desktop.
#C++
deque<int> train;
for (int i = 0; i < n; i++) {
// 向右错一位,因为默认和初始值均为1
preSum[i+1] = preSum[i] + nums[i];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment