提出 #30040279


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  set<int> a;
  
  for (int i=0;i<N; ++i){
    cin >> A.at(i);
    a.insert(A.at(i));
  }
  int n, m, b;
  n = 0;
  m = 0;
  for (int i=0;i<N; ++i){
    cin >> b;
    if (A.at(i) == b){
      n++;
    }
    else if (a.count(b)){
      m++;
    }
  }
  cout << n << endl;
  cout << m << endl;
  return 0;
}

提出情報

提出日時
問題 B - Hit and Blow
ユーザ nullpoint
言語 C++ (GCC 9.2.1)
得点 200
コード長 436 Byte
結果 AC
実行時間 6 ms
メモリ 3644 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 3
AC × 11
セット名 テストケース
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, 02_same_00.txt, 03_shuffle_00.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 6 ms 3460 KiB
00_sample_01.txt AC 2 ms 3400 KiB
00_sample_02.txt AC 2 ms 3472 KiB
01_random_00.txt AC 3 ms 3576 KiB
01_random_01.txt AC 3 ms 3644 KiB
01_random_02.txt AC 4 ms 3512 KiB
01_random_03.txt AC 4 ms 3640 KiB
01_random_04.txt AC 4 ms 3444 KiB
01_random_05.txt AC 3 ms 3592 KiB
02_same_00.txt AC 3 ms 3444 KiB
03_shuffle_00.txt AC 6 ms 3516 KiB