/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Wrong Answer 3ms 316.0 KiB

Code

#include<bits/stdc++.h>
using namespace std;
void ans();
int main(){
    int t; cin >> t;
    while(t--) ans();
}
void ans() {
    int n; cin >> n;
    int arr[n+1];
    for(int i=0;i<n;i++) cin >> arr[i];
    int ok=0;
    for(int i=0;i<n;i++){
        if(arr[i]==arr[i+1]){
            ok=1;
            break;
        }
    }
    if(ok==0) cout << "YES" << endl;
    else cout << "NO" << endl;
}

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 16:10:25
Judged At
2024-11-11 03:33:22
Judged By
Score
0
Total Time
3ms
Peak Memory
532.0 KiB