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 |
|---|---|---|---|---|
N,M = map(int,input().split())
list_N = list(map(int,input().split()))
count = 0
get = sum(list_N)/(4*M)
for i in range(N):
if list_N[i] > get:
count += 1
if count >= M:
print("Yes")
else:
print("No")
| N,M = map(int,input().split())
list_N = list(map(int,input().split()))
count = 0
get = sum(list_N)/(4*M)
for i in range(N):
if list_N[i] >= get:
count += 1
if count >= 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 | 86 |
#include <stdio.h>
int main() {
int unused __attribute__((unused));
int i, N, M, sum = 0, cnt = 0;
int A[1000];
unused = scanf("%d %d", &N, &M);
for (i = 0; i < N; i++) {
unused = scanf("%d", &A[i]);
sum += A[i];
}
for (i = 0; i < N; i++) {
if (A[i] >= sum / (4 * M))
cnt++;
}
if (c... | #include <stdio.h>
int main() {
int unused __attribute__((unused));
int i, N, M, sum = 0, cnt = 0;
int A[1000];
unused = scanf("%d %d", &N, &M);
for (i = 0; i < N; i++) {
unused = scanf("%d", &A[i]);
sum += A[i];
}
for (i = 0; i < N; i++) {
if (A[i] >= (double)sum / (4 * M))
cnt++;
}... | [["+", 15, 23, 0, 16, 12, 16, 31, 74, 0, 24], ["+", 0, 16, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 15, 23, 0, 16, 12, 16, 31, 74, 0, 25]] | 0 | 148 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, m, x, to;
vector<int> d;
cin >> n >> m;
to = 0;
for (int i = 0; i < n; ++i) {
cin >> x;
d.push_back(x);
to += x;
}
int y = to / (4 * m);
sort(d.begin(), d.end(), greater<in... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
float n, m, x, to;
vector<float> d;
cin >> n >> m;
to = 0;
for (int i = 0; i < n; ++i) {
cin >> x;
d.push_back(x);
to += x;
}
double y = to / (4 * m);
sort(d.begin(), d.end(), gre... | [["-", 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 | 138 |
#include <bits/stdc++.h>
#define EB emplace_back
#define int long long
#define F first
#define S second
#define N 100005
#define ALL(x) x.begin(), x.end()
#define endl '\n'
#define IOS \
ios::sync_with_stdio(0); ... | #include <bits/stdc++.h>
#define EB emplace_back
#define int long long
#define F first
#define S second
#define N 100005
#define ALL(x) x.begin(), x.end()
#define endl '\n'
#define IOS \
ios::sync_with_stdio(0); ... | [["+", 51, 16, 31, 23, 0, 16, 31, 16, 17, 72], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 31, 13], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 12, 22], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 17, 33], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 12, 13]] | 1 | 179 |
#include <algorithm>
#include <array>
#include <cmath>
#include <deque>
#include <iostream>
#include <string>
#include <unordered_map>
using namespace std;
int main() {
int n, m;
deque<int> a;
cin >> n >> m;
for (int i = 0; i < n; i++) {
int tmp;
cin >> tmp;
a.push_back(tmp);
}
int votes = ... | #include <algorithm>
#include <array>
#include <cmath>
#include <deque>
#include <iostream>
#include <string>
#include <unordered_map>
using namespace std;
int main() {
int n, m;
deque<int> a;
cin >> n >> m;
for (int i = 0; i < n; i++) {
int tmp;
cin >> tmp;
a.push_back(tmp);
}
int votes = ... | [["+", 0, 57, 15, 339, 51, 16, 12, 2, 63, 22], ["+", 15, 339, 51, 16, 12, 2, 3, 4, 0, 24], ["+", 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, 2, 3, 4, 0, 16, 12, 23, 0, 25]] | 1 | 178 |
N, M = gets.chomp.split(" ").map(&:to_i)
A = gets.chomp.split(" ").map(&:to_i).sort.reverse
all = A.inject(:+)
count = 0
A.each do |a|
if a > all.quo(4 * M)
count += 1
end
if count == M
break
end
end
if count == M
puts "Yes"
else
puts "No"
end
| N, M = gets.chomp.split(" ").map(&:to_i)
A = gets.chomp.split(" ").map(&:to_i).sort.reverse
all = A.inject(:+)
count = 0
A.each do |a|
if a >= all.quo(4 * M)
count += 1
end
if count == M
break
end
end
if count == M
puts "Yes"
else
puts "No"
end
| [["-", 196, 737, 8, 736, 0, 121, 15, 738, 17, 47], ["+", 196, 737, 8, 736, 0, 121, 15, 738, 17, 20]] | 4 | 96 |
# -*- coding: utf-8 -*-
n, m = map(int, input().split())
a = list(map(int, input().split()))
result = True
sum = 0
a.sort(reverse=True)
for i in range(n):
sum += a[i]
threshould = sum / 4 / m
print(threshould)
for i in range(m):
if a[i] < threshould:
result = False
if result:
print("Yes")
else:... | # -*- coding: utf-8 -*-
n, m = map(int, input().split())
a = list(map(int, input().split()))
result = True
sum = 0
a.sort(reverse=True)
for i in range(n):
sum += a[i]
threshould = sum / 4 / m
for i in range(m):
if a[i] < threshould:
result = False
if result:
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 | 109 |
from math import ceil
n,m = map(int,input().split())
l = list(map(int,input().split()))
l.sort(reverse=True)
val = sum(l)
f = 1
for i in range(m):
if l[i] < val//(4*m):
f = 0
break
if f:
print("Yes")
else:
print("No")
| from math import ceil
n,m = map(int,input().split())
l = list(map(int,input().split()))
l.sort(reverse=True)
val = sum(l)
f = 1
for i in range(m):
if l[i] < ceil(val/(4*m)):
f = 0
break
if f:
print("Yes")
else:
print("No")
| [["+", 8, 196, 0, 57, 15, 666, 0, 652, 63, 22], ["+", 0, 57, 15, 666, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 676], ["+", 15, 666, 0, 652, 3, 4, 0, 657, 17, 85], ["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 25]] | 5 | 97 |
#include <stdio.h>
int main() {
float m, n, ar[200005], sum = 0.0;
scanf("%f %f", &n, &m);
for (int i = 0; i < n; i++) {
scanf("%f", &ar[i]);
sum += ar[i];
}
float a = sum / (m * 4);
int cnt = 0;
for (int i = 0; i < n; i++) {
if (ar[i] > a)
cnt++;
}
if (cnt >= m)
printf("Yes\n")... | #include <stdio.h>
int main() {
float m, n, ar[200005], sum = 0.0;
scanf("%f %f", &n, &m);
for (int i = 0; i < n; i++) {
scanf("%f", &ar[i]);
sum += ar[i];
}
float a = sum / (m * 4);
int cnt = 0;
for (int i = 0; i < n; i++) {
if (ar[i] >= a)
cnt++;
}
if (cnt >= m)
printf("Yes\n"... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 138 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1L << 30
#define long long long
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1L << 30
#define long long long
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
... | [["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 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 | 233 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, i, sum = 0, maxi, *pt;
cin >> n >> m;
int arr[n];
for (i = 0; i < n; i++) {
cin >> arr[i];
sum += arr[i];
}
// int refer=sum/(4*m);
int cnt = 0;
for (i = 0; i < n; i++) {
int u = arr[i] * 4 * m;
if (u > sum) {
cnt... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, i, sum = 0, maxi, *pt;
cin >> n >> m;
int arr[n];
for (i = 0; i < n; i++) {
cin >> arr[i];
sum += arr[i];
}
// int refer=sum/(4*m);
int cnt = 0;
for (i = 0; i < n; i++) {
int u = arr[i] * 4 * m;
if (u >= sum) {
cn... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 139 |
#include <bits/stdc++.h>
using namespace std;
const string YES = "Yes";
const string NO = "No";
void solve(long long N, long long M, std::vector<long long> A) {
sort(A.begin(), A.end(), std::greater<long long>());
long long total = 0;
for (int i = 0; i < N; i++) {
total += A[i];
}
long long m = 0;
... | #include <bits/stdc++.h>
using namespace std;
const string YES = "Yes";
const string NO = "No";
void solve(long long N, long long M, std::vector<long long> A) {
sort(A.begin(), A.end(), std::greater<long long>());
long long total = 0;
for (int i = 0; i < N; i++) {
total += A[i];
}
long long m = 0;
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 278 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(n) begin(n), end(n)
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, n) {
cin >> a[i];
sum += a[i];
}
int ans = 0;
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(n) begin(n), end(n)
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
float m;
cin >> n >> m;
vector<int> a(n);
float sum = 0;
rep(i, n) {
cin >> a[i];
sum += a[i];
}
ll ... | [["-", 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], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 151 |
N,M=map(int,input().split())
A=list(map(int,input().split()))
ans='No'
sum=0
b=1/(4*M)
c=0
for i in range(N):
c+=A[i]
d=c*b
for i in range(N):
if d<A[i]:
sum=sum+1
if sum==M:
ans='Yes'
print(ans) | N,M=map(int,input().split())
A=list(map(int,input().split()))
ans='No'
sum=0
b=1/(4*M)
c=0
for i in range(N):
c+=A[i]
d=c*b
for i in range(N):
if d<=A[i]:
sum=sum+1
if sum==M:
ans='Yes'
print(ans) | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]] | 5 | 107 |
n,m=map(int,input().split())
a=list(map(int,input().split()))
t=sum(a)/(4*m)
count=0
for i in a:
if(i>t):
count+=1
if(count>=m):
print('Yes')
exit()
else:
continue
else:
continue
print('No') | n,m=map(int,input().split())
a=list(map(int,input().split()))
t=sum(a)/(4*m)
count=0
for i in a:
if(i>=t):
count+=1
if(count>=m):
print('Yes')
exit()
else:
continue
else:
continue
print('No') | [["-", 8, 196, 0, 57, 15, 23, 0, 666, 667, 47], ["+", 8, 196, 0, 57, 15, 23, 0, 666, 667, 20]] | 5 | 91 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define all(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define bit(n) (1 << (n))
using namespace std;
typedef long long ll;
typede... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define all(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define bit(n) (1 << (n))
using namespace std;
typedef long long ll;
typede... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 306 |
/*
AUTHOR:SOURABH
CREATED:03:04:20
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ordered_set \
tree<pll, null_type, less<pll>, rb_tree_tag, \
tree... |
/*
AUTHOR:SOURABH
CREATED:03:04:20
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ordered_set \
tree<pll, null_type, less<pll>, rb_tree_tag, \
tree... | [["-", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["-", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["-", 0, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 31, 22]] | 1 | 268 |
n,m=map(int,input().split())
a=list(map(int,input().split()))
sum=0
for i in a:
sum+=i
ans=0
for i in a:
if i*4*m>sum:
ans+=1
if ans>=m:
print('Yes')
else:
print('No')
| n,m=map(int,input().split())
a=list(map(int,input().split()))
sum=0
for i in a:
sum+=i
ans=0
for i in a:
if i*4*m>=sum:
ans+=1
if ans>=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 | 83 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int N, M;
cin >> N >> M;
vector<int> A(N);
int count = 0;
for (int i = 0; i < N; i++) {
cin >> A.at(i);
count += A.at(i);
}
int lim = count / (4 * M);
sort(A.begin(), A.end(), greater<int>());
if (A.at(M - 1) >= lim) {
co... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N, M;
cin >> N >> M;
vector<int> A(N);
int count = 0;
for (int i = 0; i < N; i++) {
cin >> A.at(i);
count += A.at(i);
}
double lim = (double)count / (4 * M);
sort(A.begin(), A.end(), greater<int>());
if (A.at(M - 1) >= li... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 43, 49, 50, 51, 16, 31, 74, 0, 24], ["+", 49, 50, 51, 16, 31, 74, 39, 77, 39, 40], ["+", 0, 43, 49, 50, 51, 16, 31, 74, 0, 25]] | 1 | 139 |
N,M = map(int, input().split())
A_list = list(map(int, input().split()))
count = 0
a_total = sum(A_list)
for A in A_list:
if(A > a_total/(4*M)):
count += 1
print("Yes" if(M <= count) else "No") | N,M = map(int, input().split())
A_list = list(map(int, input().split()))
count = 0
a_total = sum(A_list)
for A in A_list:
if(A >= a_total/(4*M)):
count += 1
print("Yes" if(M <= count) else "No") | [["-", 8, 196, 0, 57, 15, 23, 0, 666, 667, 47], ["+", 8, 196, 0, 57, 15, 23, 0, 666, 667, 20]] | 5 | 79 |
#include <algorithm>
#include <cstring>
#include <iostream>
#include <set>
#define ll long long
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int num[500];
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> num[i];
sum = sum + num[i];
} //输入完毕
int tot = (1 * 1.0 / (4 * m)) * sum;
int... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <set>
#define ll long long
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int num[500];
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> num[i];
sum = sum + num[i];
} //输入完毕
double tot = (1 * 1.0 / (4 * m)) * sum;
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 158 |
N,M = gets.split.map(&:to_i)
A = gets.split.map(&:to_i)
am = A.sort[-M]
s = A.reduce(&:+)
puts am < s / (4*M) ? 'No' : 'Yes' | N,M = gets.split.map(&:to_i)
A = gets.split.map(&:to_i)
am = A.sort[-M]
s = A.reduce(&:+)
puts am * 4*M < s ? 'No' : 'Yes' | [["-", 0, 652, 3, 4, 0, 754, 15, 738, 17, 18], ["-", 3, 4, 0, 754, 15, 738, 12, 738, 31, 22], ["-", 3, 4, 0, 754, 15, 738, 12, 738, 17, 85], ["-", 0, 754, 15, 738, 12, 738, 12, 739, 0, 24], ["+", 0, 754, 15, 738, 31, 738, 31, 738, 17, 48], ["-", 0, 754, 15, 738, 12, 738, 12, 739, 0, 25], ["+", 0, 652, 3, 4, 0, 754, 15,... | 4 | 60 |
/*
我的心脏怦怦跳,监管者就在附近
name:
Algorithm:
writer:Lxs(cdx)
place:
nothing is impossible
*/
#pragma GCC optimize(3, "Ofast", "inline")
#include <bits/stdc++.h>
#include <cmath>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <unistd.h>
#defin... | /*
我的心脏怦怦跳,监管者就在附近
name:
Algorithm:
writer:Lxs(cdx)
place:
nothing is impossible
*/
#pragma GCC optimize(3, "Ofast", "inline")
#include <bits/stdc++.h>
#include <cmath>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <unistd.h>
#defin... | [["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 39, 40], ["+", 0, 57, 15, 339, 51, 16, 12, 2, 63, 40], ["+", 15, 339, 51, 16, 12, 2, 3, 4, 0, 24], ["+", 12, 2, 3, 4, 0, 16, 12, 23, 0, 25]] | 1 | 226 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, c) for (ll i = 0; i < (ll)c; i++)
#define ll long long
const int inf = 1000000000; // 10^9
int main() {
ll n, m, a[110], all = 0, cnt = 0;
cin >> n >> m;
for (ll i = 0; i < n; i++) {
cin >> a[i];
all += a[i];
}
for (ll i = 0; i < n; i++) {... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, c) for (ll i = 0; i < (ll)c; i++)
#define ll long long
const int inf = 1000000000; // 10^9
int main() {
ll n, m, a[110], all = 0, cnt = 0;
cin >> n >> m;
for (ll i = 0; i < n; i++) {
cin >> a[i];
all += a[i];
}
for (ll i = 0; i < n; i++) {... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 85], ["-", 15, 339, 51, 16, 31, 16, 12, 23, 0, 24], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["-", 15, 339, 51, 16, 31, 16, 12, 23, 0, 25], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 48]] | 1 | 144 |
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
ans = []
for i in range(m+1) :
if a[i] < sum(a) / (4 * m) :
continue
else :
ans.append(a[-1])
if len(ans) == m :
print('Yes')
else :
print('No') | n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
ans = []
for i in range(m) :
if a[i] < sum(a) / (4 * m) :
continue
else :
ans.append(a[-1])
if len(ans) == m :
print('Yes')
else :
print('No') | [["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 107 |
#include <bits/stdc++.h>
using namespace std;
int main() {
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int N, M, K;
K = 0;
cin >> N >> M;
vector<int> a(N);
rep(i, N) {
cin >> a[i];
K += a[i];
}
sort(a.begin(), a.end());
reverse(a.begin(), a.end());
if (a[M - 1] < 4 * K * M)
cout ... | #include <bits/stdc++.h>
using namespace std;
int main() {
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int N, M, K;
K = 0;
cin >> N >> M;
vector<int> a(N);
rep(i, N) {
cin >> a[i];
K += a[i];
}
sort(a.begin(), a.end());
reverse(a.begin(), a.end());
if (a[M - 1] * 4 * M < K)
cout ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["-", 15, 339, 51, 16, 12, 16, 31, 16, 31, 13], ["-", 15, 339, 51, 16, 12, 16, 31, 16, 12, 22], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 126 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
int N, M, sum;
cin >> N >> M;
vector<int> v;
sum = 0;
for (int i = 0; i < N; i++) {
int A;
cin >> A;
v.push_back(A);
sum += A;
}
sort(v.begin(), v.end(), greater<int>());
bool selectable = tru... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
int N, M, sum;
cin >> N >> M;
vector<int> v;
sum = 0;
for (int i = 0; i < N; i++) {
int A;
cin >> A;
v.push_back(A);
sum += A;
}
sort(v.begin(), v.end(), greater<int>());
bool selectable = tru... | [["-", 12, 16, 12, 23, 0, 16, 12, 2, 63, 22], ["-", 12, 23, 0, 16, 12, 2, 3, 4, 0, 24], ["-", 12, 23, 0, 16, 12, 2, 3, 4, 0, 21], ["-", 12, 23, 0, 16, 12, 2, 3, 4, 0, 13], ["-", 12, 23, 0, 16, 12, 2, 3, 4, 0, 25]] | 1 | 181 |
<?php
fscanf(STDIN, "%d%d", $n, $m);
$list = explode(" ", trim(fgets(STDIN)));
$all = array_sum($list);
$limit = intdiv($all , 4*$m);
$count = 0;
foreach($list as $value){
if($value > $limit){
$count++;
}
}
if($count >= $m){
echo "Yes";
}else{
echo "No";
} | <?php
fscanf(STDIN, "%d%d", $n, $m);
$list = explode(" ", trim(fgets(STDIN)));
$all = array_sum($list);
$limit = $all/(4*$m);
$count = 0;
foreach($list as $value){
if($value >= $limit){
$count++;
}
}
if($count >= $m){
echo "Yes";
}else{
echo "No";
} | [["-", 0, 493, 0, 1, 0, 11, 12, 613, 63, 141], ["-", 0, 1, 0, 11, 12, 613, 3, 3, 0, 24], ["-", 0, 1, 0, 11, 12, 613, 3, 3, 0, 21], ["+", 0, 493, 0, 1, 0, 11, 12, 16, 17, 85], ["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 20]] | 6 | 109 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
def main():
N, M = map(int, input().split())
A = list(map(int, input().split()))
cnt = 0
for a in A:
if a > sum(A) / (4 * M):
cnt += 1
print("Yes"if cnt >= M else "No")
if __name__ == "__main__":
main()
| #!/usr/bin/env python3
# -*- coding: utf-8 -*-
def main():
N, M = map(int, input().split())
A = list(map(int, input().split()))
cnt = 0
for a in A:
if a < sum(A) / (4 * M):
continue
else:
cnt += 1
print("Yes"if cnt >= M else "No")
if __name__ == "__main_... | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 102], ["+", 8, 196, 0, 57, 64, 196, 0, 116, 0, 117], ["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95]] | 5 | 89 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int A[N];
long long sum_a = 0;
for (int i = 0; i < N; i++) {
cin >> A[i];
sum_a += A[i];
}
int cnt = 0;
for (int i = 0; i < N; i++) {
if (A[i] >= sum_a / (4 * M)) {
cnt++;
}
}
if (cnt >= M) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int A[N];
long long sum_a = 0;
for (int i = 0; i < N; i++) {
cin >> A[i];
sum_a += A[i];
}
int cnt = 0;
for (int i = 0; i < N; i++) {
if (A[i] >= (double)sum_a / (double)(4 * M)) {
cnt++;
}
}
... | [["+", 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], ["+", 15, 339, 51, 16, 12, 16, 12, 74, 0, 24], ["+", 51, 16, 12, 16, 12, 74, 39, 77, 39, 40], ["+", 15, 339, 51, 16, 12, 16, 12, 74, 0, 25]] | 1 | 133 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mod 1000000007
int main() {
ll n;
double m;
cin >> n >> m;
double a[n], sum = 0;
for (ll i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
double z = sum / (4 * m);
ll res = 0;
for (ll i = 0; i < n; ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mod 1000000007
int main() {
ll n;
double m;
cin >> n >> m;
double a[n], sum = 0;
for (ll i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
double z = sum / (4 * m);
ll res = 0;
for (ll i = 0; i < n; ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 140 |
N,M=gets.split.map(&:to_i)
a=gets.split.map(&:to_i)
total = a.reduce{|i,j| i+j}
a.sort!
if a.reverse[M-1] < total/(4*M)
puts "No"
else
puts "Yes"
end | N,M=gets.split.map(&:to_i)
a=gets.split.map(&:to_i)
total = a.reduce{|i,j| i+j}
a.sort!
if a.reverse[M-1] < total/(4*M).to_f
puts "No"
else
puts "Yes"
end
| [["+", 0, 121, 15, 738, 12, 738, 12, 652, 17, 131], ["+", 0, 121, 15, 738, 12, 738, 12, 652, 735, 22]] | 4 | 69 |
n,m=map(int,input().split())
a=[int(ss) for ss in input().split()]
a=sorted(a,reverse=True)
r="Yes"
for ii in range(m):
if a[ii]<1/(4*m):
r="No"
break
print(r) | n,m=map(int,input().split())
a=[int(ss) for ss in input().split()]
a=sorted(a,reverse=True)
r="Yes"
for ii in range(m):
if a[ii]<sum(a)/(4*m):
r="No"
break
print(r)
| [["-", 8, 196, 0, 57, 15, 666, 0, 657, 31, 612], ["+", 0, 57, 15, 666, 0, 657, 31, 652, 63, 22], ["+", 15, 666, 0, 657, 31, 652, 3, 4, 0, 24], ["+", 15, 666, 0, 657, 31, 652, 3, 4, 0, 22], ["+", 15, 666, 0, 657, 31, 652, 3, 4, 0, 25]] | 5 | 81 |
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<int> a(n);
int s = 0;
for (auto &x : a) {
cin >> x;
s += x;
}
int cnt = 0;
for (auto &x : a)
if (4 * m * x >= s)
++cnt;
cou... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<int> a(n);
int s = 0;
for (auto &x : a) {
cin >> x;
s += x;
}
int cnt = 0;
for (auto &x : a)
if (4 * m * x >= s)
++cnt;
cou... | [["-", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6]] | 1 | 124 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> v(n);
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> v[i];
sum += v[i];
}
double x = sum / (4 * m) + 0.0;
int cnt = 0;
for (int i = 0; i < n; i++) {
if (v[i] >= x)
cnt++;
}
if (cnt ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> v(n);
double sum = 0;
for (int i = 0; i < n; i++) {
cin >> v[i];
sum += v[i];
}
double x = sum / ((4 * m) + 0.0);
int cnt = 0;
for (int i = 0; i < n; i++) {
if (v[i] >= x)
cnt++;
}
if ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 24], ["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 25]] | 1 | 136 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, M, r = 0, B = 0;
cin >> N >> M;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A.at(i);
B += A.at(i);
}
sort(A.begin(), A.end());
reverse(A.begin(), A.end());
for (int i... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, M, r = 0, B = 0;
cin >> N >> M;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A.at(i);
B += A.at(i);
}
sort(A.begin(), A.end());
reverse(A.begin(), A.end());
for (int 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 | 177 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 0x3f3f3f3f;
const int N = 1e5 + 10;
const int MAX = 1e5 + 10;
const double exps = 1e-8;
#define swap(a, b) \
{ register int tmp = a, a = b, b = tmp; }
inline int max(int a, ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 0x3f3f3f3f;
const int N = 1e5 + 10;
const int MAX = 1e5 + 10;
const double exps = 1e-8;
#define swap(a, b) \
{ register int tmp = a, a = b, b = tmp; }
inline int max(int a, ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 215 |
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <algorithm>
#include <ccomplex>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <tuple>
#i... | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <algorithm>
#include <ccomplex>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <tuple>
#i... | [["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 78], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["-", 0, 14, 8, 9, 0, 9, 0, 43, 39, 78], ["+", 0, 14, 8, 9, 0, 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]] | 1 | 291 |
n, m = map(int, input(). split())
lstr_a = input().split(" ")
lint_a = [int(n) for n in lstr_a]
alist = sorted(lint_a, reverse = True)
s = sum(alist)
if alist[m-1]>=s//(4*m):
print("Yes")
else:
print("No") | n, m = map(int, input(). split())
lstr_a = input().split(" ")
lint_a = [int(n) for n in lstr_a]
alist = sorted(lint_a, reverse = True)
s = sum(alist)
if alist[m-1]>=s/(4*m):
print("Yes")
else:
print("No") | [["-", 0, 656, 0, 57, 15, 666, 0, 657, 17, 676], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 85]] | 5 | 86 |
(n,m)=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
a0 = sum(a)/(4*m)
m-=1
if a[m] > a0:
print("Yes")
else:
print("No") | (n,m)=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
a0 = sum(a)/(4*m)
m-=1
if a[m] >= a0:
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 |
N,M=map(int,input().split())
A=list(map(int,input().split()))
AA=sum(A)
count=0
for i in range(len(A)):
if A[i]>AA*(1/(4*M)):
count +=1
if count>=M:
print('Yes')
else:
print('No') | N,M=map(int,input().split())
A=list(map(int,input().split()))
AA=sum(A)
count=0
for i in range(len(A)):
if A[i]>=AA*(1/(4*M)):
count +=1
if count>=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 | 93 |
#include <bits/stdc++.h> //全ての標準ライブラリ
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int sumVector(const std::vector<int> &v) { // int配列計算
int sum = 0;
rep(i, v.size()) sum += v.at(i);
return sum;
}
int main(void) {
int n, m, sum = 0, cnt = 0;
cin >> n >> m;
std::vector<int> a(n);
rep(... | #include <bits/stdc++.h> //全ての標準ライブラリ
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int sumVector(const std::vector<int> &v) { // int配列計算
int sum = 0;
rep(i, v.size()) sum += v.at(i);
return sum;
}
int main(void) {
int n, m, sum = 0, cnt = 0;
cin >> n >> m;
std::vector<int> a(n);
rep(... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 43, 49, 50, 51, 16, 31, 2, 63, 40], ["+", 49, 50, 51, 16, 31, 2, 3, 4, 0, 24], ["+", 49, 50, 51, 16, 31, 2, 3, 4, 0, 25]] | 1 | 167 |
#include <bits/stdc++.h>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
using namespace std;
template <class T> using vec = std::vector<T>;
typedef long long ll;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
tem... |
#include <bits/stdc++.h>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
using namespace std;
template <class T> using vec = std::vector<T>;
typedef long long ll;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
tem... | [["-", 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, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8,... | 1 | 272 |
N,M= map(int, input().split())
A = list(map(int, input().split()))
all = sum(list(A))
p = 1/(4*M)*all
cnt = 0
for i in A:
if i > p:
cnt += 1
if cnt >= M :
print('Yes')
else:
print('No') | N,M= map(int, input().split())
A = list(map(int, input().split()))
all = sum(list(A))
p = 1/(4*M)*all
cnt = 0
for i in A:
if i >= p:
cnt += 1
if cnt >= 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 | 88 |
n,m = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)
cnt = 0
sum = a.inject(:+)
base = sum/4.0*m
n.times do |i|
if a[i] >= base
cnt += 1
end
end
if cnt >= m
puts "Yes"
else
puts "No"
end
| n,m = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)
cnt = 0
sum = a.inject(:+)
base = sum/(4.0*m)
n.times do |i|
if a[i] >= base
cnt += 1
end
end
if cnt >= m
puts "Yes"
else
puts "No"
end
| [["+", 0, 493, 0, 662, 12, 738, 12, 739, 0, 24], ["+", 0, 493, 0, 662, 12, 738, 12, 739, 0, 25]] | 4 | 75 |
n,m= map(int,input().split())
l = list(map(int,input().split()))
count=0
c = sum(l)/(4*m)
for i in l:
if i>c:
count+=1
if count>=m:
print("Yes")
else:
print("No")
| n,m= map(int,input().split())
l = list(map(int,input().split()))
count=0
c = sum(l)/(4*m)
for i in l:
if i>=c:
count+=1
if count>=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 | 80 |
//#include<iostream>
//#include<algorithm>
//#include<string>
//#include <cmath>
//#include <vector>
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define REP(x, n) for (int x = 0; x < n; x++)
// vector 操作 vector<int> data(10,5) 5が10個 data(10) 要素数10
// v.size(), v.empty(), v.insert(itr,値), v.er... | //#include<iostream>
//#include<algorithm>
//#include<string>
//#include <cmath>
//#include <vector>
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define REP(x, n) for (int x = 0; x < n; x++)
// vector 操作 vector<int> data(10,5) 5が10個 data(10) 要素数10
// v.size(), v.empty(), v.insert(itr,値), v.er... | [["-", 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]] | 1 | 214 |
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
ad=sum(a)
ad=ad//(4*m)
for i in range(m):
if a[i]<ad:
print("No")
break
else:
print("Yes")
| n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
#print(a)
ad=sum(a)
#print(ad)
ad=ad/(4*m)
#print(ad)
for i in range(m):
if a[i]<ad:
print("No")
break
else:
print("Yes")
| [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85]] | 5 | 87 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int C = 0;
int ans = 0;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A[i];
C += A[i];
}
double all = C / (4 * M);
sort(A.begin(), A.end());
reverse(A.begin(), A.end());
for (int i = 0; i < N; i++... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
double C = 0;
int ans = 0;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A[i];
C += A[i];
}
double all = C / (4 * M);
sort(A.begin(), A.end());
reverse(A.begin(), A.end());
for (int i = 0; i < N; ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 170 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//--<for debugging>
#define whatis(x) cout << #x << " is " << x << " ";
#define whatisl(x) cout << #x << " is " << x << "\n";
#define parr(array, end) \
for (ll loop = 0; loop < end; loop++) ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//--<for debugging>
#define whatis(x) cout << #x << " is " << x << " ";
#define whatisl(x) cout << #x << " is " << x << "\n";
#define parr(array, end) \
for (ll loop = 0; loop < end; loop++) ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 308 |
#include <assert.h>
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f(i, a, n) for (ll i = a; i < n; i++)
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, m;
cin >> n >> m;
int a[n];
int s = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
s = s + a[i... | #include <assert.h>
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f(i, a, n) for (ll i = a; i < n; i++)
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, m;
cin >> n >> m;
int a[n];
double s = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
s = s + ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 11, 12, 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 | 161 |
N,M = map(int, input().split())
A = list(map(int, input().split()))
th = sum(A)*0.25/M
A.sort(reverse=True)
if A[M] >= th:
print('Yes')
else:
print('No') | N,M = map(int, input().split())
A = list(map(int, input().split()))
th = sum(A)*0.25/M
A.sort(reverse=True)
if A[M-1] >= th:
print('Yes')
else:
print('No') | [["+", 0, 57, 15, 666, 0, 206, 206, 657, 17, 33], ["+", 0, 57, 15, 666, 0, 206, 206, 657, 12, 612]] | 5 | 73 |
#include <iostream>
using namespace std;
int main() {
int n, m, a[100000], sum = 0;
cin >> n >> m;
for (int i = 1; i <= n; i++)
cin >> a[i], sum += a[i];
int cnt = 0;
int x = (sum / (4 * m));
for (int i = 1; i <= n; i++) {
if (a[i] >= x)
cnt++;
}
if (cnt >= m)
cout << "Yes";
else... | #include <iostream>
using namespace std;
int main() {
double n, m, a[100000], sum = 0;
cin >> n >> m;
for (int i = 1; i <= n; i++)
cin >> a[i], sum += a[i];
double cnt = 0;
double x = sum / (4 * m);
for (int i = 1; i <= n; i++) {
if (a[i] >= x)
cnt++;
}
// cout<<x<<" "<<cnt;
if (cnt ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 43, 49, 50, 51, 23, 0, 24], ["-", 49, 50, 51, 23, 0, 16, 12, 23, 0, 25]] | 1 | 125 |
n,m=map(int,input().split())
a=list(map(int,input().split()))
sum = sum(a)
cnt=0
for i in a:
if i > (sum/(4*m)):
cnt+=1
if cnt >= m:
print('Yes')
else:
print('No') | n,m=map(int,input().split())
a=list(map(int,input().split()))
sum = sum(a)
cnt=0
for i in a:
if i >=sum/(4*m):
cnt+=1
if cnt >= m:
print('Yes')
else:
print('No') | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["-", 8, 196, 0, 57, 15, 666, 0, 23, 0, 24], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20], ["-", 15, 666, 0, 23, 0, 657, 12, 23, 0, 25]] | 5 | 82 |
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#define SIZE_OF_ARRAY(array) (sizeof(array) / sizeof(array[0]))
using namespace std;
int main() {
long N = 0, M = 0, a[1000] = {0}, max = 0;
cin >> N >> M;
for (int x = 0; x < N; x++) {
cin >> a[x];
max += a[x];
}
sort(a, a... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#define SIZE_OF_ARRAY(array) (sizeof(array) / sizeof(array[0]))
using namespace std;
int main() {
long N = 0, M = 0, a[2000] = {0}, max = 0;
cin >> N >> M;
for (int x = 0; x < N; x++) {
cin >> a[x];
max += a[x];
}
sort(a, a... | [["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["-", 3, 4, 0, 16, 12, 23, 0, 16, 31, 13], ["+", 3, 4, 0, 16, 12, 23, 0, 16, 31, 13]] | 1 | 140 |
n,m = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
b = []
for i in range(n):
if a[i]*4*m < s:
b.append(a[i])
if len(b) < m:
print("No")
else:
print("Yes") | n,m = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
b = []
for i in range(n):
if a[i]*4*m >= s:
b.append(a[i])
if len(b) < m:
print("No")
else:
print("Yes") | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 94 |
N, M = map(int, input().split(' '))
A = list(map(int, input().split(' ')))
def main(n, m, a):
# print(n,m,a)
x = [new_a for new_a in a if new_a >= sum(a) // (4 * m)]
# print(x)
if len(x) >= m:
res = 'Yes'
else:
res = 'No'
print(res)
main(N, M, A)
| N, M = map(int, input().split(' '))
A = list(map(int, input().split(' ')))
def main(n, m, a):
# print(n,m,a)
x = [new_a for new_a in a if not new_a < sum(a) / (4 * m)]
# print(x)
if len(x) >= m:
res = 'Yes'
else:
res = 'No'
print(res)
main(N, M, A)
| [["+", 0, 662, 12, 658, 0, 678, 0, 681, 0, 372], ["-", 0, 662, 12, 658, 0, 678, 0, 666, 667, 20], ["+", 12, 658, 0, 678, 0, 681, 28, 666, 667, 18], ["-", 12, 658, 0, 678, 0, 666, 0, 657, 17, 676], ["+", 0, 678, 0, 681, 28, 666, 0, 657, 17, 85]] | 5 | 105 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; 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, n) {
cin >> a[i];
sum += a[i];
}
int threshold = sum / (4 * m);
int count =... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; 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, n) {
cin >> a[i];
sum += a[i];
}
int threshold = ceil((double)sum / (4 * m));
... | [["+", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["+", 51, 2, 3, 4, 0, 16, 31, 74, 0, 24], ["+", 3, 4, 0, 16, 31, 74, 39, 77, 39, 40], ["+", 51, 2, 3, 4, 0, 16, 31, 74, 0, 25], ["+", 51, 2, 3, 4, 0, 16, 12, 23, 0, 25]] | 1 | 178 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define mod 1000000007
#define f(i, a, b) for (ll i = a; i < b; i++)
#define IOS \
ios::sync_with_stdio(0); \... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define mod 1000000007
#define f(i, a, b) for (ll i = a; i < b; i++)
#define IOS \
ios::sync_with_stdio(0); \... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 258 |
#include <bits/stdc++.h>
using namespace std;
int i;
int main() {
int n, m;
cin >> n >> m;
int a[n];
for (i = 0; i < n; i++)
cin >> a[i];
int total = 0;
for (i = 0; i < n; i++)
total += a[i];
int s = 0;
for (i = 0; i < n; i++) {
if (a[i] >= total / 4 / m)
s++;
}
if (s >= m)
co... | #include <bits/stdc++.h>
using namespace std;
int i;
int main() {
int n, m;
cin >> n >> m;
int a[n];
for (i = 0; i < n; i++)
cin >> a[i];
int total = 0;
for (i = 0; i < n; i++)
total += a[i];
int s = 0;
for (i = 0; i < n; i++) {
if (a[i] >= total / 4.0 / m)
s++;
}
if (s >= m)
... | [["-", 15, 339, 51, 16, 12, 16, 31, 16, 12, 13], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 12, 13]] | 1 | 139 |
#include <bits/stdc++.h>
#define REP(i, n) for (int(i) = 0; (i) < (n); ++(i))
#define REPV(iter, v) \
for (auto(iter) = (v).begin(); (iter) != (v).end(); ++(iter))
#define ALL(v) (v).begin(), (v).end()
#define MOD 1000000007
using namespace std;
typedef lon... | #include <bits/stdc++.h>
#define REP(i, n) for (int(i) = 0; (i) < (n); ++(i))
#define REPV(iter, v) \
for (auto(iter) = (v).begin(); (iter) != (v).end(); ++(iter))
#define ALL(v) (v).begin(), (v).end()
#define MOD 1000000007
using namespace std;
typedef lon... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 146 |
#include <iostream>
using namespace std;
int main() {
int i, n, m, sum = 0, k = 0;
int a[120] = {0};
cin >> n >> m;
for (i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
for (i = 0; i < n; i++) {
if (a[i] >= sum / (4 * m))
k++;
}
if (k >= m)
cout << "Yes" << endl;
else
cout... | #include <iostream>
using namespace std;
int main() {
int i, n, m, sum = 0, k = 0;
int a[120] = {0};
cin >> n >> m;
for (i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
for (i = 0; i < n; i++) {
if (a[i] >= 1.0 * sum / (4 * m))
k++;
}
if (k >= m)
cout << "Yes" << endl;
else
... | [["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 13], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 48]] | 1 | 131 |
n,m = map(int,input().split())
a= list(map(int,input().split()))
a = sorted(a)
a = a[::-1]
p = 1/(4*m)
s= sum(a)
p = p*s
if( a[m-1] >= p ):
print("YES")
else:
print("NO")
| n,m = map(int,input().split())
a= list(map(int,input().split()))
a = sorted(a)
a = a[::-1]
p = 1/(4*m)
s= sum(a)
p = p*s
# print(a[m-1])
if( a[m-1] >= p ):
print("Yes")
else:
print("No")
| [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 94 |
lismn=input().split()
n=int(lismn[0])
m=int(lismn[1])
lisa=[int(x) for x in input().split()]
count=0
for i in lisa:
if sum(lisa)/4.0/m < i:
count+=1
if m<=count:
print("Yes")
else:
print("No")
| lismn=input().split()
n=int(lismn[0])
m=int(lismn[1])
lisa=[int(x) for x in input().split()]
count=0
for i in lisa:
if sum(lisa)/4.0/m <= i:
count+=1
if m<=count:
print("Yes")
else:
print("No") | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]] | 5 | 87 |
N,M =gets.split.map(&:to_i)
A = gets.split.map(&:to_i)
A.sort.reverse[M-1] < (A.inject(0, :+) / (4 * M)) ? puts('No') : puts('Yes')
| require 'bigdecimal'
N,M =gets.split.map(&:to_i)
A = gets.split.map(&:to_i)
A.sort.reverse[M-1] < (A.inject(0, :+) / BigDecimal(4 * M)) ? puts('No') : puts('Yes')
| [["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 0, 493, 0, 652, 3, 4, 0, 557, 0, 62], ["+", 0, 493, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 15, 738, 12, 739, 0, 738, 12, 652, 735, 743]] | 4 | 65 |
/* Contest */
#include <bits/stdc++.h>
#define all(s) (s).begin(), (s).end()
#define rall(s) (s).rbegin(), (s).rend()
#define sep ios::sync_with_stdio(0), cin.tie(0)
using namespace std;
typedef long long ll;
int main() {
sep;
ll n, m, sum = 0, cnt = 0;
cin >> n >> m;
vector<ll> a(n);
for (auto &x : a)
ci... | /* Contest */
#include <bits/stdc++.h>
#define all(s) (s).begin(), (s).end()
#define rall(s) (s).rbegin(), (s).rend()
#define sep ios::sync_with_stdio(0), cin.tie(0)
using namespace std;
typedef long long ll;
int main() {
sep;
ll n, m, sum = 0, cnt = 0;
cin >> n >> m;
vector<ll> a(n);
for (auto &x : a)
ci... | [["+", 15, 339, 51, 16, 12, 16, 31, 2, 63, 40], ["+", 51, 16, 12, 16, 31, 2, 3, 4, 0, 24], ["+", 51, 16, 12, 16, 31, 2, 3, 4, 0, 25]] | 1 | 124 |
#include <bits/stdc++.h>
typedef long long int ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define Rep(i, n, m) for (int i = (n); i < (m); i++)
#define Sort(a) sort(a.begin(), a.end())
#define Reverse(a) reverse(a.begin(), a.end())
using namespace std;
int main() {
int n, m, sum = 0, count = 0;
string s = ... | #include <bits/stdc++.h>
typedef long long int ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define Rep(i, n, m) for (int i = (n); i < (m); i++)
#define Sort(a) sort(a.begin(), a.end())
#define Reverse(a) reverse(a.begin(), a.end())
using namespace std;
int main() {
int n, m, sum = 0, count = 0;
string s = ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 155 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
vector<int> A;
int sum = 0;
int point = 0;
cin >> N >> M;
for (int i = 0; i < N; i++) {
int a;
cin >> a;
sum += a;
A.push_back(a);
}
int mm = sum / (4 * M);
for (int i = 0; i < N; i++) {
if (A.at(i) >= mm) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
vector<int> A;
int sum = 0;
int point = 0;
cin >> N >> M;
for (int i = 0; i < N; i++) {
int a;
cin >> a;
sum += a;
A.push_back(a);
}
double mm = sum / (4.0 * M);
for (int i = 0; i < N; i++) {
if (A.at(i) >= mm) {
... | [["-", 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 | 145 |
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define endl '\n'
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
// const int mod=1e9+7;
const int mod = 998244353;
const double e... | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define endl '\n'
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
// const int mod=1e9+7;
const int mod = 998244353;
const double e... | [["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 25]] | 1 | 274 |
#include <bits/stdc++.h>
// Hey! 僕の提出を見てくれてありがとう.
// ロボ子さん可愛いぞ!!!!!君もV沼にはまろう↓
// https://www.youtube.com/channel/UCDqI2jOz0weumE8s7paEk6g
using namespace std;
using ll = long long;
ll gcd(ll a, ll b) {
return b ? gcd(b, a % b) : a;
} // a,bの最大公約数(gcd)を求める
ll lcm(ll a, ll b) {
return abs(a * b) / gcd(a, b);
} // a,b... | #include <bits/stdc++.h>
// Hey! 僕の提出を見てくれてありがとう.
// ロボ子さん可愛いぞ!!!!!君もV沼にはまろう↓
// https://www.youtube.com/channel/UCDqI2jOz0weumE8s7paEk6g
using namespace std;
using ll = long long;
ll gcd(ll a, ll b) {
return b ? gcd(b, a % b) : a;
} // a,bの最大公約数(gcd)を求める
ll lcm(ll a, ll b) {
return abs(a * b) / gcd(a, b);
} // a,b... | [["-", 31, 16, 12, 23, 0, 41, 15, 16, 17, 47], ["+", 31, 16, 12, 23, 0, 41, 15, 16, 17, 20]] | 1 | 504 |
/*
ID: computerbox --> Huseyn Hajiyev
LANG: C++
TASK: target_mode_on
*/
#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>
#include <functional>
#define ordered_set ... | /*
ID: computerbox --> Huseyn Hajiyev
LANG: C++
TASK: target_mode_on
*/
#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>
#include <functional>
#define ordered_set ... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 8, 9, 0, 1, 0, 11, 12, 74, 0, 24], ["+", 0, 1, 0, 11, 12, 74, 39, 77, 39, 40], ["+", 8, 9, 0, 1, 0, 11, 12, 74, 0, 25]] | 1 | 694 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int n, m;
cin >> n >> m;
int a[104] = {};
ll sum = 0;
REP(i, n) {
cin >> a[i];
sum += a[i];
}
int count = 0;
REP(i, n) {
if (sum < 4LL * m * a[i])
cou... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int n, m;
cin >> n >> m;
int a[104] = {};
ll sum = 0;
REP(i, n) {
cin >> a[i];
sum += a[i];
}
int count = 0;
REP(i, n) {
if (sum <= 4LL * m * a[i])
co... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 124 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
int A[1000];
cin >> N >> M;
for (int i = 0; i < N; i++) {
cin >> A[i];
}
int count = 0, sum = 0;
for (int i = 0; i < N; i++) {
sum = sum + A[i];
}
for (int i = 0; i < N; i++) {
if (A[i] >= sum / (4 * M)) {
count++... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
int A[1000];
cin >> N >> M;
for (int i = 0; i < N; i++) {
cin >> A[i];
}
int count = 0;
double sum = 0;
for (int i = 0; i < N; i++) {
sum = sum + A[i];
}
for (int i = 0; i < N; i++) {
if (A[i] >= sum / (4 * M)) {
... | [["-", 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]] | 1 | 152 |
n,m = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse=True)
def main():
s = sum(a)
thresh = s/4/m
if a[m-1]>thresh:
print('Yes')
else:
print('No')
if __name__ == "__main__":
main() | n,m = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse=True)
def main():
s = sum(a)
thresh = s/4/m
if a[m-1]>=thresh:
print('Yes')
else:
print('No')
if __name__ == "__main__":
main()
| [["-", 0, 14, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 14, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 92 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
int sum = 0;
cin >> N >> M;
std::vector<int> data(N);
for (int i = 0; i < N; i++) {
cin >> data.at(i);
sum += data.at(i);
}
int th = sum * 1.0 / (4 * M);
int count = 0;
for (int i = 0; i < data.size(); i++) {... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
int sum = 0;
cin >> N >> M;
std::vector<int> data(N);
for (int i = 0; i < N; i++) {
cin >> data.at(i);
sum += data.at(i);
}
double th = sum * 1.0 / (4 * M);
int count = 0;
for (int i = 0; i < data.size(); i++... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 155 |
#include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int A[N];
for (int i = 0; i < N; i++)
cin >> A[i];
int sum = 0;
for (int i = 0; i < N; i++)
sum += A[i];
float limit = sum / (4.0 * M);
int cnt = 0;
for (int i = 0; i < N; i++) {
if (limit < A[i]) {
cnt... | #include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int A[N];
for (int i = 0; i < N; i++)
cin >> A[i];
int sum = 0;
for (int i = 0; i < N; i++)
sum += A[i];
float limit = sum / (4.0 * M);
int cnt = 0;
for (int i = 0; i < N; i++) {
if (limit <= A[i]) {
cn... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 146 |
#
def main():
n, m = map(int, input().split(" "))
a = [int(s) for s in input().split(" ")]
total = sum(a)
lim = total // (4 * m)
a = sorted(a, reverse=True)
count = 0
for i in a:
if i >= lim:
count += 1
else:
break
if count >= m:
print("Y... | #
def main():
n, m = map(int, input().split(" "))
a = [int(s) for s in input().split(" ")]
total = sum(a)
lim = total / (4 * m)
a = sorted(a, reverse=True)
count = 0
for i in a:
if i >= lim:
count += 1
else:
break
if count >= m:
print("Ye... | [["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 85]] | 5 | 119 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> vote(N);
for (int i = 0; i < N; i++)
cin >> vote.at(i);
int total = 0;
for (int i = 0; i < N; i++)
total += vote.at(i);
int count = 0;
for (int i = 0; i < N; i++) {
if (vote.at(i) >= total * (1 /... | #include <bits/stdc++.h>
using namespace std;
int main() {
double N, M;
cin >> N >> M;
vector<double> vote(N);
for (int i = 0; i < N; i++)
cin >> vote.at(i);
double total = 0;
for (int i = 0; i < N; i++)
total += vote.at(i);
double count = 0;
for (int i = 0; i < N; i++) {
if (vote.at(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 | 151 |
n, m = gets.rstrip.split(" ").map { |c| c.to_i}
a = gets.rstrip.split(" ").map {|c| c.to_i }
total = 0
a.each { |ai| total += ai }
cnt = 0
a.each do |ai|
if ai >= total/(4*m) then
cnt += 1
end
end
if cnt >= m then
puts "Yes"
else
puts "No"
end | n, m = gets.rstrip.split(" ").map { |c| c.to_i}
a = gets.rstrip.split(" ").map {|c| c.to_i }
total = 0
a.each { |ai| total += ai }
cnt = 0
a.each do |ai|
if ai >= total.to_f/(4*m) then
cnt += 1
end
end
if cnt >= m then
puts "Yes"
else
puts "No"
end | [["+", 0, 121, 15, 738, 12, 738, 31, 652, 17, 131], ["+", 0, 121, 15, 738, 12, 738, 31, 652, 735, 22]] | 4 | 101 |
n,m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
cnt =0
goukei = sum(a)
for i in range(m):
if a[i] <= (1/(4*m) * goukei):
continue
else:
cnt+=1
if cnt == m:
print("Yes")
else:
print("No")
| n,m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
cnt =0
goukei = sum(a)
for i in range(m):
if a[i] < (1/(4*m) * goukei):
continue
else:
cnt+=1
if cnt == m:
print("Yes")
else:
print("No")
| [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18]] | 5 | 101 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, a[1500];
scanf("%d%d", &n, &m);
int s = 0;
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
s += a[i];
}
s /= 4 * m;
int ss = 0;
for (int i = 0; i < n; i++) {
if (a[i] >= s)
ss++;
}
if (ss >= m)
printf("Yes\n... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, a[1500];
scanf("%d%d", &n, &m);
double s = 0;
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
s += a[i];
}
s /= 4 * m;
int ss = 0;
for (int i = 0; i < n; i++) {
if (a[i] >= s)
ss++;
}
if (ss >= m)
printf("Ye... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 138 |
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
s = sum(a)
limit = s // (4*m)
for i in range(m):
if a[i] < limit:
print("No")
exit()
print("Yes")
| n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
s = sum(a)
limit = s / (4*m)
for i in range(m):
if a[i] < limit:
print("No")
exit()
print("Yes")
| [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85]] | 5 | 87 |
#include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define reprev(i, n) for (int i = n - 1; i >= 0; i--)
int main() {
int M, N;
vector<int> A(1001);
int count = 0;
ll sum = 0;
cin >> N >> M;
rep(i, N) cin >> A.at(i);
rep(i, N) sum += A.at(i);... | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define reprev(i, n) for (int i = n - 1; i >= 0; i--)
int main() {
int M, N;
vector<int> A(1001);
int count = 0;
ll sum = 0;
cin >> N >> M;
rep(i, N) cin >> A.at(i);
rep(i, N) sum += A.at(i);... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 143 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, sum = 0, range;
cin >> n >> m;
int arr[n], c = 0;
for (int i = 0; i < n; i++) {
cin >> arr[i];
sum += arr[i];
}
sort(arr, arr + n);
range = (sum) / (4 * m); // float naw if wrong
for (int i = 0; i < n; i++) {
if (arr[i]... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
float m, sum = 0, range;
cin >> n >> m;
float arr[n], c = 0;
for (int i = 0; i < n; i++) {
cin >> arr[i];
sum += arr[i];
}
sort(arr, arr + n);
range = (sum) / (4 * m); // float naw if wrong
for (int i = 0; i < n; i++) {
... | [["-", 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 | 141 |
package main
import (
"fmt"
//"sort"
)
func main() {
var n int
var m,sum float64
var standard float64
fmt.Scan(&n,&m)
votes := make([]float64,n)
for i,_ := range votes {
fmt.Scan(&votes[i])
sum += votes[i]
}
standard = sum * (1 / (4 * m))
cnt := 0.0
for i,_ := range votes {
fmt.Scan(&votes[i])
... | package main
import (
"fmt"
)
func main() {
var n int
var m,sum,standard float64
fmt.Scan(&n,&m)
votes := make([]float64,n)
for i,_ := range votes {
fmt.Scan(&votes[i])
sum += votes[i]
}
standard = sum * (1 / (4 * m))
cnt := 0.0
for i,_ := range votes {
fmt.Scan(&votes[i])
if votes[i] >= standar... | [["-", 0, 435, 8, 196, 0, 440, 0, 441, 39, 78], ["-", 36, 36, 0, 434, 0, 435, 8, 196, 0, 165], ["-", 0, 434, 0, 435, 8, 196, 0, 440, 0, 217], ["+", 0, 435, 8, 196, 0, 440, 0, 441, 141, 21], ["-", 0, 7, 8, 196, 0, 57, 15, 16, 17, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 16, 17, 20]] | 7 | 162 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vll = vector<ll>;
using P = pair<int, int>;
const int INF = 1e9;
const ll INFLL = 1e18;
const int MOD = 1e9 + 7;
const int NIL = -1;
const ld PI = acosl(-1);
#define rep(i, n) for (int i = 0; i <... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vll = vector<ll>;
using P = pair<int, int>;
const int INF = 1e9;
const ll INFLL = 1e18;
const int MOD = 1e9 + 7;
const int NIL = -1;
const ld PI = acosl(-1);
#define rep(i, n) for (int i = 0; i <... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 304 |
# -*- coding: utf-8 -*-
N,M = list(map(int,input().split()))
A = list(map(int,input().split()))
sre = (1/(4*M))*sum(A)
cor = []
for a in A:
if a > sre:
cor.append(a)
if len(cor) > M or len(cor) == M:
print('Yes')
else:
print('No') | # -*- coding: utf-8 -*-
N,M = list(map(int,input().split()))
A = list(map(int,input().split()))
sre = (1/(4*M))*sum(A)
cor = []
for a in A:
if a > sre or a == sre:
cor.append(a)
#print(len(cor))
if len(cor) > M or len(cor) == M:
print('Yes')
else:
print('No') | [["+", 0, 7, 8, 196, 0, 57, 15, 679, 17, 354], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 667, 60]] | 5 | 102 |
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
#define f first
#define s second
#define sf(a) scanf("%d", &a)
#define sfl(a) scanf("%lld", &a)
#define pf(a) printf("%d ", a)
#define pfl(a) printf("%lld\n", a)
#define Case(a) printf("Case %d: ", a)
using namespace std;
int main() {
int n, m;... | #include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
#define f first
#define s second
#define sf(a) scanf("%d", &a)
#define sfl(a) scanf("%lld", &a)
#define pf(a) printf("%d ", a)
#define pfl(a) printf("%lld\n", a)
#define Case(a) printf("Case %d: ", a)
using namespace std;
int main() {
int n, m;... | [["-", 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 | 156 |
line = input().rstrip().split(' ')
n = int(line[0])
m = int(line[1])
line = input().rstrip().split(' ')
a = [0] * n
total = 0
for i in range(n):
a[i] = int(line[i])
total += a[i]
list.sort(a, reverse=True)
b = total / (4 * m)
ans = 'Yes'
for i in range(m):
if a[i] < int(b):
ans = 'No'
print(ans) | line = input().rstrip().split(' ')
n = int(line[0])
m = int(line[1])
line = input().rstrip().split(' ')
a = [0] * n
total = 0
for i in range(n):
a[i] = int(line[i])
total += a[i]
list.sort(a, reverse=True)
b = total / (4 * m)
ans = 'Yes'
for i in range(m):
if a[i] < b:
ans = 'No'
print(ans) | [["-", 8, 196, 0, 57, 15, 666, 0, 652, 63, 22], ["-", 0, 57, 15, 666, 0, 652, 3, 4, 0, 24], ["-", 0, 57, 15, 666, 0, 652, 3, 4, 0, 25]] | 5 | 138 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <numeric>
#include <sstream>
#include <vector>
using namespace std;
int main(void) {
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.at(i);
s... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <numeric>
#include <sstream>
#include <vector>
using namespace std;
int main(void) {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, m;
double sum = 0;
cin >> n >> m;
vector<int> v(n);
for (int i = 0; i < n; i++) {
cin >> v.at(... | [["-", 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]] | 1 | 166 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> a(N);
for (int i = 0; i < N; i++) {
cin >> a.at(i);
}
sort(a.begin(), a.end(), greater<int>());
int sum = accumulate(a.begin(), a.end(), 0);
if (a.at(M - 1) > ((double)sum) / (4 * M))
cout << "Yes" <... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> a(N);
for (int i = 0; i < N; i++) {
cin >> a.at(i);
}
sort(a.begin(), a.end(), greater<int>());
int sum = accumulate(a.begin(), a.end(), 0);
if ((double)a.at(M - 1) >= ((double)sum) / (4 * M))
cout <... | [["+", 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], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 140 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define SIZE_OF_ARRAY(array) (sizeof(array) / sizeof(array[0]))
int main() {
int N, M;
cin >> N >> M;
vector<int> A(N);
rep(i, N) { cin >> A.at(i); }
int sum = accumul... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define SIZE_OF_ARRAY(array) (sizeof(array) / sizeof(array[0]))
int main() {
double N, M;
cin >> N >> M;
vector<int> A(N);
rep(i, N) { cin >> A.at(i); }
int sum = accu... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 51, 16, 12, 23, 0, 16, 12, 23, 0, 24], ["+", 0, 16, 12, 23, 0, 16, 12, 23, 0, 25]] | 1 | 174 |
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define INF (1 << 30) + 100
using namespace std;
ifstream fin("");
ofstream fout("");
int n, k, x, y, z;
vector<int> v;
int main() {
cin >> n >> k;
for (int i = 0; i < n; i... | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define INF (1 << 30) + 100
using namespace std;
ifstream fin("");
ofstream fout("");
int n, k, x, y, z;
vector<int> v;
int main() {
cin >> n >> k;
for (int i = 0; i < n; i... | [["+", 12, 2, 3, 4, 0, 16, 31, 16, 31, 13], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 17, 48], ["-", 3, 4, 0, 16, 12, 23, 0, 16, 31, 13], ["+", 3, 4, 0, 16, 12, 23, 0, 16, 31, 13]] | 1 | 155 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, m, r = 0, rs = 0;
cin >> n >> m;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
r += a[i];
}
for (int i = 0; i < n; i++) {
if (a[i] >= r / (4 * m)) {
rs++;
}
}
if (rs >= m) {
cout << "Yes" <... | #include <iostream>
#include <string>
using namespace std;
int main() {
long n, m, r = 0, rs = 0;
cin >> n >> m;
long a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
r += a[i];
}
for (int i = 0; i < n; i++) {
if (a[i] >= r / (4.0 * m)) {
rs++;
}
}
if (rs >= m) {
cout << "Yes... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13], ["+", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13]] | 1 | 135 |
import sys
stdin = sys.stdin
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))
n,m=nm()
a=nl()
j=0
count=sum(a)/(4*m)
for i in a:
if i>count:
j+=1
if j<m:
print("No")
... | import sys
stdin = sys.stdin
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))
n,m=nm()
a=nl()
j=0
count=sum(a)/(4*m)
for i in a:
if i>=count:
j+=1
if j<m:
print("No")... | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 134 |
#include <bits/stdc++.h>
using namespace std;
int a[1050];
int main() {
int n, m, sum = 0;
cin >> n >> m;
for (int i = 1; i <= n; i++) {
cin >> a[i];
sum += a[i];
}
double gg = sum * 1.0 / (4 * m);
int sum1 = 0;
for (int i = 1; i < n; i++) {
if (a[i] >= gg) {
sum1++;
}
}
if (sum... | #include <bits/stdc++.h>
using namespace std;
int a[1050];
int main() {
int n, m, sum = 0;
cin >> n >> m;
for (int i = 1; i <= n; i++) {
cin >> a[i];
sum += a[i];
}
double gg = (sum * 1.0) / (4 * m);
int sum1 = 0;
for (int i = 1; i <= n; i++) {
if (a[i] >= gg) {
sum1++;
}
}
if (... | [["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 25], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 141 |
N, M = map(int, input().split())
A = sorted(map(int, input().split()))
sum_a = sum(A)
border = sum_a // (4*M)
if A[-M] >= border:
print('Yes')
else:
print('No') | N, M = map(int, input().split())
A = sorted(map(int, input().split()))
sum_a = sum(A)
border = sum_a / (4*M)
if A[-M] >= border:
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 | 71 |
#include "bits/stdc++.h"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
using namespace __gnu_pbds;
using namespace __gnu_cxx;
using namespace std;
using ll = long long;
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define ff first
#define ss s... |
#include "bits/stdc++.h"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
using namespace __gnu_pbds;
using namespace __gnu_cxx;
using namespace std;
using ll = long long;
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define ff first
#define ss s... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["-", 64, 9, 0, 1, 0, 11, 12, 27, 28, 22]] | 1 | 518 |
#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
const ll mod = 1000000007;
const ll INF = 1e15;
#define REP(i, a, b) for (ll i = a; i < b; i++)
#define rep(i, n) REP(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
#define U_ERASE(V)... | #include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
const ll mod = 1000000007;
const ll INF = 1e15;
#define REP(i, a, b) for (ll i = a; i < b; i++)
#define rep(i, n) REP(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
#define U_ERASE(V)... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 247 |
#include <bits/stdc++.h>
#define ll long long int
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define p... | #include <bits/stdc++.h>
#define ll long long int
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define p... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 182 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.