In the question of find outside array
include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while (t–) {
int n;
cin >> n;
vector < int > vvrs(n);
for (int i = 0; i < n; i++) {
cin >> vvrs[i];
}
int vvrsMaxi = * max_element(vvrs.begin(), vvrs.end());
int vvrsMini = * min_element(vvrs.begin(), vvrs.end());
if (vvrsMini < 0) {
cout << vvrsMini << " " << vvrsMini << endl;
}
else if (vvrsMaxi > 0) {
cout << vvrsMaxi << " " << vvrsMaxi << endl;
}
else {
cout << -1 << endl;
}
}
}
I have wrongly plagiarised how can you plagiarism me because you can observe the number of contests and the problem
Solving and the respective timings.I have solved this problem with my own intuition and getting to the variable names everyone will keep the same maxi and mini but I kept my own variables with slight change I kindly request you to remove my plagiarism and i can continue writing more contest and improve my self.
If you want any explanation regarding this solution I can also keep my working in notebook.
And I also want to mention that you observe the account I plagiarised with from the contest one he is being plagiarised with some one and this is unfair to plagiarism me with this cheated person so I request you to kindly remove the plagiarism for my account and ban his account for the future contests.
The link of cheating guy:CodeChef: Practical coding for everyone