-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA_Hayato_and_School.cpp
More file actions
49 lines (47 loc) · 1.07 KB
/
A_Hayato_and_School.cpp
File metadata and controls
49 lines (47 loc) · 1.07 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 100000005;
vector<bool> p(MAXN, false);
// vector<ll> dp;
vector<ll> seg;
vector<ll> arr;
#define fastio \
{ \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
}
int main()
{
ll t;
cin >> t;
while (t--)
{
ll n;
cin >> n;
vector<ll> odd, even;
for (ll i = 1; i <= n; i++)
{
ll x;
cin >> x;
if (x % 2)
{
odd.push_back(i);
}
else
even.push_back(i);
}
if (odd.size() >= 3)
{
cout << "YES\n";
cout << odd[0] << " " << odd[1] << " " << odd[2] << " " << endl;
}
else if (odd.size() >= 1 && even.size() >= 2)
{
cout << "YES\n";
cout << odd[0] << " " << even[0] << " " << even[1] << endl;
}
else
cout << "NO\n";
}
}