Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: qweqwe

Problemset: เธอ ๆ มันเรียงกันยังไงอะ

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-22 15:31:21

#include <bits/stdc++.h>
#define speed cin.tie(0)->sync_with_stdio(0)
#define ll long long
#define pii pair<int,int>
using namespace std;

int main(){
	speed;
	int n;cin >> n;
	if (n==0){
		cout << "sorted!";return 0;
	}
	int temp=INT_MIN;
	for (int i=0;i<n;i++){
		int a;cin >> a;
		if (a<temp){
			cout << "un-sorted!";return 0;
		}temp=a;
	}cout << "sorted!";
	return 0;
}