#include using namespace std; int main() { int t; cin>>t; while(t--) { int n; cin>>n; int a[n+1]; for(int i=0;i>a[i]; long long sum=0; for(int i=0;i