結果

問題 No.182 新規性の虜
ユーザー EspeceEspece
提出日時 2017-12-19 15:48:11
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 822 bytes
コンパイル時間 929 ms
コンパイル使用メモリ 80,544 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-10 01:14:57
合計ジャッジ時間 2,121 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 12 ms
5,376 KB
testcase_09 AC 19 ms
5,376 KB
testcase_10 AC 17 ms
5,376 KB
testcase_11 AC 14 ms
5,376 KB
testcase_12 AC 7 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 WA -
testcase_15 AC 1 ms
5,376 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 2 ms
5,376 KB
testcase_24 AC 14 ms
5,376 KB
testcase_25 AC 10 ms
5,376 KB
testcase_26 AC 4 ms
5,376 KB
testcase_27 AC 2 ms
5,376 KB
evil01.txt AC 16 ms
5,376 KB
evil02.txt AC 16 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<cstring>
#include<complex>
#include<vector>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<iomanip>
using namespace std;

#define REP(i, j) for (int i = 0; i < (int)j; ++i)
#define FOR(i, j, k) for (int i = (int)j; i < (int)k; ++i)
#define SORT(v) sort(v.begin(), v.end())
#define REVERSE(v) reverse(v.begin(), v.end())
typedef complex<double> P;
typedef vector<int> VI;
typedef long long LL;
typedef pair<int,int> PII;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n;
	cin >> n;
	vector<LL> v;
	REP(i,n) {
		LL a;
		cin >> a;
		v.push_back(a);
	}
	SORT(v);
	v.push_back(-1);

	int ans = 0;
	LL p = v[0];
	FOR(i,1,n+1) {
		if (p != v[i]) {
			ans++;
			p = v[i];
		} else {
			while (p == v[i]) i++;
		}
	}

	cout << ans << endl;

	return 0;
}
0