Help me in solving UNICOURS problem

My issue

Unable to find mistake

My code

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

int main() {
    int t;
    cin >> t;
    while (t--) {
        int s;
        cin >> s;
        vector<int> arr(s);
        unordered_map<int, int> hash;
        for (int i = 0; i < s; i++) {
            cin >> arr[i];
            hash[arr[i]]++;
        }
        cout << s + 1-hash.size() << endl;
    }
    return 0;
}

Problem Link: Courses in an university Practice Coding Problem

You are doing it wrong way
you have to find the maximum no. of prerequisite course and subtract it with n