Source Code
#include<iostream>

using namespace std ;
int main()
{
   
   int n ; 
   cin>>n;
   long long seats[n];
   for(long long i =0 ; i<n ;i++)cin>>seats[i];
   for(long long i =0 ; i<n-1; i++)
   {
       if(seats[i]>=seats[i+1])
       {
           cout<<"NO";
           return 0;
       }
   }
   cout<<"YES";
}
Copy
Anton Can't See (⊙︿⊙)_/¯ Joud
GNU G++17
42 ms
1.5 MB
Accepted