This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <vector>
#include <algorithm>
int main() {
int N, M;
std::cin >> N >> M;
std::vector<int> salary(N), banknotes(M);
int totalSalary = 0, totalBanknotes = 0;
for (int i = 0; i < N; ++i) {
std::cin >> salary[i];
totalSalary += salary[i];
}
for (int i = 0; i < M; ++i) {
std::cin >> banknotes[i];
totalBanknotes += banknotes[i];
}
if (totalBanknotes >= totalSalary) {
std::cout << "YES" << std::endl;
} else {
std::cout << "NO" << std::endl;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |