結果

問題 No.182 新規性の虜
ユーザー alpha_virginisalpha_virginis
提出日時 2015-05-24 14:39:40
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 39 ms / 5,000 ms
コード長 521 bytes
コンパイル時間 1,379 ms
コンパイル使用メモリ 149,364 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-27 07:17:49
合計ジャッジ時間 3,011 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,384 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 24 ms
4,380 KB
testcase_09 AC 39 ms
4,380 KB
testcase_10 AC 34 ms
4,376 KB
testcase_11 AC 30 ms
4,380 KB
testcase_12 AC 13 ms
4,380 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 2 ms
4,380 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 25 ms
4,380 KB
testcase_19 AC 18 ms
4,376 KB
testcase_20 AC 11 ms
4,380 KB
testcase_21 AC 27 ms
4,376 KB
testcase_22 AC 14 ms
4,376 KB
testcase_23 AC 1 ms
4,380 KB
testcase_24 AC 30 ms
4,376 KB
testcase_25 AC 17 ms
4,376 KB
testcase_26 AC 6 ms
4,380 KB
testcase_27 AC 1 ms
4,384 KB
evil01.txt AC 41 ms
4,380 KB
evil02.txt AC 41 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

inline long nextInt(void) {
  long temp;
  std::cin >> temp;
  return temp;
}

int main() {

  int N;
  int ans = 0;
  std::vector<long> v;

  std::cin >> N;
  for(int i = 0; i < N; ++i) {
    v.push_back( nextInt() );
  }

  std::sort(v.begin(), v.end());

  v.push_back(-1);

  for(int i = 0; i < N; ++i) {
    for(int j = i+1; j <= N; ++j) {
      if( v[i] != v[j] ) {
	if( j - i == 1 ) {
	  ++ans;
	}
	i = j - 1;
	break;
      }
    }
  }

  std::cout << ans << std::endl;
  
  return 0;
}

0