buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
#include <bits/stdc++.h>
//#define int long long int
using namespace std;
typedef long long int ll;
int main() {
ll N, M;
cin >> N >> M;
vector<int> v;
for (int i = 0; i < N; i++) {
int temp;
cin >> temp;
v.push_back(temp);
}
int sum = 0;
for (auto it : v)
sum += it;
sum = sum / (4 * M)... | #include <bits/stdc++.h>
//#define int long long int
using namespace std;
typedef long long int ll;
int main() {
ll N, M;
cin >> N >> M;
vector<int> v;
for (int i = 0; i < N; i++) {
int temp;
cin >> temp;
v.push_back(temp);
}
double sum = 0;
for (auto it : v)
sum += it;
sum = sum / (4 *... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 135 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <forward_list>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#include <vector>
#define rep(i, s, g) for ((i) = (s); (i) < ... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <forward_list>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#include <vector>
#define rep(i, s, g) for ((i) = (s); (i) < ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 208 |
#include <bits/stdc++.h>
using namespace std;
template <typename T> istream &operator>>(istream &istr, vector<T> &v) {
for (T &x : v)
istr >> x;
return istr;
}
template <typename T, typename U>
istream &operator>>(istream &istr, pair<T, U> &p) {
istr >> p.first >> p.second;
return istr;
}
template <typen... | #include <bits/stdc++.h>
using namespace std;
template <typename T> istream &operator>>(istream &istr, vector<T> &v) {
for (T &x : v)
istr >> x;
return istr;
}
template <typename T, typename U>
istream &operator>>(istream &istr, pair<T, U> &p) {
istr >> p.first >> p.second;
return istr;
}
template <typen... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 738 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define sz(a) int((a).size())
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
ll n, m, i, j, s = 0;
cin >> n >> m;
vector<ll> a(n);
for (i = 0; i < n; i++... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define sz(a) int((a).size())
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
ll n, m, i, j, s = 0;
cin >> n >> m;
vector<ll> a(n);
for (i = 0; i < n; i++... | [["-", 12, 23, 0, 16, 12, 23, 0, 16, 31, 13], ["+", 12, 23, 0, 16, 12, 23, 0, 16, 31, 13]] | 1 | 169 |
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
using namespace std;
const int N = 1e5 + 10;
int a[N];
int main() {
int m, n;
cin >> m >> n;
double su = 0;
for (int i = 1; i <= m; ++i) {
cin >> a[i];
su += a[i];
}
su = su / 4 / n;
int cnt = 0;
for (int i = 1; i <= m; ++... | #include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
using namespace std;
const int N = 1e5 + 10;
int a[N];
int main() {
int m, n;
cin >> m >> n;
double su = 0;
for (int i = 1; i <= m; ++i) {
cin >> a[i];
su += a[i];
}
su = su / 4 / n;
int cnt = 0;
for (int i = 1; i <= m; ++... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 149 |
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define P pair<int, int>
int main() {
int n, m;
cin >> n >> m;
int a[n];
rep(i, n) cin >> a[i];
int sm = 0;
rep(i, n) sm += a... | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define P pair<int, int>
int main() {
int n, m;
cin >> n >> m;
int a[n];
rep(i, n) cin >> a[i];
int sm = 0;
rep(i, n) sm += a... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 178 |
N, M = gets.chomp.split(" ").map(&:to_i)
A = gets.chomp.split(" ").map(&:to_i)
s = A.inject(:+)
puts A.select{|a| a >= s/(4*M)}.count >= M ? 'Yes' : 'No'
| N, M = gets.chomp.split(" ").map(&:to_i)
A = gets.chomp.split(" ").map(&:to_i)
s = A.inject(:+)
puts A.select{|a| a >= s.to_f/(4*M)}.count >= M ? 'Yes' : 'No'
| [["+", 8, 734, 0, 738, 12, 738, 31, 652, 17, 131], ["+", 8, 734, 0, 738, 12, 738, 31, 652, 735, 22]] | 4 | 76 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
#define MP make_pair
#define F first
#define S second
int main() {
int... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
#define MP make_pair
#define F first
#define S second
int main() {
int... | [["+", 15, 339, 51, 16, 12, 16, 31, 74, 0, 24], ["+", 51, 16, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 15, 339, 51, 16, 12, 16, 31, 74, 0, 25]] | 1 | 185 |
#include <bits/stdc++.h>
#define GET_REP(_1, _2, _3, NAME, ...) NAME
#define rep(...) GET_REP(__VA_ARGS__, irep, _rep)(__VA_ARGS__)
#define rep1(...) GET_REP(__VA_ARGS__, irep1, _rep1)(__VA_ARGS__)
#define _rep(i, n) irep(i, 0, n)
#define _rep1(i, n) irep1(i, 1, n)
#define irep(i, a, n) for (int i = a; i < (int)(n); ++... | #include <bits/stdc++.h>
#define GET_REP(_1, _2, _3, NAME, ...) NAME
#define rep(...) GET_REP(__VA_ARGS__, irep, _rep)(__VA_ARGS__)
#define rep1(...) GET_REP(__VA_ARGS__, irep1, _rep1)(__VA_ARGS__)
#define _rep(i, n) irep(i, 0, n)
#define _rep1(i, n) irep1(i, 1, n)
#define irep(i, a, n) for (int i = a; i < (int)(n); ++... | [["+", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["-", 49, 50, 51, 16, 31, 2, 3, 4, 0, 13], ["+", 3, 4, 0, 16, 31, 2, 3, 4, 0, 13], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 278 |
#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
typedef long long ll;
ll n, m;
ll a[105];
ll sum;
int main() {
scanf("%lld%lld", &n, &m);
for (ll i = 0; i < n; i++) {
scanf("%lld", &a[i]);
sum += a[i];
}
sort(a, a + n, greater<ll>());
if (a[m - 1] < sum / (4 * m))
... | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
typedef long long ll;
ll n, m;
ll a[105];
ll sum;
int main() {
scanf("%lld%lld", &n, &m);
for (ll i = 0; i < n; i++) {
scanf("%lld", &a[i]);
sum += a[i];
}
sort(a, a + n, greater<ll>());
if (a[m - 1] * 4 * m < sum)
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 85], ["-", 15, 339, 51, 16, 12, 16, 12, 23, 0, 24], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 48], ["-", 15, 339, 51, 16, 12, 16, 12, 23, 0, 25], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17... | 1 | 137 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
// Your code here!
int m, n;
cin >> n >> m;
vector<int> a(n);
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
sort(a.begin(), a.end(), greater<int>());
for (int i = 0; i < n;... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
// Your code here!
int m, n;
cin >> n >> m;
vector<int> a(n);
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
sort(a.begin(), a.end(), greater<int>());
for (int i = 0; i < n;... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 156 |
import java.util.*;
class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
int[] a = new int[n];
int sum = 0;
for (int i = 0; i < n; i++) {
a[i] = sc.nextInt();
sum += a[i];
}
float thre = sum... | import java.util.*;
class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
int[] a = new int[n];
int sum = 0;
for (int i = 0; i < n; i++) {
a[i] = sc.nextInt();
sum += a[i];
}
float thre = (fl... | [["+", 0, 503, 49, 200, 51, 16, 31, 74, 0, 24], ["+", 49, 200, 51, 16, 31, 74, 39, 511, 0, 531], ["+", 0, 503, 49, 200, 51, 16, 31, 74, 0, 25]] | 3 | 179 |
#include <bits/stdc++.h>
using namespace std;
#define int int64_t
signed main() {
int n, m;
cin >> n >> m;
int sum = 0;
int arr[n];
for (int i = 0; i < n; i++) {
cin >> arr[i];
sum += arr[i];
}
sort(arr, arr + n, greater<int>());
int threshold = sum / (4 * m);
int count = 0;
for (int i = 0;... | #include <bits/stdc++.h>
using namespace std;
#define int int64_t
signed main() {
int n, m;
cin >> n >> m;
int sum = 0;
double arr[n];
for (int i = 0; i < n; i++) {
cin >> arr[i];
sum += arr[i];
}
sort(arr, arr + n, greater<int>());
double threshold = sum / (4.0 * m);
int count = 0;
for (in... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 49, 50, 51, 16, 12, 23, 0, 16, 31, 13], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 31, 13]] | 1 | 146 |
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <map>
#include <new>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, N) for (ll i = 0; i < (ll)(N); ++i)
#define ALL(... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <map>
#include <new>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, N) for (ll i = 0; i < (ll)(N); ++i)
#define ALL(... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 195 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pll pair<long long, long long>
#define mod 1000000007
#define IOS \
std::ios::sync_with_stdio(false); \
cin.tie(NULL); ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pll pair<long long, long long>
#define mod 1000000007
#define IOS \
std::ios::sync_with_stdio(false); \
cin.tie(NULL); ... | [["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 48], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 48], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 228 |
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_upp... | import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_upp... | [["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 48], ["-", 0, 57, 15, 666, 0, 657, 12, 23, 0, 24], ["-", 15, 666, 0, 657, 12, 23, 0, 657, 31, 612], ["-", 0, 657, 12, 23, 0, 657, 12, 23, 0, 25], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20]] | 5 | 235 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long int ll;
typedef unsigned long long int ull;
typedef tree<int, null_type, less<int>, rb_tree_tag,
... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long int ll;
typedef unsigned long long int ull;
typedef tree<int, null_type, less<int>, rb_tree_tag,
... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 339 |
n, m = map(int, input().split())
a_list = list(map(int, input().split()))
sum_a = 0
for a in a_list:
sum_a += a
count_a = 0
for a in a_list:
if a >= sum_a// 4 // m:
count_a += 1
if count_a >= m:
print("Yes")
else:
print("No")
| n, m = map(int, input().split())
a_list = list(map(int, input().split()))
sum_a = 0
for a in a_list:
sum_a += a
count_a = 0
for a in a_list:
if a >= sum_a / (4 * m):
count_a += 1
if count_a >= m:
print("Yes")
else:
print("No")
| [["-", 0, 57, 15, 666, 0, 657, 31, 657, 17, 676], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 85], ["+", 0, 57, 15, 666, 0, 657, 12, 23, 0, 24], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 676], ["+", 15, 666, 0, 657, 12, 23, 0, 657, 17, 48], ["+", 0, 57, 15, 666, 0, 657, 12, 23, 0, 25]] | 5 | 83 |
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define square(x) pow(x 2.0)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define max_queue(x) priority_queue<x>
#define min_queue(... | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define square(x) pow(x 2.0)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define max_queue(x) priority_queue<x>
#define min_queue(... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 267 |
#include <cstdio>
using namespace std;
int a[1005];
int main() {
int n, m;
scanf("%d%d", &n, &m);
int sum = 0;
for (int i = 1; i <= n; i++) {
scanf("%d", &a[i]);
sum += a[i];
}
sum = sum / m / 4;
int cnt = 0;
for (int i = 1; i <= n; i++) {
if (a[i] >= sum) {
cnt++;
}
}
if (cnt ... | #include <cstdio>
using namespace std;
double a[1005];
int main() {
int n, m;
scanf("%d%d", &n, &m);
double sum = 0;
for (int i = 1; i <= n; i++) {
scanf("%lf", &a[i]);
sum += a[i];
}
sum = sum / m / 4.0;
int cnt = 0;
for (int i = 1; i <= n; i++) {
if (a[i] >= sum) {
cnt++;
}
}
... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, ... | 1 | 150 |
#include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
// freopen("output.txt","w",stdout);
// freopen("input.txt","r",stdin);
ll N, M;
cin >> N >> M;
ll arr[N];
for (auto &it : arr)
cin >> it;
ll sum = 0;
for (auto it... | #include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
// freopen("output.txt","w",stdout);
// freopen("input.txt","r",stdin);
ll N, M;
cin >> N >> M;
ll arr[N];
for (auto &it : arr)
cin >> it;
ll sum = 0;
for (auto it... | [["+", 49, 50, 51, 16, 12, 74, 39, 77, 39, 40], ["+", 0, 43, 49, 50, 51, 16, 12, 74, 0, 25], ["+", 49, 50, 51, 16, 12, 74, 51, 23, 0, 24]] | 1 | 138 |
N,M = map(int,input().split())
A = sorted(map(int,input().split()),reverse = True)
goukei = sum(A)
judge = goukei/4/M
if A[M-1]>judge:
print('Yes')
else:
print('No') | N,M = map(int,input().split())
A = sorted(map(int,input().split()),reverse = True)
goukei = sum(A)
judge = goukei/4/M
if A[M-1]>=judge:
print('Yes')
else:
print('No') | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20]] | 5 | 74 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MOD 1000000007
#define INF 1e9
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(x) (x).begin(), (x).end()
int main() {
int n, m;
cin >> n >> m;
int sum = 0;
vector<int> a(n);
rep(i, n) {
cin >> a[i];
sum += a[i];
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MOD 1000000007
#define INF 1e9
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(x) (x).begin(), (x).end()
int main() {
int n, m;
cin >> n >> m;
int sum = 0;
vector<int> a(n);
rep(i, n) {
cin >> a[i];
sum += a[i];
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 85], ["-", 15, 339, 51, 16, 12, 16, 12, 23, 0, 24], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 48], ["-", 15, 339, 51, 16, 12, 16, 12, 23, 0, 25], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17... | 1 | 153 |
#include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define all(x) (x).begin(), (x).end()
using namespace ... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define all(x) (x).begin(), (x).end()
using namespace ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 380 |
#include <stdio.h>
int main() {
int N, M, cnt = 0, i, sum = 0;
int A[200] = {};
scanf("%d%d", &N, &M);
for (i = 0; i < N; i++) {
scanf("%d", &A[i]);
sum += A[i];
}
double limit = sum / (4.0 * M);
for (i = 0; i < N; i++) {
if (A[i] > limit)
cnt++;
}
if (cnt >= M) {
printf("Yes\n"... | #include <stdio.h>
int main() {
int N, M, cnt = 0, i, sum = 0;
int A[200] = {};
scanf("%d%d", &N, &M);
for (i = 0; i < N; i++) {
scanf("%d", &A[i]);
sum += A[i];
}
double limit = sum / (4.0 * M);
for (i = 0; i < N; i++) {
if (A[i] >= limit)
cnt++;
}
if (cnt >= M) {
printf("Yes\n... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 20]] | 0 | 148 |
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
using namespace std;
int main() {
ll n, m;
cin >> n >> m;
ll a[n];
ll sum = 0;
for (ll i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
sort(a, a + n);
ll cnt = 0;
ll res = 0;
if (sum % (4 * m) == 0)
res = sum / (4 * m);
... | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
using namespace std;
int main() {
ll n, m;
cin >> n >> m;
ll a[n];
ll sum = 0;
for (ll i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
sort(a, a + n);
ll cnt = 0;
ll res = 0;
if (sum % (4 * m) == 0)
res = sum / (4 * m);
... | [["+", 75, 76, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 75, 76, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 176 |
N, M = gets.split(' ').map(&:to_i)
ary = gets.split(' ').map(&:to_i)
line = ary.reduce(&:+) / (4 * M)
count = 0
ary.each do |a|
count += 1 unless a < line
break if count >= M
end
if count >= M
puts 'Yes'
else
puts 'No'
end | N, M = gets.split(' ').map(&:to_i)
ary = gets.split(' ').map(&:to_i)
line = ary.reduce(&:+) / (4 * M).to_f
count = 0
ary.each do |a|
count += 1 unless a < line
break if count >= M
end
if count >= M
puts 'Yes'
else
puts 'No'
end | [["+", 0, 493, 0, 662, 12, 738, 12, 652, 17, 131], ["+", 0, 493, 0, 662, 12, 738, 12, 652, 735, 22]] | 4 | 86 |
n, m = (int(i) for i in input().split())
A = [int(i) for i in input().split()]
_sum = sum(A)
th = _sum / (4*m)
cnt = 0
for a in A:
if a >= th:
cnt += 1
if cnt > m:
print('Yes')
else:
print('No') | n, m = (int(i) for i in input().split())
A = [int(i) for i in input().split()]
_sum = sum(A)
th = _sum / (4*m)
cnt = 0
for a in A:
if a >= th:
cnt += 1
if cnt >= m:
print('Yes')
else:
print('No') | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20]] | 5 | 88 |
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <stdio.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(x).size()
#d... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <stdio.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(x).size()
#d... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 238 |
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char *argv[]) {
std::vector<int> values;
int N, M;
cin >> N >> M;
values.resize(N);
long long sum = 0;
for (int i = 0; i < N; ++i) {
cin >> values.at(i... | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char *argv[]) {
std::vector<int> values;
int N, M;
cin >> N >> M;
values.resize(N);
long long sum = 0;
for (int i = 0; i < N; ++i) {
cin >> values.at(i... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 167 |
N,M=list(map(int,input().split()))
A=list(map(int,input().split()))
limit=sum(A)/(4*M)
A.sort()
c=0
for a in A:
if a > limit:
c+=1
if c==M:
break
if c==M:
print("Yes")
else:
print("No") | N,M=list(map(int,input().split()))
A=list(map(int,input().split()))
limit=sum(A)/(4*M)
A.sort()
c=0
for a in A:
if a >= limit:
c+=1
if c==M:
break
if c==M:
print("Yes")
else:
print("No") | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 94 |
// ABC161 B
#include <bits/stdc++.h>
using namespace std;
int N, M;
int A[1000];
long long ans = 0;
int main() {
cin >> N >> M;
for (int i = 0; i < N; i++) {
scanf("%d", &A[i]);
ans += A[i];
}
sort(A, A + N);
reverse(A, A + N);
if (A[M - 1] >= floor((double)ans / (4 * M))) {
printf("Yes\n");... | // ABC161 C
#include <bits/stdc++.h>
using namespace std;
int N, M;
int A[1000];
long long ans = 0;
int main() {
cin >> N >> M;
for (int i = 0; i < N; i++) {
scanf("%d", &A[i]);
ans += A[i];
}
sort(A, A + N);
reverse(A, A + N);
if (A[M - 1] >= ((double)ans / (4 * M))) {
printf("Yes\n");
} ... | [["-", 0, 57, 15, 339, 51, 16, 12, 2, 63, 22]] | 1 | 135 |
#include <bits/stdc++.h>
using namespace std;
#define INF (1 << 30)
#define EPS 1e-10
#define MOD 1000000007
using ll = long long;
int main() {
int n, m;
double a[100];
cin >> n >> m;
int sum = 0;
for (int i = 0; i < n; ++i) {
cin >> a[i];
sum += a[i];
}
sort(a, a + n, greater<double>());
f... | #include <bits/stdc++.h>
using namespace std;
#define INF (1 << 30)
#define EPS 1e-10
#define MOD 1000000007
using ll = long long;
int main() {
int n, m;
double a[100];
cin >> n >> m;
double sum = 0;
for (int i = 0; i < n; ++i) {
cin >> a[i];
sum += a[i];
}
sort(a, a + n, greater<double>());
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 150 |
// c++ -std=c++14 atcoder.cpp
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
for... | // c++ -std=c++14 atcoder.cpp
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
for... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 155 |
n, m = [int(n) for n in input().split()]
a = [int(n) for n in input().split()]
p = [ai for ai in a if ai > sum(a)/(4 * m)]
if len(p) >= m:
print("Yes")
else:
print("No") | n, m = [int(n) for n in input().split()]
a = [int(n) for n in input().split()]
p = [ai for ai in a if ai >= sum(a)/(4 * m)]
if len(p) >= m:
print("Yes")
else:
print("No") | [["-", 0, 662, 12, 658, 0, 678, 0, 666, 667, 47], ["+", 0, 662, 12, 658, 0, 678, 0, 666, 667, 20]] | 5 | 82 |
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define INF (int)9e18
#define HELL (int)(1e9 + 7)
#define int long long
#define double long double
#define uint unsigned long long
#define deb(x) cerr << #x << " => " << x << "\n"
#define deba(x) ... | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define INF (int)9e18
#define HELL (int)(1e9 + 7)
#define int long long
#define double long double
#define uint unsigned long long
#define deb(x) cerr << #x << " => " << x << "\n"
#define deba(x) ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 264 |
#include <algorithm>
#include <iostream>
#include <vector>
#define rep(i, a, n) for (int i = a; i < n; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
int sum = 0;
rep(i, 0, n) {
cin >> a[i];
sum += a[i];
}
sort(a.r... | #include <algorithm>
#include <iostream>
#include <vector>
#define rep(i, a, n) for (int i = a; i < n; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
double n, m;
cin >> n >> m;
vector<double> a(n);
double sum = 0;
rep(i, 0, n) {
cin >> a[i];
sum += a[i];
}
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40]] | 1 | 148 |
#include <bits/stdc++.h>
using ll = long long;
using namespace std;
ll GCD(ll a, ll b) { return a ? GCD(b % a, a) : b; }
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
ll sum = 0;
for (int i = 0; i < n; i++)
sum += a[i];
int fourm = sum / (4 * m);
... | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
ll GCD(ll a, ll b) { return a ? GCD(b % a, a) : b; }
int main() {
ll n, m;
cin >> n >> m;
vector<int> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
ll sum = 0;
for (int i = 0; i < n; i++)
sum += a[i];
double fourm = sum / (4.0 * ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 49, 50, 51, 16, 12, 23, 0, 16, 31, 13], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 31, 13]] | 1 | 173 |
n,m=[int(e) for e in input().split()]
a=[int(e) for e in input().split()]
count = 0
sum = 0
for i in range(n):
sum += a[i]
print(sum)
for i in range(n):
if a[i] >= sum / (4*m):
count +=1
if count >= m:
print("Yes")
else:
print("No") | n,m=[int(e) for e in input().split()]
a=[int(e) for e in input().split()]
count = 0
sum = 0
for i in range(n):
sum += a[i]
for i in range(n):
if a[i] >= sum / (4*m):
count +=1
if count >= m:
print("Yes")
else:
print("No") | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 106 |
#include <bits/stdc++.h>
// Function Macros:
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define all(v) (v).begin(), (v).end()
#define setpre(n) cout << fixed << setprecision(n)
// Type / Class / Struct Definitions:
using namespace std;
using ll = long long;
using ull = unsigned long long;
// Constants:
co... | #include <bits/stdc++.h>
// Function Macros:
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define all(v) (v).begin(), (v).end()
#define setpre(n) cout << fixed << setprecision(n)
// Type / Class / Struct Definitions:
using namespace std;
using ll = long long;
using ull = unsigned long long;
// Constants:
co... | [["-", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13], ["+", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13]] | 1 | 337 |
/**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author yosiiii
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long int i = 0; i < (n); ++i)
typedef long long int ll;
class BPopularVote {
public:
void solve(std::istream &in, std::ostream &ou... | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author yosiiii
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long int i = 0; i < (n); ++i)
typedef long long int ll;
class BPopularVote {
public:
void solve(std::istream &in, std::ostream &ou... | [["-", 49, 50, 51, 16, 12, 23, 0, 16, 31, 13], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 31, 13]] | 1 | 201 |
# Code for B - Popular Vote
# Use input() to fetch data from STDIN
from math import floor
[n, m] = map(int, input().split())
a = list(map(int, input().split()))
total = sum(a)
if len(list(filter(lambda x: x >= floor(total / (4 * m)), a))) >= m:
print("Yes")
else:
print("No")
| # Code for B - Popular Vote
# Use input() to fetch data from STDIN
[n, m] = map(int, input().split())
a = list(map(int, input().split()))
total = sum(a)
if len(list(filter(lambda x: x >= (total / (4 * m)), a))) >= m:
print("Yes")
else:
print("No")
| [["-", 36, 36, 36, 36, 0, 656, 0, 686, 0, 314], ["-", 36, 36, 0, 656, 0, 686, 687, 673, 0, 22], ["-", 36, 36, 36, 36, 0, 656, 0, 686, 0, 487], ["-", 36, 36, 0, 656, 0, 686, 141, 673, 0, 22], ["-", 3, 4, 0, 670, 8, 666, 0, 652, 63, 22]] | 5 | 91 |
#include <bits/stdc++.h>
#include <cmath>
#include <math.h>
#include <stdio.h>
using namespace std;
#define vsort(vec) sort(vec.begin(), vec.end())
#define vreverse(vec) reverse(vec.begin(), vec.end())
using ll = long long;
using ull = unsigned long long;
const ll INF = 1001001001;
// 10億7。 100000007
//最大公約数
ll gcd... | #include <bits/stdc++.h>
#include <cmath>
#include <math.h>
#include <stdio.h>
using namespace std;
#define vsort(vec) sort(vec.begin(), vec.end())
#define vreverse(vec) reverse(vec.begin(), vec.end())
using ll = long long;
using ull = unsigned long long;
const ll INF = 1001001001;
// 10億7。 100000007
//最大公約数
ll gcd... | [["+", 15, 339, 51, 16, 12, 16, 31, 74, 0, 24], ["+", 51, 16, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 15, 339, 51, 16, 12, 16, 31, 74, 0, 25]] | 1 | 250 |
/*************************************************************************
> File Name: b.cpp
> Author: Samuel
> Mail: enminghuang21119@gmail.com
> Created Time: Sat Apr 4 20:01:41 2020
*************************************************************************/
#include <bits/stdc++.h>
using namespace std;
in... | /*************************************************************************
> File Name: b.cpp
> Author: Samuel
> Mail: enminghuang21119@gmail.com
> Created Time: Sat Apr 4 20:01:41 2020
*************************************************************************/
#include <bits/stdc++.h>
using namespace std;
in... | [["+", 12, 16, 12, 23, 0, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 23, 0, 16, 12, 23, 0, 25], ["-", 0, 16, 12, 23, 0, 41, 15, 16, 17, 20], ["+", 0, 16, 12, 23, 0, 41, 15, 16, 17, 47]] | 1 | 137 |
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REPS(i, n) for (int i = 1; i <= (int)(n); i++)
using namespace std;
using ll = long long;
using ld = long double;
int main(void) {
int N, M;
cin >> N >> M;
int A[N], sum = 0;
REP(i, N) {
cin >> A[i];
sum += A[i];
}
... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REPS(i, n) for (int i = 1; i <= (int)(n); i++)
using namespace std;
using ll = long long;
using ld = long double;
int main(void) {
int N, M;
cin >> N >> M;
int A[N], sum = 0;
REP(i, N) {
cin >> A[i];
sum += A[i];
}
... | [["+", 15, 339, 51, 16, 12, 16, 31, 74, 0, 24], ["+", 51, 16, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 15, 339, 51, 16, 12, 16, 31, 74, 0, 25]] | 1 | 138 |
if __name__ == '__main__':
n, m = tuple([int(i) for i in input().split()])
a = [int(i) for i in input().split()]
total = float(sum(a))
selected = [i >= (total // (4 * m)) for i in a]
result = len([r for r in selected if r])
print("Yes" if result >= m else "No")
| if __name__ == '__main__':
n, m = tuple([int(i) for i in input().split()])
a = [int(i) for i in input().split()]
total = float(sum(a))
selected = [float(i) >= (total / (4.0 * m)) for i in a]
result = len([r for r in selected if r])
print("Yes" if result >= m else "No")
| [["+", 0, 662, 12, 658, 8, 666, 0, 652, 63, 22], ["+", 12, 658, 8, 666, 0, 652, 3, 4, 0, 24], ["+", 12, 658, 8, 666, 0, 652, 3, 4, 0, 25], ["-", 12, 658, 8, 666, 0, 23, 0, 657, 17, 676], ["+", 12, 658, 8, 666, 0, 23, 0, 657, 17, 85], ["-", 0, 23, 0, 657, 12, 23, 0, 657, 31, 612], ["+", 0, 23, 0, 657, 12, 23, 0, 657, 31... | 5 | 104 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main(void) {
int n, m;
cin >> n >> m;
vector<int> v(n);
rep(i, n) cin >> v[i];
int sum = accumulate(v.begin(), v.end(), 0);
int now = 0;
rep(i, n) {
if (sum % (4 * m) && v[i] == sum... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main(void) {
int n, m;
cin >> n >> m;
vector<int> v(n);
rep(i, n) cin >> v[i];
int sum = accumulate(v.begin(), v.end(), 0);
int now = 0;
rep(i, n) {
if (sum % (4 * m) == 0 && v[i] =... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 166 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, begin, end) for (ll i = (begin); i < (end); i++)
#define REP(i, n) FOR(i, 0, n)
#define IFOR(i, begin, end) for (ll i = (begin)-1; i >= (end); i--)
#define IREP(i, n) IFOR(i, n, 0)
#define SORT(a) sort(a.begin(), a.end())
#define ISORT(a) sort(a.begin(), a.en... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, begin, end) for (ll i = (begin); i < (end); i++)
#define REP(i, n) FOR(i, 0, n)
#define IFOR(i, begin, end) for (ll i = (begin)-1; i >= (end); i--)
#define IREP(i, n) IFOR(i, n, 0)
#define SORT(a) sort(a.begin(), a.end())
#define ISORT(a) sort(a.begin(), a.en... | [["+", 0, 43, 49, 50, 51, 16, 12, 2, 63, 40]] | 1 | 370 |
// Sakhiya07 - Yagnik Sakhiya
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define ff first
#define ss second
#define pb push_back
#define all(x) x.begin(), x.end()
#define mp make_pair
#define bp __builtin_popcountll
#define MOD 1000000007
const int N = 62;
#define F... | // Sakhiya07 - Yagnik Sakhiya
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define ff first
#define ss second
#define pb push_back
#define all(x) x.begin(), x.end()
#define mp make_pair
#define bp __builtin_popcountll
#define MOD 1000000007
const int N = 62;
#define F... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 49, 50, 51, 16, 12, 2, 63, 23, 0, 24], ["+", 49, 50, 51, 16, 12, 2, 63, 23, 0, 22], ["+", 49, 50, 51, 16, 12, 2, 63, 23, 0, 25]] | 1 | 200 |
#include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
// #define for(i,a,b) for (int i=(a);i<(b);++i)
typedef long long ll;
typedef pair<ll, ll> P;
#defin... | #include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
// #define for(i,a,b) for (int i=(a);i<(b);++i)
typedef long long ll;
typedef pair<ll, ll> P;
#defin... | [["+", 31, 16, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 31, 16, 31, 69, 341, 342, 0, 16, 12, 13]] | 1 | 174 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int n, m;
... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
double n, m;... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40]] | 1 | 158 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define pb push_back
#define ppb pop_back
#define endl '\n'
#define mii map<ll, ll>
#define pii pair<ll, ll>
#define vi vector<ll>
#define vs vector<string>
#define all(a) (a).begin(), (a).end()
... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define pb push_back
#define ppb pop_back
#define endl '\n'
#define mii map<ll, ll>
#define pii pair<ll, ll>
#define vi vector<ll>
#define vs vector<string>
#define all(a) (a).begin(), (a).end()
... | [["+", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["-", 49, 50, 51, 16, 12, 23, 0, 16, 31, 13], ["+", 3, 4, 0, 16, 12, 23, 0, 16, 31, 13], ["+", 51, 2, 3, 4, 0, 16, 12, 23, 0, 25]] | 1 | 370 |
n,m=map(int,input().split())
a=list(map(int,input().split()))
s=sum(a)
s1=s//(4*m)
c=0
for i in a:
if(i>=s1):
c+=1
if(c>=m):
print('Yes')
else:
print('No')
|
n,m=map(int,input().split())
a=list(map(int,input().split()))
s=sum(a)
s1=s/(4*m)
c=0
for i in a:
if(i>=s1):
c+=1
if(c>=m):
print('Yes')
else:
print('No')
| [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85]] | 5 | 87 |
N,M=map(int,input().split())
A=list(map(int,input().split()))
A.sort()
s=sum(A)
a=0
for i in A:
if not i<s//(4*M):
a+=1
print('Yes' if a>=M else 'No') | N,M=map(int,input().split())
A=list(map(int,input().split()))
s=sum(A)
a=0
for i in A:
if not i<s/(4*M):
a+=1
print('Yes' if a>=M else 'No') | [["-", 0, 656, 0, 1, 0, 652, 63, 319, 500, 22], ["-", 0, 656, 0, 1, 0, 652, 63, 319, 0, 131], ["-", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 0, 57, 15, 681, 28, 666, 0, 657, 17, 676], ["+", 0, 57, 15, 681, 28, 666, 0, 657, 17, 85]... | 5 | 81 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
using namespace __gnu_pbds;
#define debug(s) cout << #s << " = " << s << endl
#define all(v) (v).begin(), (v).end()
#define mem(a, v... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
using namespace __gnu_pbds;
#define debug(s) cout << #s << " = " << s << endl
#define all(v) (v).begin(), (v).end()
#define mem(a, v... | [["+", 0, 57, 15, 339, 51, 16, 12, 2, 63, 22], ["+", 12, 2, 3, 4, 0, 16, 31, 74, 0, 24], ["+", 3, 4, 0, 16, 31, 74, 39, 77, 39, 40], ["+", 12, 2, 3, 4, 0, 16, 31, 74, 0, 25], ["-", 12, 23, 0, 16, 12, 23, 0, 16, 31, 13], ["+", 3, 4, 0, 16, 12, 23, 0, 16, 31, 13]] | 1 | 193 |
// Author: kaiyu
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
#define SZ(x) ((int)... | // Author: kaiyu
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
#define SZ(x) ((int)... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 25]] | 1 | 277 |
#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[1005], sum, cnt;
int main() {
cin >> n >> m;
for (int i = 1; i <= n; i++) {
cin >> a[i];
sum += a[i];
}
sort(a + 1, a + n + 1);
reverse(a + 1, a + n + 1);
for (int i = 1; i <= m; i++) {
if (a[i] < sum / (4 * m)) {
cout << "N... | #include <bits/stdc++.h>
using namespace std;
int n, m;
double a[1005], sum, cnt;
int main() {
cin >> n >> m;
for (int i = 1; i <= n; i++) {
cin >> a[i];
sum += a[i];
}
sort(a + 1, a + n + 1);
reverse(a + 1, a + n + 1);
for (int i = 1; i <= m; i++) {
if (a[i] < sum / (4 * m)) {
cout <<... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40]] | 1 | 142 |
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
using namespace std;
using lint = long long;
constexpr int MOD = 1000000007, INF = 1010101010;
constex... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
using namespace std;
using lint = long long;
constexpr int MOD = 1000000007, INF = 1010101010;
constex... | [["-", 49, 50, 51, 16, 12, 23, 0, 16, 31, 13], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 31, 13]] | 1 | 416 |
N, M = map(int,input().split())
a = list(map(int,input().split()))
a.sorted(reverse=True)
K = 0
for i in range(N):
K += a[i]
if(a[M-1]>=K/(4*M)):
print("Yes")
else:
print("No") | N, M = map(int,input().split())
a = list(map(int,input().split()))
a.sort(reverse=True)
K = 0
for i in range(N):
K += a[i]
if(a[M-1]>=K/(4*M)):
print("Yes")
else:
print("No")
| [["-", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22]] | 5 | 90 |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 2e5 + 5;
ll a[maxn];
string s;
int main() {
// freopen("input.txt","r",stdin);
ios::sync_with_stdio(false);
int n, m;
cin >> n >> m;
ll sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 2e5 + 5;
ll a[maxn];
string s;
int main() {
// freopen("input.txt","r",stdin);
ios::sync_with_stdio(false);
int n, m;
cin >> n >> m;
double sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 161 |
n,m = map(int,input().split())
a = list(map(int,input().split()))
suma = sum(a)
tmp = 0
for i in range(n):
if a[i] > suma/(4*m):
tmp += 1
if m <= tmp:
print("Yes")
else:
print("No")
| n,m = map(int,input().split())
a = list(map(int,input().split()))
suma = sum(a)
tmp = 0
for i in range(n):
if a[i] < suma/(4*m):
tmp += 1
if m <= (n-tmp):
print("Yes")
else:
print("No")
| [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 656, 0, 57, 15, 666, 0, 23, 0, 24], ["+", 0, 57, 15, 666, 0, 23, 0, 657, 31, 22], ["+", 0, 57, 15, 666, 0, 23, 0, 657, 17, 33], ["+", 0, 656, 0, 57, 15, 666, 0, 23, 0, 25]] | 5 | 86 |
/*
* Sachin Mittal
*/
#include <bits/stdc++.h>
#define int long long
#define M 998244353
#define mod 1000000007
#define all(v) v.begin(), v.end()
#define ios \
ios_base::sync_with_stdio(false); \
cin.tie... | /*
* Sachin Mittal
*/
#include <bits/stdc++.h>
#define int long long
#define M 998244353
#define mod 1000000007
#define all(v) v.begin(), v.end()
#define ios \
ios_base::sync_with_stdio(false); \
cin.tie... | [["-", 8, 9, 0, 52, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 52, 8, 9, 0, 43, 39, 40], ["+", 0, 1, 0, 11, 12, 23, 0, 16, 17, 48], ["+", 0, 1, 0, 11, 12, 23, 0, 16, 12, 13]] | 1 | 187 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
ll n, m, sum = 0;
cin >> n >> m;
vector<ll> a(n);
for (ll i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
ll cnt = 0;
for (ll i = 0; i < n; i++) {
if (4 * m * a[i] > sum) {
cnt++;
}
}
if (cn... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
ll n, m, sum = 0;
cin >> n >> m;
vector<ll> a(n);
for (ll i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
ll cnt = 0;
for (ll i = 0; i < n; i++) {
if (4 * m * a[i] >= sum) {
cnt++;
}
}
if (c... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 137 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define TIMER_S(start) \
chrono::system_clock::time_point start = chrono::system_clock::now();
#define TIMER_E(end) ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define TIMER_S(start) \
chrono::system_clock::time_point start = chrono::system_clock::now();
#define TIMER_E(end) ... | [["+", 0, 57, 15, 339, 51, 16, 31, 74, 0, 24], ["+", 15, 339, 51, 16, 31, 74, 39, 77, 39, 40], ["+", 0, 57, 15, 339, 51, 16, 31, 74, 0, 25], ["+", 15, 339, 51, 16, 12, 16, 31, 74, 0, 24], ["+", 51, 16, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 15, 339, 51, 16, 12, 16, 31, 74, 0, 25]] | 1 | 160 |
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
int all = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
all += a[i];
}
sort(a.begin(), a.en... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
int all = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
all += a[i];
}
sort(a.begin(), a.en... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 85], ["-", 15, 339, 51, 16, 12, 16, 12, 23, 0, 24], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 48], ["-", 15, 339, 51, 16, 12, 16, 12, 23, 0, 25], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17... | 1 | 143 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll n, m;
cin >> n >> m;
float sum = 0;
float a[n];
for (int i = 0; i < n; ++i) {
cin >> a[i];
sum += a[i];
}
sort(a, a + n);
if (a[n - m] >= 0.25 * sum / floa... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll n, m;
cin >> n >> m;
float sum = 0;
float a[n];
for (int i = 0; i < n; ++i) {
cin >> a[i];
sum += a[i];
}
sort(a, a + n);
if (a[n - m] >= 0.25 * sum / floa... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 136 |
def main():
#from sys import stdin, setrecursionlimit
#setrecursionlimit(10**9)
#r = input()
#n = int(input())
#a, b = map(int, input().split())
#s, y = input().split()
#a = input().split()
#a = list(map(int, input().split()))
#a = [list(input().split()) for i in range(n)]
#a = [... | def main():
#from sys import stdin, setrecursionlimit
#setrecursionlimit(10**9)
#r = input()
#n = int(input())
#a, b = map(int, input().split())
#s, y = input().split()
#a = input().split()
#a = list(map(int, input().split()))
#a = [list(input().split()) for i in range(n)]
#a = [... | [["-", 0, 14, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 14, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 102 |
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
miman = sum(A)/(4*M)
for i in range(M):
if not(A[i] > miman):
print('No')
exit(0)
print('Yes')
| N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
miman = sum(A)/(4*M)
for i in range(M):
if not(A[i] >= miman):
print('No')
exit(0)
print('Yes')
| [["-", 0, 57, 15, 681, 28, 23, 0, 666, 667, 47], ["+", 0, 57, 15, 681, 28, 23, 0, 666, 667, 20]] | 5 | 88 |
#include <bits/stdc++.h>
#define crap \
ios_base::sync_with_stdio(0); \
cin.tie(0)
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define endl "\n"
#define int ll
using nam... | #include <bits/stdc++.h>
#define crap \
ios_base::sync_with_stdio(0); \
cin.tie(0)
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define endl "\n"
#define int ll
using nam... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 48], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 48], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17,... | 1 | 155 |
N,M=map(int,input().split())
A=list(map(int,input().split()))
su=sum(A)
th=su//(4*M)
ans=0
for i in A:
if not(i <th):
ans+=1
if ans>=M:
print("Yes")
else:
print("No")
| N,M=map(int,input().split())
A=list(map(int,input().split()))
su=sum(A)
th=su/(4*M)
ans=0
for i in A:
if not(i <th):
ans+=1
if ans>=M:
print("Yes")
else:
print("No")
| [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85]] | 5 | 86 |
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 110;
typedef long long ll;
bool cmp(double a, double b) { return a > b; }
int main(void) {
const double eps = 1e-9;
int N;
double M;
double a[MAXN];
double sum = 0.0;
cin >> N >> M;
for (int i = 1; i <= N; i++) {
cin >> a[i];
sum += a[... | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 110;
typedef long long ll;
bool cmp(double a, double b) { return a > b; }
int main(void) {
const double eps = 1e-9;
int N;
double M;
double a[MAXN];
double sum = 0.0;
cin >> N >> M;
for (int i = 0; i < N; i++) {
cin >> a[i];
sum += a[i... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 5... | 1 | 186 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 998244353;
int a[1005];
int main() {
int n, m;
cin >> n >> m;
int sum = 0;
for (int i = 1; i <= n; i++) {
cin >> a[i];
sum += a[i];
}
int ans = 0;
int tmp = (sum) / (4 * m);
if (sum % (4 * m))
sum++;
for (in... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 998244353;
int a[1005];
int main() {
int n, m;
cin >> n >> m;
int sum = 0;
for (int i = 1; i <= n; i++) {
cin >> a[i];
sum += a[i];
}
int ans = 0;
int tmp = (sum) / (4 * m);
if (sum % (4 * m))
tmp++;
for (in... | [["-", 8, 9, 0, 57, 64, 1, 0, 27, 28, 22], ["+", 8, 9, 0, 57, 64, 1, 0, 27, 28, 22]] | 1 | 160 |
N,M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
total = sum(A)
cnt = 0
for a in A:
if a * 4 * M > total:
cnt += 1
print("Yes" if cnt >= M else "No") | N,M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
total = sum(A)
cnt = 0
for a in A:
if a * 4 * M >= total:
cnt += 1
print("Yes" if cnt >= M else "No") | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 81 |
n, m = map(int, input().split())
As = list(map(int, input().split()))
As = sorted(As, reverse=True)
num = sum(As)
ans = 0
for a in As:
if num / (4*m) <= a:
ans += 1
if ans > m:
print('Yes')
else:
print('No') | n, m = map(int, input().split())
As = list(map(int, input().split()))
As = sorted(As, reverse=True)
num = sum(As)
ans = 0
for a in As:
if num / (4*m) <= a:
ans += 1
if ans >= m:
print('Yes')
else:
print('No')
| [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20]] | 5 | 90 |
N,M = map(int,input().split())
A = list(map(int,input().split()))
S = sum(A)
t = 0
for i in A:
if i >= S/(4*M):
t += 1
if t > M:
print("Yes")
else:
print("No") | N,M = map(int,input().split())
A = list(map(int,input().split()))
S = sum(A)
t = 0
for i in A:
if i >= S/(4*M):
t += 1
if t >= M:
print("Yes")
else:
print("No") | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20]] | 5 | 80 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
int total = 0;
for (int i = 0; i < n; i... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
int total = 0;
for (int i = 0; i < n; i... | [["+", 0, 43, 49, 50, 51, 16, 31, 74, 0, 24], ["+", 51, 16, 31, 74, 39, 77, 39, 86, 0, 96], ["+", 51, 16, 31, 74, 39, 77, 39, 86, 39, 40], ["+", 0, 43, 49, 50, 51, 16, 31, 74, 0, 25]] | 1 | 162 |
def main():
import sys
input = sys.stdin.readline
N, M = map(int, input().split())
A = list(map(int, input().split()))
S = sum(A)
X = S // (4*M)
cnt = 0
for a in A:
if a >= X:
cnt += 1
if cnt >= M:
print('Yes')
else:
print('No')
if __name__... | def main():
import sys
input = sys.stdin.readline
N, M = map(int, input().split())
A = list(map(int, input().split()))
S = sum(A)
X = S / (4*M)
cnt = 0
for a in A:
if a >= X:
cnt += 1
if cnt >= M:
print('Yes')
else:
print('No')
if __name__ =... | [["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 85]] | 5 | 107 |
n, m = list(map(int,input().split()))
a = list(map(int,input().split()))
s = sum(a)
x = (1/(4*m))*(s)
for i in a:
if(i>=x):
u+=1
if(u>=m):
print("Yes")
else:
print("No") | n, m = list(map(int,input().split()))
a = list(map(int,input().split()))
s = sum(a)
x = (1/(4*m))*(s)
u = 0
for i in a:
if(i>=x):
u+=1
if(u>=m):
print("Yes")
else:
print("No") | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]] | 5 | 93 |
# b
require 'pp'
n, m = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)
sum = a.inject(:+)
a2 = a.select{|aa|
aa >= (sum/(4*m))
}
puts (a2.size >= m) ? 'Yes' : 'No'
| # b
require 'pp'
n, m = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)
sum = a.inject(:+).to_f
a2 = a.select{|aa|
aa >= (sum/(4*m))
}
puts (a2.size >= m) ? 'Yes' : 'No'
| [["+", 36, 36, 0, 493, 0, 662, 12, 652, 17, 131], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22]] | 4 | 74 |
// cout << "Case #" << k << ": ";
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
typedef long long ll;
#define MOD 1000000007
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
int ans ... | // cout << "Case #" << k << ": ";
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
typedef long long ll;
#define MOD 1000000007
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
int ans ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 148 |
// Author: πα
#include <bits/stdc++.h>
using namespace std;
#define long int64_t
int main() {
ios::sync_with_stdio(false), cin.tie(nullptr);
int n, m, sum = 0;
cin >> n >> m;
vector<int> v(n);
for (int i = 0; i < n; ++i)
cin >> v[i], sum += v[i];
sort(v.begin(), v.end(), greater<>());
cout << (sum >... | // Author: πα
#include <bits/stdc++.h>
using namespace std;
#define long int64_t
int main() {
ios::sync_with_stdio(false), cin.tie(nullptr);
int n, m, sum = 0;
cin >> n >> m;
vector<int> v(n);
for (int i = 0; i < n; ++i)
cin >> v[i], sum += v[i];
sort(v.begin(), v.end(), greater<>());
cout << (sum >... | [["-", 0, 16, 12, 23, 0, 41, 15, 16, 17, 20], ["+", 0, 16, 12, 23, 0, 41, 15, 16, 17, 47]] | 1 | 131 |
#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n, m;
cin >> n >> m;
int arr[n];
for (int &i : arr)
cin >> i;
sort(arr, arr + n);
int val = accumulate(arr, arr + n, 0ll) / (4 * m);
cout << (arr[n -... | #include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n, m;
cin >> n >> m;
double arr[n];
for (double &i : arr)
cin >> i;
sort(arr, arr + n);
double val = accumulate(arr, arr + n, 0.0) / (4 * m);
cout <<... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 338, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 338, 39, 40], ["-", 49, 50, 51, 16, 31, 2, 3, 4, 0, 13], ["+", 49, 50, 51, 16, 31, 2, 3, 4, 0, 13]] | 1 | 120 |
#include <stdio.h>
int main(void) {
int n, m;
scanf("%d %d", &n, &m);
int a[n];
for (int i = 0; i < n; i++)
scanf("%d", &a[i]);
int sum = 0;
int cnt = 0;
for (int i = 0; i < n; i++)
sum += a[i];
for (int i = 0; i < n; i++)
if (a[i] * 4 >= sum)
cnt++;
puts(cnt >= m ? "Yes" : "No");
... | #include <stdio.h>
int main(void) {
int n, m;
scanf("%d %d", &n, &m);
int a[n];
for (int i = 0; i < n; i++)
scanf("%d", &a[i]);
int sum = 0;
int cnt = 0;
for (int i = 0; i < n; i++)
sum += a[i];
for (int i = 0; i < n; i++)
if (a[i] * 4 * m >= sum)
cnt++;
puts(cnt >= m ? "Yes" : "No"... | [["+", 8, 57, 15, 23, 0, 16, 31, 16, 17, 48], ["+", 8, 57, 15, 23, 0, 16, 31, 16, 12, 22]] | 0 | 137 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
void P(int x) { cout << x << endl; }
void... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
void P(int x) { cout << x << endl; }
void... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40]] | 1 | 290 |
package main
import (
"bufio"
"fmt"
"os"
"sort"
"strconv"
)
var sc = bufio.NewScanner(os.Stdin)
func scanInt() int {
sc.Scan()
iv, _ := strconv.Atoi(sc.Text())
return iv
}
func init() {
sc.Split(bufio.ScanWords)
}
func main() {
n, m := scanInt(), scanInt()
a := make([]int, n)
sum := 0
for i := range a... | package main
import (
"bufio"
"fmt"
"os"
"sort"
"strconv"
)
var sc = bufio.NewScanner(os.Stdin)
func scanInt() int {
sc.Scan()
iv, _ := strconv.Atoi(sc.Text())
return iv
}
func init() {
sc.Split(bufio.ScanWords)
}
func main() {
n, m := scanInt(), scanInt()
a := make([]int, n)
sum := 0
for i := range a... | [["-", 0, 7, 8, 196, 0, 57, 15, 16, 17, 18], ["-", 8, 196, 0, 57, 15, 16, 12, 16, 31, 22], ["-", 8, 196, 0, 57, 15, 16, 12, 16, 17, 85], ["-", 0, 57, 15, 16, 12, 16, 12, 23, 0, 24], ["+", 0, 57, 15, 16, 31, 16, 31, 16, 17, 48], ["-", 0, 57, 15, 16, 12, 16, 12, 23, 0, 25], ["+", 0, 7, 8, 196, 0, 57, 15, 16, 17, 18], ["+... | 7 | 212 |
N, M = map(int, input().split())
A = [int(a) for a in input().split()]
A.sort(reverse=True)
print("Yes" if A[M - 1] > sum(A) / (4 * M) else "No") | N, M = map(int, input().split())
A = [int(a) for a in input().split()]
A.sort(reverse=True)
print("Yes" if A[M - 1] >= sum(A) / (4 * M) else "No") | [["-", 0, 652, 3, 4, 0, 41, 0, 666, 667, 47], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 667, 20]] | 5 | 70 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = ll(1e12);
const ll mod = ll(1e9) + 7;
#define rep0(i, n) for (ll(i) = 0; (i) < (n); ++(i))
#define rrep0(i, n) for (ll(i) = (n)-1; (i) >= 0; --(i))
#define rep1(i, n) for (ll(i) = 1; (i) <= (n); ++(i))
#define rrep1(i, n) for (ll(i) = (n... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = ll(1e12);
const ll mod = ll(1e9) + 7;
#define rep0(i, n) for (ll(i) = 0; (i) < (n); ++(i))
#define rrep0(i, n) for (ll(i) = (n)-1; (i) >= 0; --(i))
#define rep1(i, n) for (ll(i) = 1; (i) <= (n); ++(i))
#define rrep1(i, n) for (ll(i) = (n... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 443 |
#include <algorithm>
#include <cmath>
#include <complex> // complex<double> a(1.2 , 2.3);// real(): 1.2, imag()2.3
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
#define MOD 1000000007
#define EPS 1e-10
#define ll long long
#define ld lo... | #include <algorithm>
#include <cmath>
#include <complex> // complex<double> a(1.2 , 2.3);// real(): 1.2, imag()2.3
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
#define MOD 1000000007
#define EPS 1e-10
#define ll long long
#define ld lo... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 410 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
int main() {
int N, M;
cin >> N >> M;
int sum = 0;
int A[N] = {};
rep(i, N) {
cin >> A[i];
sum += A[i];
}
int res = 0;
rep(i, N) {
if (A[i] >= sum / (4 * M))
res++;
}
cout << (res >= M ?... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
int main() {
int N;
double M;
cin >> N >> M;
double sum = 0;
int A[N] = {};
rep(i, N) {
cin >> A[i];
sum += A[i];
}
int res = 0;
rep(i, N) {
if (A[i] >= sum / (4 * M))
res++;
}
cout <<... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 119 |
N, M = map(int, input().split())
A = [int(i) for i in input().split()]
threshold = N/M/4
count = 0
for elem in A:
if elem >= threshold:
count += 1
if count >= M:
print("Yes")
else:
print("No") | N, M = map(int, input().split())
A = [int(i) for i in input().split()]
threshold = sum(A)/M/4
count = 0
for elem in A:
if elem >= threshold:
count += 1
if count >= M:
print("Yes")
else:
print("No") | [["-", 0, 1, 0, 662, 12, 657, 31, 657, 31, 22], ["+", 0, 662, 12, 657, 31, 657, 31, 652, 63, 22], ["+", 12, 657, 31, 657, 31, 652, 3, 4, 0, 24], ["+", 12, 657, 31, 657, 31, 652, 3, 4, 0, 22], ["+", 12, 657, 31, 657, 31, 652, 3, 4, 0, 25]] | 5 | 76 |
/*
PAIN demands to be felt
so do RE, TLE, MLE, SIGSEV & WA
*/
#include <bits/stdc++.h>
using namespace std;
// -----------------<fast IO>------------------
#define CIN \
ios::sync_with_stdio(0); ... | /*
PAIN demands to be felt
so do RE, TLE, MLE, SIGSEV & WA
*/
#include <bits/stdc++.h>
using namespace std;
// -----------------<fast IO>------------------
#define CIN \
ios::sync_with_stdio(0); ... | [["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["+", 12, 23, 0, 16, 31, 16, 12, 23, 0, 25], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 17, 47], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 12, 13]] | 1 | 1,101 |
n, m = map(int,input().split())
a = list(map(int,input().split()))
get = sum(a)
num = 0
for i in range(n):
if 4 * m * a[i] > get:
num += 1
print('Yes') if num >= m else print('No')
| n, m = map(int,input().split())
a = list(map(int,input().split()))
get = sum(a)
num = 0
for i in range(n):
if 4 * m * a[i] >= get:
num += 1
print('Yes') if num >= m else print('No')
| [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 82 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define pb push_back
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
#define ferrari \
ios_base::sync_with_stdio(false); ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define pb push_back
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
#define ferrari \
ios_base::sync_with_stdio(false); ... | [["+", 36, 36, 36, 36, 0, 30, 0, 43, 49, 22], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 49, 22]] | 1 | 163 |
#include <bits/stdc++.h>
using namespace std;
template <class T> void ckmin(T &a, T b) { a = min(a, b); }
template <class T> void ckmax(T &a, T b) { a = max(a, b); }
#define pb push_back
#define mp make_pair
#define cotu cout
#define itn int
#define Red ... | #include <bits/stdc++.h>
using namespace std;
template <class T> void ckmin(T &a, T b) { a = min(a, b); }
template <class T> void ckmax(T &a, T b) { a = max(a, b); }
#define pb push_back
#define mp make_pair
#define cotu cout
#define itn int
#define Red ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13], ["+", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13]] | 1 | 457 |
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
for i in range(m):
if a[i] < sum(a) // (4*m):
print("No"); break
else: print("Yes")
| n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
for i in range(m):
if a[i] < sum(a) / (4*m):
print("No"); break
else: print("Yes")
| [["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 676], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 85]] | 5 | 82 |
n,m = map(int,input().split())
a = list(map(int,input().split()))
fl = "Yes"
a.sort(reverse = True)
s = sum(a)
for i in range(m):
if a[m] < s * (1 / (4*m)):
fl = "No"
print(fl) | n,m = map(int,input().split())
a = list(map(int,input().split()))
fl = "Yes"
a.sort(reverse = True)
s = sum(a)
for i in range(m):
if a[i] < s * (1 / (4*m)):
fl = "No"
print(fl) | [["-", 8, 196, 0, 57, 15, 666, 0, 206, 206, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 206, 22]] | 5 | 87 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
int N, M, Q, A[5005], B, C, X, Y, Z;
string s, t;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> N >> M;
for (int i = 1; i <= N; ++i)
cin >> A[i];
for (int i = 1; i <= N; ++i)
B += A[i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
int N, M, Q, A[5005], B, C, X, Y, Z;
string s, t;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> N >> M;
for (int i = 1; i <= N; ++i)
cin >> A[i];
for (int i = 1; i <= N; ++i)
B += A[i... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 170 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;
template... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;
template... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 193 |
import sys
sys.setrecursionlimit(10 ** 8)
input = sys.stdin.readline
def main():
N, M = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
total = sum(A)
ans = 0
for a in A:
if a >= (total // (4 * M)):
ans += 1
if ans >= M:
print("Yes")
... | import sys
sys.setrecursionlimit(10 ** 8)
input = sys.stdin.readline
def main():
N, M = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
total = sum(A)
ans = 0
for a in A:
if a >= (total / (4 * M)):
ans += 1
if ans >= M:
print("Yes")
e... | [["-", 0, 57, 15, 666, 0, 23, 0, 657, 17, 676], ["+", 0, 57, 15, 666, 0, 23, 0, 657, 17, 85]] | 5 | 119 |
#include <stdio.h>
int x[110];
int main() {
int a, b;
scanf("%d%d", &a, &b);
for (int i = 1; i <= a; i++)
scanf("%d", &x[i]);
int s = 0;
for (int i = 1; i <= a; i++)
s += x[i];
int count = 0;
for (int i = 1; i <= a; i++) {
if (x[i] < (s / (4 * b)))
;
else
count++;
}
print... | #include <stdio.h>
int x[110];
int main() {
int a, b;
scanf("%d%d", &a, &b);
for (int i = 1; i <= a; i++)
scanf("%d", &x[i]);
int s = 0;
for (int i = 1; i <= a; i++)
s += x[i];
int count = 0;
for (int i = 1; i <= a; i++) {
if (x[i] <= ((s - 1) / (4 * b)))
;
else
count++;
}
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 24], ["+", 12, 23, 0, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 12, 23, 0, 16, 31, 23, 0, 25]] | 1 | 147 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.