-
Notifications
You must be signed in to change notification settings - Fork 0
/
A.cpp
34 lines (33 loc) · 841 Bytes
/
A.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int n, flag(0), cnt(0), fel(-1);
cin >> n;
vector <int> v;
for (int i = 0; i < n; ++i) {
int tmp;
cin >> tmp;
v.push_back(tmp);
}
for (int i = 0; i < n; ++i) {
if (v[i] % 2 == 0) {
cout << 1 << "\n" << i+1 << "\n";
flag = 1;
break;
}
else {
++cnt;
if (fel == -1) fel = i+1;
}
if (cnt == 2) {
flag = 1;
cout << 2 << "\n" << fel << " " << i+1 << "\n";
break;
}
}
if (!flag) cout << -1 << "\n";
}
}