Submission #9979859


Source Code Expand

Copy
#include <bits/stdc++.h>
#define INF 1e9
using namespace std;

#define REPR(i,n) for(int i=(n); i >= 0; --i)
#define FOR(i, m, n) for(int i = (m); i < (n); ++i)
#define REP(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define ALL(a)  (a).begin(),(a).end()

template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
int gcd(int a,int b){return b?gcd(b,a%b):a;}
typedef long long ll;
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}


int main() {
    set<int> A;
    int N;
    cin >> N;
    REP(i,N) {
        int a;
        cin >> a;
        A.insert(a);
    }

    if (A.size() != N) {
        cout << "NO" << endl;
        return 0;
    }

    cout << "YES" << endl;
    return 0;
}

Submission Info

Submission Time
Task C - Distinct or Not
User reud
Language C++14 (GCC 5.4.1)
Score 300
Code Size 848 Byte
Status AC
Exec Time 178 ms
Memory 9600 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 13
Set Name Test Cases
Sample 01.txt, 02.txt, 03.txt
All 01.txt, 02.txt, 03.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 20.txt
Case Name Status Exec Time Memory
01.txt AC 1 ms 256 KB
02.txt AC 1 ms 256 KB
03.txt AC 1 ms 256 KB
11.txt AC 172 ms 9600 KB
12.txt AC 107 ms 6784 KB
13.txt AC 1 ms 256 KB
14.txt AC 178 ms 9600 KB
15.txt AC 155 ms 8704 KB
16.txt AC 160 ms 9216 KB
17.txt AC 3 ms 384 KB
18.txt AC 172 ms 9600 KB
19.txt AC 171 ms 9600 KB
20.txt AC 99 ms 6400 KB