You are viewing a single comment's thread. Return to all comments →
cpp
One should take the input in this way
int n; cin >> n; vector intVector(n); for (int i = 0; i < n; i++) { cin >> intVector[i]; }
int s; cin >> s; vector<string> strVector(s); for (int i = 0; i < s; i++) { cin >> strVector[i]; }
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Day 21: Generics
You are viewing a single comment's thread. Return to all comments →
cpp
One should take the input in this way
int n; cin >> n; vector intVector(n); for (int i = 0; i < n; i++) { cin >> intVector[i]; }