結果

問題 No.182 新規性の虜
ユーザー kiyunetsubamnakiyunetsubamna
提出日時 2015-05-25 03:06:07
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 3,102 ms / 5,000 ms
コード長 469 bytes
コンパイル時間 413 ms
コンパイル使用メモリ 51,380 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-27 07:18:25
合計ジャッジ時間 18,734 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 829 ms
4,380 KB
testcase_09 AC 2,197 ms
4,376 KB
testcase_10 AC 1,651 ms
4,380 KB
testcase_11 AC 1,134 ms
4,376 KB
testcase_12 AC 210 ms
4,380 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 2 ms
4,380 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 414 ms
4,376 KB
testcase_19 AC 279 ms
4,376 KB
testcase_20 AC 146 ms
4,376 KB
testcase_21 AC 482 ms
4,380 KB
testcase_22 AC 200 ms
4,376 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 AC 3,102 ms
4,380 KB
testcase_25 AC 15 ms
4,376 KB
testcase_26 AC 41 ms
4,376 KB
testcase_27 AC 2 ms
4,376 KB
evil01.txt AC 3,098 ms
4,376 KB
evil02.txt AC 3,108 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;

int main(){
	int a[100000];
	int flag=0;
	int cnt[100000] = {0};
	int count = 0;
	int n;
	cin >> n;
	for (int i1 = 0; i1 < n; i1++){
		flag = 0;
		cin >> a[i1];
		for (int i2 = 0; i2 < i1; i2++){
			if (a[i1] == a[i2]){
				cnt[i2] = 0;
				flag = 1;
				break;
			}
		}
		if (flag == 0){
			cnt[i1] = 1;
		}
	}
	for (int i3 = 0; i3 < n; i3++){
		if (cnt[i3] == 1){
			count += 1;
		}
	}


	cout << count << endl;


	return 0;
}
0