Submission #22820140


Source Code Expand

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

int main(){
	int n;
	int a[100000],b[100000],c[100000];
	cin >> n;
	for(int i = 0;i<n;i++){
		cin >> a[i];
	}
	for(int i = 0;i<n;i++){
		cin >> b[i];
	}
	for(int i = 0;i<n;i++){
		cin >> c[i];
	}
	int ans = 0;
	for(int i = 0;i<n;i++){
		for(int j = 0;j<n;j++){
			if(a[i] == b[c[j]-1]){
				ans += 1;
			}
		}
	}
	cout << ans;
	return 0;
}

Submission Info

Submission Time
Task C - Made Up
User hocashi
Language C++ (GCC 9.2.1)
Score 0
Code Size 412 Byte
Status TLE
Exec Time 2205 ms
Memory 4500 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 3
AC × 7
TLE × 15
Set Name Test Cases
Sample sample_00, sample_01, sample_02
All bound_00, bound_01, bound_02, bound_03, sample_00, sample_01, sample_02, test_00, test_01, test_02, test_03, test_04, test_05, test_06, test_07, test_08, test_09, test_10, test_11, test_12, test_13, test_14
Case Name Status Exec Time Memory
bound_00 TLE 2205 ms 4480 KiB
bound_01 TLE 2205 ms 4500 KiB
bound_02 AC 8 ms 3560 KiB
bound_03 AC 2 ms 3536 KiB
sample_00 AC 2 ms 3564 KiB
sample_01 AC 5 ms 3560 KiB
sample_02 AC 2 ms 3648 KiB
test_00 TLE 2205 ms 4300 KiB
test_01 TLE 2205 ms 4440 KiB
test_02 TLE 2205 ms 4396 KiB
test_03 TLE 2205 ms 4324 KiB
test_04 TLE 2205 ms 3896 KiB
test_05 TLE 2205 ms 3872 KiB
test_06 TLE 2205 ms 4272 KiB
test_07 TLE 2205 ms 3968 KiB
test_08 AC 548 ms 3676 KiB
test_09 AC 1341 ms 3860 KiB
test_10 TLE 2205 ms 4456 KiB
test_11 TLE 2205 ms 3976 KiB
test_12 TLE 2205 ms 4452 KiB
test_13 TLE 2205 ms 4140 KiB
test_14 TLE 2205 ms 4328 KiB