#include #include #include #include #include #include #include void canConstruct(int a_size, int* a) { if( a[a_size-1]%3==0) { printf("Yes\n"); } else { printf("No\n"); } // Return "Yes" or "No" denoting whether you can construct the required number. } int main() { int t; scanf("%i", &t); for(int a0 = 0; a0 < t; a0++){ int n; scanf("%i", &n); int *a = malloc(sizeof(int) * n); for (int a_i = 0; a_i < n; a_i++) { scanf("%i",&a[a_i]); } int result_size; canConstruct(n, a); } return 0; }