Advertisement
anhkiet2507

Basic Array

Feb 27th, 2022
1,849
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. int main(){
  2.     int t;
  3.     cin >> t;
  4.     while (t--) {
  5.         int n;
  6.         cin >> n;
  7.         int arr[n];
  8.         for(int i = 0; i < n ; i++){
  9.             cin >> arr[i];
  10.         }
  11.         cout << maxIndexDiff(arr, n);
  12.         cout << endl;
  13.     }
  14.  
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement