-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1380A.cpp
More file actions
47 lines (45 loc) · 873 Bytes
/
Copy path1380A.cpp
File metadata and controls
47 lines (45 loc) · 873 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
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <iostream>
#include <vector>
using namespace std;
int main()
{
int t,T;
cin >> T;
for(t=0;t<T;t++)
{
int n,i,f=0,j;
cin >> n;
vector<int>arr(n+1);
for(i=1;i<=n;i++)
{
cin >> arr[i];
}
for(i=2;i<=n;i++)
{
if(arr[i-1] < arr[i])
{
for(j=i+1;j<=n;j++)
{
if(arr[j] < arr[i])
{
f=1;
break;
}
}
}
if(f==1)
{
break;
}
}
if(f == 1)
{
cout << "YES" << endl;
cout << i-1 << " " << i << " " << j << endl;
}
else
{
cout << "NO" << endl;
}
}
}