제출 #863521

#제출 시각아이디문제언어결과실행 시간메모리
863521SyedShajib은행 (IZhO14_bank)C++17
0 / 100
1 ms500 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...