#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> int main() { int N = 0; scanf("%d", &N); int arr[40] = { 0 }; int i = 0; int sum1 = 0; int sum2 = 0; for (i = 0; i < N; i++) { scanf("%d", &arr[i]); } for (i = 1; i < N; i++) { if (arr[i] > arr[i - 1] || arr[i] == arr[i - 1]) {...