結果

問題 No.182 新規性の虜
ユーザー zxczxc
提出日時 2016-01-18 06:05:00
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 676 bytes
コンパイル時間 797 ms
コンパイル使用メモリ 68,552 KB
実行使用メモリ 8,480 KB
最終ジャッジ日時 2023-10-20 00:34:22
合計ジャッジ時間 23,076 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 1 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 1,819 ms
4,348 KB
testcase_09 AC 4,846 ms
4,348 KB
testcase_10 AC 3,602 ms
4,348 KB
testcase_11 AC 2,448 ms
4,348 KB
testcase_12 AC 443 ms
4,348 KB
testcase_13 AC 1 ms
4,348 KB
testcase_14 AC 2 ms
4,348 KB
testcase_15 AC 2 ms
4,348 KB
testcase_16 AC 1 ms
4,348 KB
testcase_17 AC 1 ms
4,348 KB
testcase_18 AC 527 ms
4,348 KB
testcase_19 AC 371 ms
4,348 KB
testcase_20 AC 218 ms
4,348 KB
testcase_21 AC 598 ms
4,348 KB
testcase_22 AC 282 ms
4,348 KB
testcase_23 AC 2 ms
4,348 KB
testcase_24 TLE -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
evil01.txt -- -
evil02.txt -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <iterator>
#include <algorithm>
#include <vector>

int main(){
  std::vector<int> vc;
  size_t N;
  std::cin >> N;
  vc.resize(N);
  for(auto& elm: vc ){
        std::cin>> elm;
  }
  std::vector<int> vc2;
  const int dead_value(0);
  vc2.resize(vc.size(),dead_value);
  std::sort( std::begin(vc), std::end(vc));
  std::unique_copy(std::begin(vc),std::end(vc),std::begin(vc2) );
  std::unique( std::begin(vc2), std::end(vc2) );
  size_t cnt{0};
  for(const auto& elm:vc2){
     if(elm == 0)break;
     if(1==count_if( std::begin(vc), std::end(vc) ,[=](const int i)->bool{return i==elm;})){
        cnt++;
     }
  }
  std::cout<<cnt<<std::endl;

}
0