这是翻译的源码:
### 题意翻译
给定一个由 $N$ 个整数构成的序列 $A$ (与之前任务中的序列不同)。在序列 $A$ 中,如果第 $i$ 个元素等于位置严格小于 $i$ 的三个元素的和(同一个元素可以使用多次)。那么这个序列包含多少个好元素?
### 输入格式
输入的第一行包含一个正整数 $N$ $(1 \leq N \leq 5000)$,表示序列 A 的长度。
第二行包含 $N$ 个用空格分隔的整数,表示序列 $A$ $(-100000 \leq A_{i} \leq 100000)$。
### 输出格式
输出仅第一行,包含序列中的好元素数量。
###### 此翻译由@under_hole 提供
下面看效果:
给定一个由 N 个整数构成的序列 A (与之前任务中的序列不同)。在序列 A 中,如果第 i 个元素等于位置严格小于 i 的三个元素的和(同一个元素可以使用多次)。那么这个序列包含多少个好元素?
输入的第一行包含一个正整数 N (1≤N≤5000),表示序列 A 的长度。
第二行包含 N 个用空格分隔的整数,表示序列 A (−100000≤Ai≤100000)。
输出仅第一行,包含序列中的好元素数量。
此题在爬取时题目少了,现提供原题面:
You are given a sequence A consisting of N integers (not to be confused with the sequence from a previous task). We will call the ith sequence element good if it equals the sum of some three elements in positions strictly smaller than i (an element can be used more than once in the sum). How many good elements does the sequence contain?
此题在爬取时样例少了,现提供样例#2和#3:
6
1 2 3 5 7 10
4
3
-1 2 0
1