Arithmetic Slices --leetcode

#include <iostream> #include <vector> using namespace std; int numberOfArithmeticSlices1(vector<int>& A) { vector<int> vec(A.size() - 2, 0); for (int i = 2; i < A.size(); i++){ if (A[i - 1] - A[i - 2]
相關文章
相關標籤/搜索