Wrong Answer
Code
#include <bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define endl '\n'
#define Endl '\n'
using namespace std;
const int N = 2e5 + 5;
int tc, n, m, a[N];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0); // cout.tie(0);
cin >> tc;
while (tc--) {
set<int> st;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
st.insert(a[i]);
}
if (*st.begin() == 1 && *st.end() == n) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1055 Array Permutation
- Contest
- Brain Booster #3
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-05-06 15:03:57
- Judged At
- 2024-11-11 03:35:22
- Judged By
- Score
- 0
- Total Time
- 2ms
- Peak Memory
- 568.0 KiB