Created
April 29, 2023 05:43
-
-
Save modos/d9cef19ed5f30b5febda8c06fd8fd4a1 to your computer and use it in GitHub Desktop.
شارژر تباه
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int main() { | |
int n, x, y, s = 0; | |
cin >> n >> x >> y; | |
int w[n]; | |
for (int i = 0; i < n; i++){ | |
cin >> w[i]; | |
} | |
sort(w, w + n); | |
for (int i = 1; i < n; i++){ | |
s += 100 - w[i]; | |
} | |
int a = *min_element(w, w + n) / x; | |
if (a * y >= s) | |
cout << "YES" << endl; | |
else | |
cout << "NO" << endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment