Submission #40028198


Source Code Expand

#include <cctype>
#include <cmath>
#include <iostream>
#include <set>
using namespace std;
int n;
int main() {
  int ans = 0;
  set<int> st;
  cin.tie(0)->sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    if (st.count(x)) {
      ans++;
      st.erase(x);
    } else {
      st.insert(x);
    }
  }
  cout << ans << '\n';
  return 0;
}

Submission Info

Submission Time
Task C - Socks
User swiftc
Language C++ (Clang 10.0.0)
Score 300
Code Size 402 Byte
Status AC
Exec Time 706 ms
Memory 26500 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 34
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt, 01_random_22.txt, 01_random_23.txt, 01_random_24.txt, 01_random_25.txt, 01_random_26.txt, 02_sorted_00.txt, 02_sorted_01.txt, 02_sorted_02.txt, 02_sorted_03.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 9 ms 3132 KiB
00_sample_01.txt AC 2 ms 3012 KiB
00_sample_02.txt AC 2 ms 3116 KiB
01_random_00.txt AC 304 ms 3100 KiB
01_random_01.txt AC 292 ms 3148 KiB
01_random_02.txt AC 292 ms 3064 KiB
01_random_03.txt AC 323 ms 3080 KiB
01_random_04.txt AC 320 ms 3148 KiB
01_random_05.txt AC 317 ms 3088 KiB
01_random_06.txt AC 324 ms 3148 KiB
01_random_07.txt AC 319 ms 3128 KiB
01_random_08.txt AC 319 ms 3060 KiB
01_random_09.txt AC 337 ms 3016 KiB
01_random_10.txt AC 336 ms 3180 KiB
01_random_11.txt AC 320 ms 3076 KiB
01_random_12.txt AC 367 ms 3112 KiB
01_random_13.txt AC 370 ms 2976 KiB
01_random_14.txt AC 368 ms 3116 KiB
01_random_15.txt AC 403 ms 3100 KiB
01_random_16.txt AC 403 ms 3184 KiB
01_random_17.txt AC 401 ms 3108 KiB
01_random_18.txt AC 432 ms 3260 KiB
01_random_19.txt AC 431 ms 3248 KiB
01_random_20.txt AC 432 ms 3392 KiB
01_random_21.txt AC 525 ms 7956 KiB
01_random_22.txt AC 528 ms 8536 KiB
01_random_23.txt AC 532 ms 9036 KiB
01_random_24.txt AC 706 ms 26412 KiB
01_random_25.txt AC 660 ms 26500 KiB
01_random_26.txt AC 662 ms 26496 KiB
02_sorted_00.txt AC 417 ms 14868 KiB
02_sorted_01.txt AC 419 ms 14788 KiB
02_sorted_02.txt AC 400 ms 8964 KiB
02_sorted_03.txt AC 625 ms 8964 KiB