結果

問題 No.182 新規性の虜
ユーザー ldsybldsyb
提出日時 2016-02-27 14:29:37
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 334 bytes
コンパイル時間 976 ms
コンパイル使用メモリ 58,060 KB
実行使用メモリ 8,356 KB
最終ジャッジ日時 2023-10-24 18:34:26
合計ジャッジ時間 10,697 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <algorithm>
using namespace std;

int main(){
   int ans = 0,count,n;
   cin >> n;
   long long a[n];
   for(int i = 0;i < n;i++) cin >> a[i];
   for(int i = 0;i < n;i++){
      count = 0;
      for(int j = 0;j < n;j++) if(a[i] == a[j]) count++;
      if(count == 2) ans++;
   }
   cout << ans << endl;
}
0