提出 #9979859
ソースコード 拡げる
#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;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | C - Distinct or Not |
| ユーザ | reud |
| 言語 | C++14 (GCC 5.4.1) |
| 得点 | 300 |
| コード長 | 848 Byte |
| 結果 | AC |
| 実行時間 | 178 ms |
| メモリ | 9600 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 300 / 300 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| 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 |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 01.txt | AC | 1 ms | 256 KiB |
| 02.txt | AC | 1 ms | 256 KiB |
| 03.txt | AC | 1 ms | 256 KiB |
| 11.txt | AC | 172 ms | 9600 KiB |
| 12.txt | AC | 107 ms | 6784 KiB |
| 13.txt | AC | 1 ms | 256 KiB |
| 14.txt | AC | 178 ms | 9600 KiB |
| 15.txt | AC | 155 ms | 8704 KiB |
| 16.txt | AC | 160 ms | 9216 KiB |
| 17.txt | AC | 3 ms | 384 KiB |
| 18.txt | AC | 172 ms | 9600 KiB |
| 19.txt | AC | 171 ms | 9600 KiB |
| 20.txt | AC | 99 ms | 6400 KiB |