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 |
|---|---|---|---|---|
#define _GLIBCXX_DEBUG //エラーを出すためのおまじない
#include <bits/stdc++.h>
//#include <cstdlib> // abs() for integer
#include <cmath> // abs() for float, and fabs()
#include <math.h>
using namespace std;
#define coYES cout << "YES" << endl
#define coNO cout << "NO" << endl
#define coYes cout << "Yes" << endl
#define coNo cout <... | #define _GLIBCXX_DEBUG //エラーを出すためのおまじない
#include <bits/stdc++.h>
//#include <cstdlib> // abs() for integer
#include <cmath> // abs() for float, and fabs()
#include <math.h>
using namespace std;
#define coYES cout << "YES" << endl
#define coNO cout << "NO" << endl
#define coYes cout << "Yes" << endl
#define coNo cout <... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 168 |
#include "bits/stdc++.h"
#include <stdio.h>
#pragma warning(disable : 4996)
typedef long long ll;
#define all(x) (x).begin(), (x).end() // sortなどの引数を省略
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define max3(x, y, z) max(x, max(y, z))
#define min3(x, y, z) min(x, min(y, z))
#ifdef _MSC_FULL_VER //デバッグ出力
#defi... | #include "bits/stdc++.h"
#include <stdio.h>
#pragma warning(disable : 4996)
typedef long long ll;
#define all(x) (x).begin(), (x).end() // sortなどの引数を省略
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define max3(x, y, z) max(x, max(y, z))
#define min3(x, y, z) min(x, min(y, z))
#ifdef _MSC_FULL_VER //デバッグ出力
#defi... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 334 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a[n];
int i;
int all = 0;
for (i = 0; i < n; i++) {
cin >> a[i];
all += a[i];
}
double bunki = all / 4 / m;
sort(a, a + n, std::greater<>());
for (i = 0; i < m; i++) {
if (a[i] < bunki) {
std:... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
double m;
cin >> n >> m;
int a[n];
int i;
double all = 0;
for (i = 0; i < n; i++) {
cin >> a[i];
all += a[i];
}
double bunki = all / 4.0 / m;
sort(a, a + n, std::greater<>());
for (i = 0; i < m; i++) {
if (a[i] < bunki... | [["-", 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, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13]] | 1 | 148 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, votes = 0, i, cnt = 0;
cin >> n >> m;
int t[n];
for (i = 0; i < n; ++i) {
cin >> t[i];
votes += t[i];
}
i = 0;
cnt = 0;
int cmp = round((double)votes / (4 * m));
while (cnt < m && i < n) {
if (t[i] >= cmp) {
cnt++... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, votes = 0, i, cnt = 0;
cin >> n >> m;
int t[n];
for (i = 0; i < n; ++i) {
cin >> t[i];
votes += t[i];
}
i = 0;
cnt = 0;
int cmp = ceil((double)votes / (4 * m));
while (cnt < m && i < n) {
if (t[i] >= cmp) {
cnt++;... | [["-", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22]] | 1 | 148 |
n, m = map(int, input().split())
in_list = input().split
vote_list = [int(i) for i in in_list]
ans = 0
for ai in vote_list:
if ai >= 1/(4*m)*sum(vote_list):
ans += 1
if ans < m :
print('no')
else:
print('yes') | n, m = map(int, input().split())
in_list = input().split()
vote_list = [int(i) for i in in_list]
ans = 0
for ai in vote_list:
if ai >= 1/(4*m)*sum(vote_list):
ans += 1
if ans < m :
print('No')
else:
print('Yes') | [["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 81 |
n,m = map(int,input().split())
a = list(map(int,input().split()))
k = sum(a)*(1/4*m)
b = [i for i in a if i >= k]
if len(b) >= m:
print('Yes')
else:
print('No')
| n,m = map(int,input().split())
a = list(map(int,input().split()))
k = sum(a)*(1/(4*m))
b = [i for i in a if i >= k]
if len(b) >= m:
print('Yes')
else:
print('No')
| [["+", 12, 657, 12, 23, 0, 657, 12, 23, 0, 24], ["+", 12, 657, 12, 23, 0, 657, 12, 23, 0, 25]] | 5 | 82 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int n, m;
cin >> n >> m;
vector<int> a(n);
for (int i = 0; i < n; ++i)
cin >> a[i];
int sum = 0, res = 0;
for (int i = 0; i < n; ++i)
sum += a[i];
sum /= 4 * m;
for (int i = 0; i < n; ++i)
if (a[i] >= sum)
++res;
if (res ... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n, m;
cin >> n >> m;
vector<int> a(n);
for (int i = 0; i < n; ++i)
cin >> a[i];
long double sum = 0, res = 0;
for (int i = 0; i < n; ++i)
sum += a[i];
sum /= 4 * m;
for (int i = 0; i < n; ++i)
if (a[i] >= sum)
++res;
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 39, 40]] | 1 | 138 |
# coding=utf-8
if __name__ == '__main__':
N, M = map(int, input().split())
li = list(map(int, input().split()))
lisum = sum(li)
cnt = 0
for i in range(N):
if lisum / (M * 4) < li[i]:
cnt += 1
if M <= cnt:
print('Yes')
else:
print('No')
| # coding=utf-8
if __name__ == '__main__':
N, M = map(int, input().split())
li = list(map(int, input().split()))
lisum = sum(li)
cnt = 0
for i in range(N):
if lisum / (M * 4) <= li[i]:
cnt += 1
if M <= cnt:
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 | 94 |
#include <bits/stdc++.h>
using namespace std;
#define very_slow \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define int long... | #include <bits/stdc++.h>
using namespace std;
#define very_slow \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define int long... | [["+", 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 | 293 |
N,M = map(int,input().split())
Alist = list(map(int,input().split()))
Alist = sorted(Alist,reverse=True)
#print (sum(Alist))
Ans = "No"
for i in range(M):
#print (Alist[i])
#print((sum(Alist)/4*M))
if Alist[i]>(sum(Alist)/(4*M)):
Ans ="Yes"
else:
Ans = "No"
print (Ans) | N,M = map(int,input().split())
Alist = list(map(int,input().split()))
Alist = sorted(Alist,reverse=True)
#print (sum(Alist))
Ans = "No"
for i in range(M):
#print (Alist[i])
#print((sum(Alist)/4*M))
if Alist[i]>=(sum(Alist)/(4*M)):
Ans ="Yes"
else:
Ans = "No"
print (Ans) | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 94 |
N,M=map(int,input().split())
A=list(map(int,input().split()))
A.sort(reverse=True)
if A[M]>=sum(A)/(4*M):
print('Yes')
else:
print('No')
| N,M=map(int,input().split())
A=list(map(int,input().split()))
A.sort(reverse=True)
if A[M-1]>=sum(A)/(4*M):
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 | 72 |
#include <bits/stdc++.h>
int main() {
int n, m;
std::cin >> n >> m;
std::vector<int> a(n);
for (int i = 0; i < n; ++i)
std::cin >> a[i];
int sum = std::accumulate(a.begin(), a.end(), 0);
int cnt = 0;
for (int i = 0; i < n; ++i)
if (a[i] >= (sum / (4 * m)))
++cnt;
if (cnt >= m)
std::c... | #include <bits/stdc++.h>
int main() {
int n, m;
std::cin >> n >> m;
std::vector<int> a(n);
for (int i = 0; i < n; ++i)
std::cin >> a[i];
int sum = std::accumulate(a.begin(), a.end(), 0);
int cnt = 0;
for (int i = 0; i < n; ++i)
if (a[i] >= ((double)sum / (4 * m)))
++cnt;
if (cnt >= m)
... | [["+", 51, 16, 12, 23, 0, 16, 31, 74, 0, 24], ["+", 12, 23, 0, 16, 31, 74, 39, 77, 39, 40], ["+", 51, 16, 12, 23, 0, 16, 31, 74, 0, 25]] | 1 | 150 |
#include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int A[N];
int sum = 0;
int popular_product = 0;
for (int i = 0; i < N; i++) {
cin >> A[i];
sum += A[i];
}
for (int i = 0; i < N; i++) {
if (sum / 4 / M <= A[i]) {
popular_product += 1;
}
}
if (popul... | #include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int A[N];
double sum = 0;
int popular_product = 0;
for (int i = 0; i < N; i++) {
cin >> A[i];
sum += A[i];
}
for (int i = 0; i < N; i++) {
if (sum / 4 / M <= A[i]) {
popular_product += 1;
}
}
if (po... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 131 |
#include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define all(x) (x).begin(), (x).end()
templa... | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define all(x) (x).begin(), (x).end()
templa... | [["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 24], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 17, 48], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 12, 22], ["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 25]] | 1 | 257 |
#include <bits/stdc++.h>
#define mp make_pair
#define endl "\n"
#define v vector
#define b begin()
#define e end()
using namespace std;
typedef long long ll;
typedef long l;
typedef long long unsigned ull;
int main() {
int n, m;
vector<int> arr;
cin >> n >> m;
int sum = 0, total = 0;
for (int i = 0; i < n; ... | #include <bits/stdc++.h>
#define mp make_pair
#define endl "\n"
#define v vector
#define b begin()
#define e end()
using namespace std;
typedef long long ll;
typedef long l;
typedef long long unsigned ull;
int main() {
float n, m;
vector<int> arr;
cin >> n >> m;
int sum = 0, total = 0;
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], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 169 |
n,m = map(int,input().split())
hyo = list(map(int,input().split()))
all_hyo = sum(hyo)
hyo.sort(reverse=True)
a = True
for x in range(m):
if hyo[m] < all_hyo / 4 / m:
a = False
break
if a :
print("Yes")
else:
print("No") | n,m = map(int,input().split())
hyo = list(map(int,input().split()))
all_hyo = sum(hyo)
hyo.sort(reverse=True)
a = True
for x in range(m):
if hyo[x] < all_hyo / 4 / m:
a = False
break
if a :
print("Yes")
else:
print("No")
| [["-", 8, 196, 0, 57, 15, 666, 0, 206, 206, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 206, 22]] | 5 | 91 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, sum = 0;
cin >> N >> M;
vector<int> A(N);
bool ans = true;
for (int i = 0; i < N; i++) {
cin >> A.at(i);
sum += A.at(i);
}
sort(A.begin(), A.end());
reverse(A.begin(), A.end());
int judge = sum / (4 * M);
for (int i = 0;... | #include <bits/stdc++.h>
using namespace std;
int main() {
double N, M, sum = 0;
cin >> N >> M;
vector<int> A(N);
bool ans = true;
for (int i = 0; i < N; i++) {
cin >> A.at(i);
sum += A.at(i);
}
sort(A.begin(), A.end());
reverse(A.begin(), A.end());
double judge = sum / (4 * M);
for (int ... | [["-", 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;
using ll = long long;
int main() {
ll m, n, i, j, total = 0, cnt = 0;
cin >> n >> m;
ll a[n];
for (i = 0; i < n; i++) {
cin >> a[i];
total += a[i];
}
for (i = 0; i < n; i++) {
if (a[i] * 4 * m < total)
cnt++;
}
if (cnt >= m)
cout <... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll m, n, i, total = 0, cnt = 0;
cin >> n >> m;
ll a[n];
for (i = 0; i < n; i++) {
cin >> a[i];
total += a[i];
}
for (i = 0; i < n; i++) {
if (a[i] * 4 * m >= total)
cnt++;
}
if (cnt >= m)
cout <<... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 133 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
double m = sc.nextDouble();
double[] a = new double[n];
double sum = 0.0;
for (int i = 0; i < n; i++) {
a[i] = sc.nextDouble();
sum += ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
double m = sc.nextDouble();
double[] a = new double[n];
double sum = 0.0;
for (int i = 0; i < n; i++) {
a[i] = sc.nextDouble();
sum += ... | [["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 47], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 20]] | 3 | 176 |
import java.util.Scanner;
public 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 total = 0;
int count = 0;
for (int i = 0; i < n; i++) {
a[i] = sc.nextInt();
total ... | import java.util.Scanner;
public 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];
double total = 0;
int count = 0;
for (int i = 0; i < n; i++) {
a[i] = sc.nextInt();
tot... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 511, 0, 512]] | 3 | 171 |
def main():
N, M = map(int, input().split())
A = list(map(int, input().split()))
cnt = 0
for i in A:
if i/sum(A) > 1/(4*M):
cnt += 1
if cnt >= M:
print('Yes')
else:
print('No')
if __name__ == '__main__':
main() | def main():
N, M = map(int, input().split())
A = list(map(int, input().split()))
cnt = 0
for i in A:
if i/sum(A) >= 1/(4*M):
cnt += 1
if cnt >= M:
print('Yes')
else:
print('No')
if __name__ == '__main__':
main() | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 94 |
n, m = map(int, input().split())
a = list(map(int, input().split()))
print("Yes" if len([i for i in a if i/sum(a) >= 1/(4 * m)]) >= n else "No") | n, m = map(int, input().split())
a = list(map(int, input().split()))
print("Yes" if len([i for i in a if i/sum(a) >= 1/(4 * m)]) >= m else "No") | [["-", 0, 652, 3, 4, 0, 41, 0, 666, 0, 22], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 0, 22]] | 5 | 71 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
rep(i, n) cin >> a[i];
int s = 0;
rep(i, n) s += a[i];
int ans = 0;
rep(i, n) {
if (a[i] * (4 - m) >= s)
ans++;
}
if ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
rep(i, n) cin >> a[i];
int s = 0;
rep(i, n) s += a[i];
int ans = 0;
rep(i, n) {
if (a[i] * (4 * m) >= s)
ans++;
}
if ... | [["-", 51, 16, 31, 16, 12, 23, 0, 16, 17, 33], ["+", 51, 16, 31, 16, 12, 23, 0, 16, 17, 48]] | 1 | 139 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int arr[101] = {0};
int main() {
long long int a, b, total = 0, n = 0;
cin >> a >> b;
for (int i = 0; i < a; i++) {
int c;
cin >> arr[i];
}
for (int i = 0; i < a; i++) {
total += a... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int arr[101] = {0};
int main() {
long long int a, b, total = 0, n = 0;
cin >> a >> b;
for (int i = 0; i < a; i++) {
int c;
cin >> arr[i];
}
for (int i = 0; i < a; i++) {
total += a... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 157 |
#include <bits/stdc++.h>
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];
a[i] = 4 * m * a[i];
}
int cnt = 0;
for (int i = 0; i < n; i++) {
if (a[i] > sum)
cnt++;
}
if (cnt >= m)
... | #include <bits/stdc++.h>
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];
a[i] = 4 * m * a[i];
}
int cnt = 0;
for (int i = 0; i < n; i++) {
if (a[i] >= sum)
cnt++;
}
if (cnt >= m)
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 144 |
#include <algorithm>
#include <chrono>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#define ll long long
int main() {
int N, M;
std::cin >> N >> M;
std::vector<int> A(N);
int sum = 0;
for (int i = 0; i < N; i++) {
std::cin >> A[i];
sum += A[i];
}
std::sort(A.begin(), ... | #include <algorithm>
#include <chrono>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#define ll long long
int main() {
int N, M;
std::cin >> N >> M;
std::vector<int> A(N);
int sum = 0;
for (int i = 0; i < N; i++) {
std::cin >> A[i];
sum += A[i];
}
std::sort(A.begin(), ... | [["-", 64, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 223 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
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 = 0;
for (int i = 0; i < n; i++) {
if (a[i] >= sum / (4 * m)) {
ans++;
}
}
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
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 = 0;
for (int i = 0; i < n; i++) {
if (a[i] >= (double)sum / (4 * m)) {
ans++;
... | [["+", 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 | 140 |
from decimal import Decimal
n,m = map(int,input().split())
A = list(map(int,input().split()))
border = float(sum(A)/(4*m))
border2 = str(border)
border3 = Decimal(border2)
ans = 0
judge = 0
for i in range(n):
if A[i] >= border3:
ans+=1
if ans > m:
print("Yes")
else:
print("No") | from decimal import Decimal
n,m = map(int,input().split())
A = list(map(int,input().split()))
border = float(sum(A)/(4*m))
border2 = str(border)
border3 = Decimal(border2)
ans = 0
judge = 0
for i in range(n):
if A[i] >= border3:
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 | 108 |
from decimal import Decimal
n,m = map(int,input().split())
A = list(map(int,input().split()))
border = float(sum(A)/(4*m))
border2 = str(border)
border3 = Decimal(border2)
ans = 0
judge = 0
for i in range(n):
if A[i] >= border3:
ans+=1
if ans > m:
print("Yes")
else:
print("No") | from decimal import Decimal
n,m = map(int,input().split())
A = list(map(int,input().split()))
border = float(sum(A)*(1/(4*m)))
border2 = str(border)
border3 = Decimal(border2)
ans = 0
judge = 0
for i in range(n):
if A[i] >= border3:
ans+=1
if ans >= m:
print("Yes")
else:
print("No") | [["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 48], ["+", 12, 652, 3, 4, 0, 657, 12, 23, 0, 24], ["+", 3, 4, 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 | 108 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int sum = 0;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A.at(i);
sum = sum + A.at(i);
}
sort(A.begin(), A.end());
reverse(A.begin(), A.end());
double bunnbo = sum / (4 * M);
if (A.at(M - 1) ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
double sum = 0;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A.at(i);
sum = sum + A.at(i);
}
sort(A.begin(), A.end());
reverse(A.begin(), A.end());
double bunnbo = sum / (4 * M);
if (A.at(M - ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 148 |
n,m = map(int, input().split())
A = list(map(int, input().split()))
rank = sum(A) / (4*m)
cnt =0
for a in A:
cnt += rank <= a
if cnt > m:
print('Yes')
else:
print('No') | n,m = map(int, input().split())
A = list(map(int, input().split()))
rank = sum(A) / (4*m)
cnt =0
for a in A:
cnt += rank <= a
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 | 77 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie();
int n, m;
cin >> n >> m;
int a[n];
int total = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
total += a[i];
}
int div = 4 * m;
int k = 0;
int temp;
if (total % div == 0)
temp = total / ... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie();
int n, m;
cin >> n >> m;
int a[n];
int total = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
total += a[i];
}
int div = 4 * m;
int k = 0;
int temp;
if (total % div == 0)
temp = total / ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 167 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
using ll = long long;
ll dp[200005][4];
int main() {
int n, m, sum = 0;
cin >> n >> m;
vector<int> a(n);
rep(i, n) {
cin >> a[i];
sum += a[i];
}
sort(a.begin(), a.end());
string ans;
a[n - m] >=... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
using ll = long long;
ll dp[200005][4];
int main() {
int n, m, sum = 0;
cin >> n >> m;
vector<int> a(n);
rep(i, n) {
cin >> a[i];
sum += a[i];
}
sort(a.begin(), a.end());
string ans;
a[n - m] >=... | [["-", 15, 16, 12, 16, 31, 23, 0, 16, 31, 22], ["-", 15, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 17, 72], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 12, 22], ["+", 15, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 15, 16, 12, 16, 31, 23, 0, 16, 12, 13]] | 1 | 141 |
n, m = map(int, input().split())
a = list(map(int, input().split()))
border = sum(a) / (4 * m)
a.sort(reverse=True)
for i in range(m):
if border >= a[i]:
pass
else:
print('No')
exit(0)
print('Yes')
| n, m = map(int, input().split())
a = list(map(int, input().split()))
border = sum(a) / (4 * m)
a.sort(reverse=True)
for i in range(m):
if border <= a[i]:
pass
else:
print('No')
exit(0)
print('Yes')
| [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]] | 5 | 88 |
#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
void b_popular_vote(void) {
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 select = 0;
doub... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
void b_popular_vote(void) {
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 select = 0;
doub... | [["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 17, 48], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 25]] | 1 | 176 |
N,M = list(map(int,input().split()))
A = list(map(int,input().split()))
A.sort(reverse=True)
all_ =sum(A)
th = all_//(4*M)
ans='Yes'
if A[M-1] <= th:
ans='No'
print(ans) | N,M = list(map(int,input().split()))
A = list(map(int,input().split()))
A.sort(reverse=True)
all_ = sum(A)
th = all_/(4*M)
ans='Yes'
if A[M-1] < th:
ans='No'
print(ans) | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18]] | 5 | 83 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const long long INF = 1LL << 60;
using ping = pair<ll, ll>;
int main() {
ll N, M;
cin >> N >> M;
vector<ll> A(N);
ll total = 0;
for (int i = 0; i < N; i++) {
cin >> A[i];
total += A[i];
}
ll cnt = ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const long long INF = 1LL << 60;
using ping = pair<ll, ll>;
int main() {
ll N, M;
cin >> N >> M;
vector<ll> A(N);
ll total = 0;
for (int i = 0; i < N; i++) {
cin >> A[i];
total += A[i];
}
ll cnt = ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 163 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll a;
double b, c;
cin >> a >> b;
c = 0;
vector<ll> vec(a);
for (ll i = 0; i < a; i++) {
cin >> vec.at(i);
c += vec.at(i);
}
double g;
g = c / 4 / b + 1;
sort(vec.begin(), vec.end());
if (vec.at(a - b) >= g) {... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll a;
double b, c;
cin >> a >> b;
c = 0;
vector<ll> vec(a);
for (ll i = 0; i < a; i++) {
cin >> vec.at(i);
c += vec.at(i);
}
double g;
g = c / 4 / b;
sort(vec.begin(), vec.end());
if (vec.at(a - b) >= g) {
... | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 141 |
N,M = gets.split(" ").map(&:to_i)
A = gets.split(" ").map(&:to_i)
l = A.sum / (4*M)
passing = A.select { |num| l<=num }
ans = M<=passing.length ? "Yes" : "No"
puts ans | N,M = gets.split(" ").map(&:to_i)
A = gets.split(" ").map(&:to_i)
l = A.sum.to_f / (4*M)
passing = A.select { |num| l<=num }
ans = M<=passing.length ? "Yes" : "No"
puts ans | [["+", 0, 493, 0, 662, 12, 738, 31, 652, 17, 131], ["+", 0, 493, 0, 662, 12, 738, 31, 652, 735, 22]] | 4 | 75 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a[n], sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
double ppty = sum / double(m * 4);
int cnt = 0;
for (int i = 0; i < n; i++)
if (a[i] <= ppty)
cnt++;
if (cnt >= m)
co... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a[n], sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
double ppty = sum / double(m * 4);
int cnt = 0;
for (int i = 0; i < n; i++)
if (a[i] >= ppty)
cnt++;
if (cnt >= m)
co... | [["-", 0, 7, 8, 57, 15, 339, 51, 16, 17, 19], ["+", 0, 7, 8, 57, 15, 339, 51, 16, 17, 20]] | 1 | 132 |
#include <bits/stdc++.h>
using namespace std;
#define all(a) a.begin(), a.end()
#define rep(i, n) for (int i = 0; i < n; i++)
#define endl "\n"
typedef long long ll;
const int BIG_NUM = 1e9;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n, m;
cin >> n >> m;
vector<int> a(n);
i... | #include <bits/stdc++.h>
using namespace std;
#define all(a) a.begin(), a.end()
#define rep(i, n) for (int i = 0; i < n; i++)
#define endl "\n"
typedef long long ll;
const int BIG_NUM = 1e9;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n, m;
cin >> n >> m;
vector<int> a(n);
i... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 195 |
n = input()
n = n.split()
m = int(n[1])
n = int(n[0])
a = input()
a = a.split()
c = int(a[0])
for b in range(n-1):
c = c + int(a[b+1])
c = c / (4 * m)
e = 0
for d in range(n):
if int(a[d]) > c :
e = e + 1
if e >= m:
print("Yes")
else:
print("No") | n = input()
n = n.split()
m = int(n[1])
n = int(n[0])
a = input()
a = a.split()
c = int(a[0])
for b in range(n-1):
c = c + int(a[b+1])
c = c / (4 * m)
e = 0
for d in range(n):
if int(a[d]) >= c :
e = e + 1
if e >= 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 | 129 |
# coding: utf-8
kind, choose = map(int, input().split())
count = 0
total = 0
num = input().split(" ")
for i in num:
total += int(i)
ok = total / (4 * kind)
for i in num:
if int(i) >= ok:
count += 1
if count > choose:
print("Yes")
else:
print("No") | # coding: utf-8
kind, choose = map(int, input().split())
count = 0
total = 0
num = input().split(" ")
for i in num:
total += int(i)
ok = total / (4 * choose)
for i in num:
if int(i) >= ok:
count += 1
if count >= choose:
print("Yes")
else:
print("No") | [["-", 0, 662, 12, 657, 12, 23, 0, 657, 12, 22], ["+", 0, 662, 12, 657, 12, 23, 0, 657, 12, 22], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20]] | 5 | 90 |
n, m = (int(x) for x in input().split())
list_a = sorted([int(x) for x in input().split()], reverse=True)
for i in range(0, m):
if list_a[i] < sum(list_a) // (4 * m):
print('No')
exit()
print('Yes') | n, m = (int(x) for x in input().split())
list_a = sorted([int(x) for x in input().split()], reverse=True)
for i in range(0, m):
if list_a[i] < sum(list_a) / (4 * m):
print('No')
exit()
print('Yes') | [["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 676], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 85]] | 5 | 87 |
nums = list(map(int,input().split()))
N = nums[0]
M = nums[1]
numss = list(map(int,input().split()))
cnt = M
summ = sum(numss)
for num in numss:
if num >= summ//(M*4):
cnt -= 1
if cnt <= 0:
print("Yes")
else:
print("No") | nums = list(map(int,input().split()))
N = nums[0]
M = nums[1]
numss = list(map(int,input().split()))
cnt = M
summ = sum(numss)
for num in numss:
if num >= summ/(M*4):
cnt -= 1
if cnt > 0:
print("No")
else:
print("Yes") | [["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 676], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 85], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 93 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(N);
int sum;
rep(i, N) {
cin >> A[i];
sum += A[i];
}
sort(A.rbegin(),... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(N);
int sum;
rep(i, N) {
cin >> A[i];
sum += A[i];
}
sort(A.rbegin(),... | [["+", 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 | 168 |
#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>;
const int MAX = 100;
const int INF = 1e9;
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
#define PI 3.14159265358979323846264338327950L
int main() {
int N, M;... | #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>;
const int MAX = 100;
const int INF = 1e9;
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
#define PI 3.14159265358979323846264338327950L
int main() {
int N, M;... | [["+", 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], ["+", 0, 43, 49, 50, 51, 16, 12, 74, 0, 24], ["+", 49, 50, 51, 16, 12, 74, 39, 77, 39, 40], ["+", 0, 43, 49, 50, 51, 16, 12, 74, 0, 25]] | 1 | 198 |
def main():
N,M = map(int,input().split())
A = list(map(int,input().split()))
sum = 0
for i in range(N):
sum += A[i]
cnt = 0
tmp = sum/(4*M)
for i in range(N):
if A[i] > tmp:
cnt += 1
if cnt >= M:
print('Yes')
else:
print('No')
main()
| def main():
N,M = map(int,input().split())
A = list(map(int,input().split()))
sum = 0
for i in range(N):
sum += A[i]
cnt = 0
tmp = sum/(4*M)
for i in range(N):
if A[i] >= tmp:
cnt += 1
if cnt >= M:
print('Yes')
else:
print('No')
main()
| [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 108 |
#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;
int A[N];
rep(i, N) cin >> A[i];
int num = 0;
rep(i, N) num += A[i];
double border = num / (4.0 * M);
int sum = 0;
rep(i, ... | #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;
int A[N];
rep(i, N) cin >> A[i];
int num = 0;
rep(i, N) num += A[i];
double border = num / (4.0 * M);
int sum = 0;
rep(i, ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 146 |
#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);
rep(i, n) cin >> a[i];
sort(a.begin(), a.end(), greater<int>());
int s = accumulate(a.begin(), a.end(), 0);
... | #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() {
double n, m;
cin >> n >> m;
vector<double> a(n);
rep(i, n) cin >> a[i];
sort(a.begin(), a.end(), greater<int>());
double s = accumulate(a.begin(), a.end(... | [["-", 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 | 159 |
n, m = gets.split.map(&:to_i)
ai = gets.split.map(&:to_i).sort.reverse
sum = ai.inject(:+)
puts 4*m*ai[m-1] > sum ? "Yes" : "No" | n, m = gets.split.map(&:to_i)
ai = gets.split.map(&:to_i).sort.reverse
sum = ai.inject(:+)
puts 4*m*ai[m-1] >= sum ? "Yes" : "No" | [["-", 0, 652, 3, 4, 0, 754, 15, 738, 17, 47], ["+", 0, 652, 3, 4, 0, 754, 15, 738, 17, 20]] | 4 | 57 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
int N, M;
int A[110];
int sum = 0;
int c = 0;
cin >> N >> M;
for (int i = 0; i < N; i++) {
cin >> A[i];
sum += A[i];
}
sort(A, A + N, greater<int>());
for (int i = 0; i < N; i++) {
... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
int N, M;
float A[110];
float sum = 0;
int c = 0;
cin >> N >> M;
for (int i = 0; i < N; i++) {
cin >> A[i];
sum += A[i];
}
sort(A, A + N, greater<int>());
for (int i = 0; i < N; i++) {... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 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 | 151 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
int count = 0;
int num = 0;
vector<int> vec(a);
for (int i = 0; i < a; i++) {
cin >> vec.at(i);
count += vec.at(i);
}
for (int i = 0; i < a; i++) {
if ((vec.at(i) * 4) >= count)
num++;
}
if (num >=... | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
int count = 0;
int num = 0;
vector<int> vec(a);
for (int i = 0; i < a; i++) {
cin >> vec.at(i);
count += vec.at(i);
}
for (int i = 0; i < a; i++) {
if ((vec.at(i) * 4 * b) >= count)
num++;
}
if (nu... | [["+", 15, 339, 51, 16, 31, 23, 0, 16, 17, 48], ["+", 15, 339, 51, 16, 31, 23, 0, 16, 12, 22]] | 1 | 133 |
#include "bits/stdc++.h"
using namespace std;
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
#define ll lon... | #include "bits/stdc++.h"
using namespace std;
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
#define ll lon... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 378 |
#include <bits/stdc++.h>
#define rep(i, N) for (int i = 0; i < (N); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main(void) {
int N, M;
cin >> N >> M;
vector<int> A(N);
rep(i, N) cin >> A.at(i);
int sum = accumulate(all(A), 0);
int kagen = ... | #include <bits/stdc++.h>
#define rep(i, N) for (int i = 0; i < (N); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main(void) {
int N, M;
cin >> N >> M;
vector<int> A(N);
rep(i, N) cin >> A.at(i);
int sum = accumulate(all(A), 0);
double kagen... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 151 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, sum = 0, a;
string ans;
cin >> n >> m;
vector<int> v(n);
for (int i = 0; i < n; i++) {
cin >> v.at(i);
sum += v.at(i);
}
sort(v.begin(), v.end());
reverse(v.begin(), v.end());
if (v.at(m - 1) >= sum / (4 * m)) {
ans = "Y... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, sum = 0, a;
string ans;
cin >> n >> m;
vector<int> v(n);
for (int i = 0; i < n; i++) {
cin >> v.at(i);
sum += v.at(i);
}
sort(v.begin(), v.end());
reverse(v.begin(), v.end());
if (v.at(m - 1) >= sum / (4 * double(m))) {
... | [["+", 12, 16, 12, 23, 0, 16, 12, 2, 63, 40], ["+", 12, 23, 0, 16, 12, 2, 3, 4, 0, 24], ["+", 12, 23, 0, 16, 12, 2, 3, 4, 0, 25]] | 1 | 147 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<int> votes;
int sum = 0;
for (int i = 0; i < n; i++) {
int a;
cin >> a;
votes.push_back(a);
sum += a;
}
int j = 0;
sum = sum / (4 * m);
for (int i = 0; ... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<int> votes;
double sum = 0;
for (int i = 0; i < n; i++) {
int a;
cin >> a;
votes.push_back(a);
sum += a;
}
int j = 0;
double cutoff = sum / (4 * m);
for... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 148 |
N, M = map(int, input().split())
A = list(map(int, input().split()))
sum = sum(A)
limit = sum // (4 * M)
A.sort(reverse = True)
ans = True
for i in range(M):
if A[i] < limit:
ans = False
break
if ans:
print("Yes")
else:
print("No")
| N, M = map(int, input().split())
A = list(map(int, input().split()))
sum = sum(A)
limit = sum / (4 * M)
A.sort(reverse = True)
ans = True
for i in range(M):
if A[i] < limit:
ans = False
break
if ans:
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 | 96 |
n, m = map(int,input().split())
lst = list(map(int,input().split()))
lst.sort()
lst.reverse()
x = sum(lst)
if (lst[m] < x/4/m):
print("No")
else:
print("Yes")
| n, m = map(int,input().split())
lst = list(map(int,input().split()))
lst.sort()
lst.reverse()
x = sum(lst)
if (lst[m - 1] < x/4/m):
print("No")
else:
print("Yes")
| [["+", 15, 23, 0, 666, 0, 206, 206, 657, 17, 33], ["+", 15, 23, 0, 666, 0, 206, 206, 657, 12, 612]] | 5 | 77 |
N, M = map(int, input().split())
A = [int(x) for x in input().split()]
ans=0
for a in A:
ans = ans + 1 if a*(4*M)>sum(A) else ans
print('Yes' if ans>=M else 'No') | N, M = map(int, input().split())
A = [int(x) for x in input().split()]
ans=0
for a in A:
ans = ans + 1 if a*(4*M)>=sum(A) else ans
print('Yes' if ans>=M else 'No') | [["-", 0, 1, 0, 662, 12, 41, 0, 666, 667, 47], ["+", 0, 1, 0, 662, 12, 41, 0, 666, 667, 20]] | 5 | 76 |
#include <algorithm>
#include <bitset>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <tuple>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a[n], sum = 0, counter = 0;
for (int i = 0; i < n; i... | #include <algorithm>
#include <bitset>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <tuple>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
double a[n], sum = 0;
int counter = 0;
for (int i = 0;... | [["-", 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, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35]] | 1 | 156 |
n,m = map(int,input().split())
a = list(map(int,input().split()))
count = 0
for i in range(n):
if sum(a)//(4*m) <a[i]:
count+=1
if count >= m:
print('Yes')
else:
print('No') | n,m = map(int,input().split())
a = list(map(int,input().split()))
count = 0
for i in range(n):
if sum(a)/(4*m) <= a[i]:
count+=1
if count >= m:
print('Yes')
else:
print('No') | [["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 676], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 85], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]] | 5 | 83 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define M 1000000007
#define INF ((1LL << 62LL) - 1)
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, m;
cin >> n >> m;
int a[n];
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define M 1000000007
#define INF ((1LL << 62LL) - 1)
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, m;
cin >> n >> m;
int a[n];
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
... | [["+", 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 | 142 |
#include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
signed main() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
int n, m, a1, sum = 0;
cin >> n >> m;
priority_queue<double> a;
for (int i = 0; i < n; i++) {
cin >> a1;
a.push(a1);
sum += a1;
}
for (int i = 0;... | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
signed main() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
int n, m, a1;
double sum = 0;
cin >> n >> m;
priority_queue<int> a;
for (int i = 0; i < n; i++) {
cin >> a1;
a.push(a1);
sum += a1;
}
for (int ... | [["-", 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, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40]] | 1 | 150 |
package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
func main() {
n, m := readI(), readI()
a := readIs(n)
sou := float64(sum(a))
ninki := 0
for _, v := range a {
if float64(v) > sou/float64((4*m)) {
ninki++
}
}
if ninki >= m {
fmt.Println("Yes")
} else {
fmt.Println("No")
}
}
func sum(a ... | package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
func main() {
n, m := readI(), readI()
a := readIs(n)
sou := float64(sum(a))
ninki := 0
for _, v := range a {
if float64(v) >= sou/float64((4*m)) {
ninki++
}
}
if ninki >= m {
fmt.Println("Yes")
} else {
fmt.Println("No")
}
}
func sum(a... | [["-", 0, 7, 8, 196, 0, 57, 15, 16, 17, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 16, 17, 20]] | 7 | 534 |
n,m=map(int,input().split())
l=list(map(int,input().split()))
s=sum(l)//(4*m)
c=0
for i in range(n):
if(l[i]>=s):
c=c+1
if(c>=m):
print("Yes")
else:
print("No") | n,m=map(int,input().split())
l=list(map(int,input().split()))
s=sum(l)/(4*m)
c=0
for i in range(n):
if(l[i]>=s):
c=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 | 92 |
N,M=map(int,input().split(" "))
l=list(map(int,input().split(" ")))
sum_list=sum(l)
border=sum_list/(4*M)
c=0
for i in range(N):
if l[i]>border:
c+=1
if c>=M:
print("Yes")
else:
print("No")
| N,M=map(int,input().split(" "))
l=list(map(int,input().split(" ")))
sum_list=sum(l)
border=sum_list/(4*M)
c=0
for i in range(N):
if l[i]>=border:
c+=1
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 | 95 |
import java.lang.*;
import java.util.*;
public 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[] A = new int[n];
int voteSum = 0;
for (int i = 0; i < n; i++) {
a[i] = sc.... | import java.lang.*;
import java.util.*;
public 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[] A = new int[n];
double voteSum = 0;
for (int i = 0; i < n; i++) {
a[i] = ... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 511, 0, 512]] | 3 | 197 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
long long all = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
all += a[i];
}
int ans = 0;
for (int i = 0; i < n; i++) {
if (a[i] >= all / (4 * m)) {
ans++;
}
}
... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
long long all = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
all += a[i];
}
int ans = 0;
for (int i = 0; i < n; i++) {
if ((double)a[i] >= (double)all / (4 * m)) {
an... | [["+", 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 | 141 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int arr[n + 1];
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> arr[i];
sum += arr[i];
}
int count = 0;
for (int i = 0; i < n; i++) {
if (arr[i] >= (sum / (4 * m))) {
count++;
}
}
if (count ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int arr[n + 1];
double sum = 0;
for (int i = 0; i < n; i++) {
cin >> arr[i];
sum += arr[i];
}
int count = 0;
for (int i = 0; i < n; i++) {
if (arr[i] >= (sum / (4 * m))) {
count++;
}
}
if (cou... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 132 |
n,m = map(int,input().split())
a = sorted(list(map(int,input().split())))
b = sum(a)/(4*m)
c=[]
for i in a[:m]:
if i >= b:
c.append(i)
if len(c) == m:
print('Yes')
else:
print('No')
| n,m = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse=True)
b = sum(a)/(4*m)
c=[]
for i in a[:m]:
if i >= b:
c.append(i)
if len(c) == m:
print('Yes')
else:
print('No')
| [["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 0, 662, 12, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 662, 12, 652, 3, 4, 0, 653, 51, 146]] | 5 | 94 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
int S = 0;
int L = 0;
cin >> N >> M;
vector<int> vec(N);
for (int X = 0; X < N; X++) {
cin >> vec.at(X);
L += vec.at(X);
}
sort(vec.begin(), vec.end());
for (int X = N - 1; X >= 0; X--) {
if (vec.at(X) >= L / (M * 4)) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
int S = 0;
long double L = 0;
cin >> N >> M;
vector<int> vec(N);
for (int X = 0; X < N; X++) {
cin >> vec.at(X);
L += vec.at(X);
}
sort(vec.begin(), vec.end());
for (int X = N - 1; X >= 0; X--) {
if (vec.at(X) >= L / (M ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 39, 40]] | 1 | 163 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(N);
double cnt = 0;
for (int i = 0; i < N; i++) {
cin >> A.at(i);
cnt += A.at(i);
}
sort(A.begin(), A.end());
double usi = cnt / (4 * M);
if (A.at(N - M) > usi) {
cout << "Yes" << endl;
} el... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<double> A(N);
double cnt = 0;
for (int i = 0; i < N; i++) {
cin >> A.at(i);
cnt += A.at(i);
}
sort(A.begin(), A.end());
double usi = cnt / (4 * M);
if (A.at(N - M) >= usi) {
cout << "Yes" << endl;
... | [["-", 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, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 131 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, j = 0;
cin >> N >> M;
vector<int> A(N);
for (int &i : A) {
cin >> i;
j += i;
}
sort(A.begin(), A.end());
if (A[M - 1] * 4 * M < j)
cout << "No" << endl;
else
cout << "Yes" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, j = 0;
cin >> N >> M;
vector<int> A(N);
for (int &i : A) {
cin >> i;
j += i;
}
sort(A.begin(), A.end());
if (A[N - M] * 4 * M < j)
cout << "No" << endl;
else
cout << "Yes" << endl;
} | [["-", 31, 16, 31, 69, 341, 342, 0, 16, 31, 22], ["+", 31, 16, 31, 69, 341, 342, 0, 16, 31, 22], ["-", 31, 16, 31, 69, 341, 342, 0, 16, 12, 13], ["+", 31, 16, 31, 69, 341, 342, 0, 16, 12, 22]] | 1 | 101 |
# frozen_string_literal: true
N, M = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)
puts(a.filter { |n| n >= a.sum / (4 * M) }.count >= M ? 'Yes' : 'No')
| # frozen_string_literal: true
N, M = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)
puts(a.filter { |n| n >= a.sum / (4.0 * M) }.count >= M ? 'Yes' : 'No')
| [["-", 0, 738, 12, 738, 12, 739, 0, 738, 31, 612], ["+", 0, 738, 12, 738, 12, 739, 0, 738, 31, 531]] | 4 | 59 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <stdio.h>
#include <string>
#include <vector>
int main(void) {
int n, m, s = 0;
std::cin >> n >> m;
std::vector<int> a(n);
for (int i = 0; i < n; i++) {
std::cin >> a[i];
}
for (int i = 0; i < n; i++) ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <stdio.h>
#include <string>
#include <vector>
int main(void) {
double n, m, s = 0;
std::cin >> n >> m;
std::vector<double> a(n);
for (int i = 0; i < n; i++) {
std::cin >> a[i];
}
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], ["-", 39, 343, 141, 344, 3, 347, 0, 77, 39, 40], ["+", 39, 343, 141, 344, 3, 347, 0, 77, 39, 40], ["-", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13], ["+", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13]] | 1 | 176 |
#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);
}
int sum = accumulate(A.begin(), A.end(), 0L);
double tmp = sum * (1.0 / 4 * M);
int cnt = 0;
for (int i = 0; i < N; i++) {
if (A.at(i) >= tmp)
... | #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);
int sum = accumulate(A.begin(), A.end(), 0L);
double tmp = sum / (4.0 * M);
int cnt = 0;
for (int i = 0; i < N; i++) {
if (A.at(i) >= tmp)
cnt+... | [["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 45], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 48], ["-", 0, 43, 49, 50, 51, 16, 12, 23, 0, 24], ["-", 51, 16, 12, 23, 0, 16, 31, 16, 31, 13], ["-", 51, 16, 12, 23, 0, 16, 31, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 24], ["+", 49, 50, 5... | 1 | 147 |
#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);
int sum = accumulate(A.begin(), A.end(), 0);
int ans = 0;
for (int i = 0; i < N; i++) {
if ((long double)A.at(i) / sum < (long double)sum / (4 * M))
... | #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);
int sum = accumulate(A.begin(), A.end(), 0);
int cnt = 0;
for (int i = 0; i < N; i++) {
if ((long double)A.at(i) < (long double)sum / (4 * M))
co... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 85], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["-", 0, 7, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 27, 28, 22], ["-", 12, 23, 0, 41, 15, 23, 0, 16, 31, 22], ["+", 12, 23, ... | 1 | 150 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long N, M;
cin >> N >> M;
vector<long> A(N);
for (long i = 0; i < N; i++)
cin >> A.at(i);
long sum = accumulate(A.begin(), A.end(), 0L);
long cnt = 0;
for (long i = 0; i < N; i++) {
if (A.at(i) < sum * (1.0 / 4 * M))
continue;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
long N, M;
cin >> N >> M;
vector<long> A(N);
for (long i = 0; i < N; i++)
cin >> A.at(i);
long sum = accumulate(A.begin(), A.end(), 0L);
long cnt = 0;
for (long i = 0; i < N; i++) {
if (A.at(i) < sum * (1.0 / (4 * M)))
continue;
... | [["+", 12, 16, 12, 23, 0, 16, 12, 23, 0, 24], ["+", 12, 16, 12, 23, 0, 16, 12, 23, 0, 25]] | 1 | 143 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, T, V;
cin >> N >> M;
vector<int> A(N);
T = 0;
V = 0;
for (int i = 0; i < N; i++) {
cin >> A.at(i);
V = V + A.at(i);
}
for (int i = 0; i < N; i++) {
if (A.at(i) >= V / (4 * M)) {
T++;
}
}
if (T >= M) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
double V, M;
int T, N;
cin >> N >> M;
vector<int> A(N);
T = 0;
V = 0;
for (int i = 0; i < N; i++) {
cin >> A.at(i);
V = V + A.at(i);
}
for (int i = 0; i < N; i++) {
if (A.at(i) >= V / (4 * M)) {
T++;
}
}
if (T >=... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35]] | 1 | 151 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, i, j;
cin >> n >> m;
int A[n];
int sum = 0;
for (i = 0; i < n; i++) {
scanf("%d", &A[i]);
sum += A[i];
}
sort(A, A + n);
if (4 * m * A[n - m + 1] >= sum)
printf("Yes\n");
else
printf("No\n");
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, i, j;
cin >> n >> m;
int A[n];
int sum = 0;
for (i = 0; i < n; i++) {
scanf("%d", &A[i]);
sum += A[i];
}
sort(A, A + n);
if (4 * m * A[n - m] >= sum)
printf("Yes\n");
else
printf("No\n");
} | [["-", 31, 16, 12, 69, 341, 342, 0, 16, 17, 72], ["-", 31, 16, 12, 69, 341, 342, 0, 16, 12, 13]] | 1 | 116 |
n,m=map(int,input().split())
a=list(map(int,input().split()))
ave=sum(a)/len(a)/4
cnt=0
for i in range(n):
if a[i]>=ave:
cnt+=1
if cnt<m:
print('No')
else:
print('Yes') | n,m=map(int,input().split())
a=list(map(int,input().split()))
ave=sum(a)/m/4
cnt=0
for i in range(n):
if a[i]>=ave:
cnt+=1
if cnt<m:
print('No')
else:
print('Yes') | [["-", 0, 662, 12, 657, 31, 657, 12, 652, 63, 22], ["-", 12, 657, 31, 657, 12, 652, 3, 4, 0, 24], ["-", 12, 657, 31, 657, 12, 652, 3, 4, 0, 22], ["-", 12, 657, 31, 657, 12, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 12, 22]] | 5 | 87 |
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String[] tmp = scanner.nextLine().split(" ");
int n = Integer.parseInt(tmp[0]);
int m = Integer.parseInt(tmp[1]);
i... | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String[] tmp = scanner.nextLine().split(" ");
int n = Integer.parseInt(tmp[0]);
int m = Integer.parseInt(tmp[1]);
i... | [["-", 8, 196, 0, 503, 49, 200, 51, 492, 500, 22], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 0, 131], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["-", 0, 503, 49, 200, 51, 492, 3, 4, 0, 24], ["-", 51, 492, 3, 4, 0, 16, 12, 23, 0, 25]] | 3 | 240 |
a,b = map(int, input().split())
c = list(map(int,input().split()))
d = sum(c)
e = sorted(c,reverse=True)
for i in range(a):
if(e[i]<d/4*b):
print("No")
exit()
print("Yes") | a,b = map(int, input().split())
c = list(map(int,input().split()))
d = sum(c)
e = sorted(c,reverse=True)
for i in range(b):
if(e[i]<d/(4*b)):
print("No")
exit()
print("Yes") | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 15, 23, 0, 666, 0, 657, 12, 23, 0, 24], ["+", 15, 23, 0, 666, 0, 657, 12, 23, 0, 25]] | 5 | 86 |
#include <bits/stdc++.h>
using namespace std;
#define debug(n) cerr << #n << ':' << n << endl;
#define dline cerr << __LINE__ << endl;
using ll = long long;
using ull = unsigned long long;
template <class T, class U> using P = pair<T, U>;
template <class T> using Heap = priority_queue<T>;
template <class T> using he... | #include <bits/stdc++.h>
using namespace std;
#define debug(n) cerr << #n << ':' << n << endl;
#define dline cerr << __LINE__ << endl;
using ll = long long;
using ull = unsigned long long;
template <class T, class U> using P = pair<T, U>;
template <class T> using Heap = priority_queue<T>;
template <class T> using he... | [["+", 0, 11, 12, 16, 31, 16, 31, 16, 31, 13], ["+", 0, 11, 12, 16, 31, 16, 31, 16, 17, 48]] | 1 | 360 |
_,m=map(int,input().split())
a=list(map(int,input().split()))
cnt=0
temp=sum(a)
for v in a:
if v>=a/(4*m): cnt+=1
if cnt>=m: print("Yes")
else: print("No") | _,m=map(int,input().split())
a=list(map(int,input().split()))
cnt=0
temp=sum(a)
for v in a:
if v>=temp/(4*m): cnt+=1
if cnt>=m: print("Yes")
else: print("No") | [["-", 8, 196, 0, 57, 15, 666, 0, 657, 31, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 31, 22]] | 5 | 80 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n;
int arr[n];
cin >> m;
for (int i = 0; i < n; i++)
cin >> arr[i];
int sum = 0;
for (int i = 0; i < n; i++) {
sum += arr[i];
}
int count = 0;
for (int i = 0; i < n; i++) {
if (arr[i] >= (sum / (4 * m))) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n;
int arr[n];
cin >> m;
for (int i = 0; i < n; i++)
cin >> arr[i];
int sum = 0;
for (int i = 0; i < n; i++) {
sum += arr[i];
}
int count = 0;
for (int i = 0; i < n; i++) {
if (arr[i] >= (1.0 * sum / (4.0 * m)))... | [["+", 51, 16, 12, 23, 0, 16, 31, 16, 31, 13], ["+", 51, 16, 12, 23, 0, 16, 31, 16, 17, 48], ["-", 12, 23, 0, 16, 12, 23, 0, 16, 31, 13], ["+", 12, 23, 0, 16, 12, 23, 0, 16, 31, 13]] | 1 | 153 |
n, m = input().split()
a = list(map(int, input().split()))
b = []
s = 0
for i in a:
s += i
for i in a:
if int(i) >= int(int(s)//(4*int(m))):
b.append(i)
if len(b) == int(m):
break
if len(b) == int(m):
print("Yes")
else:
print("No") | n, m = input().split()
a = list(map(int, input().split()))
b = []
s = 0
for i in a:
s += i
for i in a:
if float(i) >= float(int(s)/(4*int(m))):
b.append(i)
if len(b) == int(m):
break
if len(b) == int(m):
print("Yes")
else:
print("No") | [["-", 8, 196, 0, 57, 15, 666, 0, 652, 63, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 652, 63, 22], ["-", 15, 666, 0, 652, 3, 4, 0, 657, 17, 676], ["+", 15, 666, 0, 652, 3, 4, 0, 657, 17, 85]] | 5 | 114 |
#include <iostream>
#include <string>
#include <vector>
int main() {
int n, m;
std::cin >> n >> m;
std::vector<int> a(n);
int sum = 0;
for (int i = 0; i < n; i++) {
std::cin >> a[i];
sum += a[i];
}
bool f = false;
int cnt = 0;
for (int i = 0; i < n; i++) {
if (sum / (4 * m) <= a[i]) {
... | #include <iostream>
#include <string>
#include <vector>
int main() {
int n, m;
std::cin >> n >> m;
std::vector<int> a(n);
int sum = 0;
for (int i = 0; i < n; i++) {
std::cin >> a[i];
sum += a[i];
}
bool f = false;
int cnt = 0;
for (int i = 0; i < n; i++) {
if (1.0 * sum / (4.0 * m) <= a... | [["+", 15, 339, 51, 16, 31, 16, 31, 16, 31, 13], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 48], ["-", 51, 16, 31, 16, 12, 23, 0, 16, 31, 13], ["+", 51, 16, 31, 16, 12, 23, 0, 16, 31, 13]] | 1 | 158 |
n, m = map(int, input().split())
an = [int(num) for num in input().split()]
check = sum(an)//(4*m)
count = 0
for a in an :
if a >= check:
count += 1
if count >= m:
print("Yes")
else :
print("No") | n, m = map(int, input().split())
an = [int(num) for num in input().split()]
check = sum(an)/(4*m)
count = 0
for a in an :
if a >= check:
count += 1
if count >= 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 | 81 |
// inputに入力データ全体が入る
function Main(input) {
// 1行目がinput[0], 2行目がinput[1], …に入る
var ans = "Yes";
input = input.trim().split("\n");
const [N, M] = input[0].split(" ").map((n) => parseInt(n));
var a = input[1].split(" ").map((n) => parseInt(n));
a.sort((a, b) => b - a);
var top = a.slice(0, M);
const lim =... | // inputに入力データ全体が入る
function Main(input) {
// 1行目がinput[0], 2行目がinput[1], …に入る
var ans = "Yes";
input = input.trim().split("\n");
const [N, M] = input[0].split(" ").map((n) => parseInt(n));
var a = input[1].split(" ").map((n) => parseInt(n));
a.sort((a, b) => b - a);
var top = a.slice(0, M);
const lim =... | [["-", 8, 556, 0, 570, 0, 200, 51, 16, 12, 22], ["+", 8, 556, 0, 570, 0, 200, 51, 16, 12, 22]] | 2 | 211 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
long long SUM = 0;
cin >> n >> m;
vector<int> line(n);
for (int i = 0; i < n; i++) {
cin >> line[i];
SUM += line[i];
}
sort(line.begin(), line.end());
reverse(line.begin(), line.end());
for (int i = 0; i < m; i++) {
if (... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
long long SUM = 0;
cin >> n >> m;
vector<int> line(n);
for (int i = 0; i < n; i++) {
cin >> line[i];
SUM += line[i];
}
sort(line.begin(), line.end());
reverse(line.begin(), line.end());
for (int i = 0; i < m; i++) {
if (... | [["+", 51, 16, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 15, 339, 51, 16, 12, 16, 31, 74, 0, 25], ["-", 51, 16, 12, 23, 0, 16, 12, 23, 0, 25]] | 1 | 156 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int N;
int M;
int num = 0;
int sum = 0;
cin >> N;
cin >> M;
int arr[N];
for (int i = 0; i < N; i++) {
cin >> arr[i];
sum += arr[i];
}
sort(arr, arr + (N), greater<int>());
for (int ... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int N;
int M;
int num = 0;
double sum = 0;
cin >> N;
cin >> M;
int arr[N];
for (int i = 0; i < N; i++) {
cin >> arr[i];
sum += arr[i];
}
sort(arr, arr + (N), greater<int>());
for (i... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 173 |
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
// result = Math.pow(num1, num3)
// StringBuffer str = new StringBuffer(hoge1);
// String hoge2 = str.reverse().toString();
// map.containsKey(A)
// Map<String, Integer> map = new HashMap<String, Integer>(n);
// ArrayList<String> cc = ... | import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
// result = Math.pow(num1, num3)
// StringBuffer str = new StringBuffer(hoge1);
// String hoge2 = str.reverse().toString();
// map.containsKey(A)
// Map<String, Integer> map = new HashMap<String, Integer>(n);
// ArrayList<String> cc = ... | [["+", 0, 16, 12, 23, 0, 16, 31, 74, 0, 24], ["+", 12, 23, 0, 16, 31, 74, 39, 511, 0, 512], ["+", 0, 16, 12, 23, 0, 16, 31, 74, 0, 25]] | 3 | 315 |
N,M = map(int,input().split())
A = list(map(int,input().split()))
A.sort(reverse = True)
num = 0
for i in A:
num += i
if A[M-1] >= num//(4*M):
print('Yes')
else:
print('No') | N,M = map(int,input().split())
A = list(map(int,input().split()))
A.sort(reverse = True)
num = 0
for i in A:
num += i
if A[M-1] >= num/(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 | 82 |
n,m=map(int,input().split())
a=list(map(int,input().split()))
a_sort=[]
a_sort=sorted(a,reverse=True)
sum=0
for i in a:
sum+=i
b_sort=a_sort[0:m-1]
for j in b_sort:
if j<=sum/(4*m):
print("No")
exit()
print("Yes") | n,m=map(int,input().split())
a=list(map(int,input().split()))
a_sort=[]
a_sort=sorted(a,reverse=True)
sum=0
for i in a:
sum+=i
b_sort=a_sort[0:m]
for j in b_sort:
if j<sum/(4*m):
print("No")
exit()
print("Yes") | [["-", 0, 662, 12, 206, 206, 663, 0, 657, 17, 33], ["-", 0, 662, 12, 206, 206, 663, 0, 657, 12, 612], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18]] | 5 | 99 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, s = 0;
cin >> n >> m;
vector<int> a(n);
for (int i = 0; i < n; i++)
cin >> a[i], s += a[i];
sort(a.rbegin(), a.rend());
for (int i = 0; i < m; i++)
if (a[i] <= s / (4 * m)) {
cout << "No";
return 0;
}
cout << "Yes... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, s = 0;
cin >> n >> m;
vector<int> a(n);
for (int i = 0; i < n; i++)
cin >> a[i], s += a[i];
sort(a.rbegin(), a.rend());
for (int i = 0; i < m; i++)
if (a[i] * (4 * m) < s) {
cout << "No";
return 0;
}
cout << "Yes"... | [["-", 0, 7, 8, 57, 15, 339, 51, 16, 17, 19], ["-", 8, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["-", 8, 57, 15, 339, 51, 16, 12, 16, 17, 85], ["+", 8, 57, 15, 339, 51, 16, 31, 16, 17, 48], ["+", 0, 7, 8, 57, 15, 339, 51, 16, 17, 18], ["+", 0, 7, 8, 57, 15, 339, 51, 16, 12, 22]] | 1 | 125 |
#include <algorithm>
#include <cstring>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <stdio.h>
#include <vector>
#define ll long long int
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, m;
cin >> n >> m;
int a[n];
int i;
int s = 0... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <stdio.h>
#include <vector>
#define ll long long int
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, m;
cin >> n >> m;
int a[n];
int i;
int s = 0... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 168 |
# Nこの商品の中からM個選ぶ
N, M = list(map(int, input().split()))
# 商品iの得票数はA_i
A = list(map(int, input().split()))
A = sorted(A, reverse=True)
if A[M-1] >= 1/(4*M):
print("Yes")
else:
print("No")
| # Nこの商品の中からM個選ぶ
N, M = list(map(int, input().split()))
# 商品iの得票数はA_i
A = list(map(int, input().split()))
A = sorted(A, reverse=True)
if A[M-1] >= sum(A)/(4*M):
print("Yes")
else:
print("No") | [["-", 0, 656, 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 | 78 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define FORD(i, a, b) for (int i = a; i >= b; i--)
#define REP(i, n) FOR(i, 0, n)
#define REPD(i, n) FOR(i, n - 1, 0)
#define PB push_back
#define mod 1000000007
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NU... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define FORD(i, a, b) for (int i = a; i >= b; i--)
#define REP(i, n) FOR(i, 0, n)
#define REPD(i, n) FOR(i, n - 1, 0)
#define PB push_back
#define mod 1000000007
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NU... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 176 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.