| # | User | Rating |
|---|---|---|
| 1 | Kevin114514 | 3722 |
| 2 | Benq | 3676 |
| 3 | jiangly | 3640 |
| 4 | turmax | 3450 |
| 5 | tourist | 3408 |
| 6 | strapple | 3360 |
| 7 | Um_nik | 3354 |
| 8 | squareOf105 | 3348 |
| 9 | maroonrk | 3196 |
| 10 | idontwannadothis…e | 3191 |
| # | User | Contrib. |
|---|---|---|
| 1 | maroonrk | 153 |
| 2 | Qingyu | 152 |
| 3 | nik_exists | 151 |
| 4 | AmShZ | 147 |
| 4 | maspy | 147 |
| 6 | Um_nik | 142 |
| 7 | Errichto | 139 |
| 8 | adamant | 136 |
| 9 | BledDest | 134 |
| 10 | AksLolCoding | 132 |
|
0
include<bits/stdc++.h>define ll long longdefine loop(i, n) for (int i = 0; i < n; i++)define loopx(i, x, n) for (int i = x; i < n; i++)define print1(x) cout << x << endldefine print2(x, y) cout << x << " " << y << endldefine print3(x, y, z) cout << x << " " << y << " " << z << endldefine printnl1(x) cout << x << " "define printnl2(x, y) cout << x << " " << y << " "define printnl3(x, y, z) cout << x << " " << y << " " << z << " "using namespace std; int main() { ll n; cin>>n; ll Ar[n]; loop(i,n) cin>>Ar[i]; int flag=0,start=-1,end=-1; for(int i=1;i<n;i++) { if(!flag) { if(Ar[i-1]>Ar[i]) { start=i-1; end=i; flag=1; } } if(flag) { if(Ar[i-1]>Ar[i]) end=i; else { flag=0; } }
if(flag==0&&start!=-1&&end!=-1)
break;
}
if(start==-1&&end==-1)
{
cout<<"yes"<<"\n";
cout<<1<<" "<<1<<"\n";
}else
{
bool check=true;
sort(Ar+start,Ar+end+1);
for(int i=0;i<n-1;i++)
{
if(Ar[i]>Ar[i+1])
{
check=false;
break;
}
}
if(check)
{
cout<<"yes"<<"\n";
cout<<start+1<<" "<<end+1<<"\n";
}else
{
cout<<"no"<<"\n";
}
}} |
| Name |
|---|


