{"raw_statement":[{"iden":"statement","content":"给定一个长度为 $n$ 的数组 $a$，求有多少对 $i,j,k(1\\leq i<j<k\\leq n)$，满足 $a_k-a_j=a_j-a_i$。"},{"iden":"input","content":"第一行一个整数 $n$，第二行 $n$ 个正整数 $a_i$。"},{"iden":"output","content":"一行一个整数表示所求的结果。"},{"iden":"note","content":"数据保证，$1\\leq n\\leq 10^5$，$1\\leq a_i\\leq 3\\times 10^4$。"}],"translated_statement":null,"sample_group":[["10\n3 5 3 6 3 4 10 4 5 2","9"]],"show_order":[],"formal_statement":null,"simple_statement":null,"has_page_source":false}