-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA1780.java
More file actions
36 lines (30 loc) · 826 Bytes
/
A1780.java
File metadata and controls
36 lines (30 loc) · 826 Bytes
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
import static java.lang.System.out;
import java.util.*;
public class A1780{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
int t = in.nextInt();
while(t-->0){
int n = in.nextInt();
ArrayList<Integer> odd = new ArrayList<Integer>();
ArrayList<Integer> even = new ArrayList<Integer>();
for(int i =0;i<n;i++){
int input = in.nextInt();
if(input%2 ==0){
even.add(i+1);
}else {
odd.add(i+1);
}
}
if(odd.size()>=3){
out.println("YES");
out.print(odd.get(0)+" ");out.print(odd.get(1)+" ");out.print(odd.get(2)+"\n");
}else if(odd.size()>=1 && even.size()>=2){
out.println("YES");
out.print(odd.get(0)+" ");out.print(even.get(0)+" ");out.print(even.get(1)+"\n");
}else {
out.print("NO\n");
}
}
}
}