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())
a = list(map(int, input().split()))
count = 0
for i in a:
if i/sum(a) >= 0.25/m:
count += 1
print('Yes' if count > m else 'No') | n, m = map(int, input().split())
a = list(map(int, input().split()))
count = 0
for i in a:
if i/sum(a) >= 0.25/m:
count += 1
print('Yes' if count >= m else 'No') | [["-", 0, 652, 3, 4, 0, 41, 0, 666, 667, 47], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 667, 20]] | 5 | 70 |
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() * 4;
int[] a = new int[n];
int sum = 0;
for (int i = 0; i < n; i++) {
a[i] = sc.nextInt();
sum += a[i];
}
int an... | 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 sum = 0;
for (int i = 0; i < n; i++) {
a[i] = sc.nextInt();
sum += a[i];
}
int ans = ... | [["-", 8, 196, 0, 503, 49, 200, 51, 16, 17, 48], ["-", 8, 196, 0, 503, 49, 200, 51, 16, 12, 499], ["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 45], ["+", 0, 7, 8, 196, 0, 57, 64, 196, 0, 46]] | 3 | 360 |
N,M = list(map(int, input().split()))
A = list(map(int, input().split()))
sum_a = sum(A)
ans = 0
for i,a in enumerate(A):
if a > sum_a / (4 * M):
ans += 1
if ans >= M:
print('Yes')
else:
print('No')
| N,M = list(map(int, input().split()))
A = list(map(int, input().split()))
sum_a = sum(A)
ans = 0
for i,a in enumerate(A):
if a >= sum_a / (4 * M):
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 | 88 |
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repi(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
using namespace std;
typedef long long ll;
int A[200];
int main() {
int N, M;
cin >> N >> M;
rep(i, N) cin >> A[i];
// とりあえず投票総数を計算
int sums =... | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repi(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
using namespace std;
typedef long long ll;
int A[200];
int main() {
int N, M;
cin >> N >> M;
rep(i, N) cin >> A[i];
// とりあえず投票総数を計算
int sums =... | [["-", 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 | 149 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const double PI = 3.1415926535897932;
/* a と b の最大公約数を返す関数 */
long long GCD(long long a,... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const double PI = 3.1415926535897932;
/* a と b の最大公約数を返す関数 */
long long GCD(long long a,... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["-", 15, 339, 51, 16, 12, 16, 31, 16, 31, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 13]] | 1 | 207 |
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef vector<int> vi;
void swap(int a, int b) {
int tmp = a;
a = b;
b = tmp;
}
int main(void) {
ll n, m;
cin >> n >> m;
vector<ll> a(n);
float total = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
total += a[i];
}
sor... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef vector<int> vi;
void swap(int a, int b) {
int tmp = a;
a = b;
b = tmp;
}
int main(void) {
ll n, m;
cin >> n >> m;
vector<ll> a(n);
float total = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
total += a[i];
}
sor... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 178 |
#include <bits/stdc++.h>
using namespace std;
#define froop1(a, n) for (int i = a; i < n; i++)
#define froop2(a, n) for (int i = a; i > n; i--)
int main() {
int N, limit, sum = 0;
cin >> N >> limit;
vector<int> a(N);
froop1(0, N) {
cin >> a.at(i);
sum += a.at(i);
}
int count = 0;
froop1(0, N) {
... | #include <bits/stdc++.h>
using namespace std;
#define froop1(a, n) for (int i = a; i < n; i++)
#define froop2(a, n) for (int i = a; i > n; i--)
int main() {
float N, limit, sum = 0;
cin >> N >> limit;
vector<float> a(N);
froop1(0, N) {
cin >> a.at(i);
sum += a.at(i);
}
int count = 0;
froop1(0, N)... | [["-", 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 | 142 |
N, M = map(int,input().split())
A = list(map(int,input().split()))
B = [1 for a in A if a >= sum(A)//(4*M)]
if sum(B) >= M:
print("Yes")
else:
print("No")
| N, M = map(int,input().split())
A = list(map(int,input().split()))
B = [1 for a in A if a >= (sum(A)-1)//(4*M)+1]
if sum(B) >= M:
print("Yes")
else:
print("No")
| [["+", 0, 666, 0, 657, 31, 657, 31, 23, 0, 24], ["+", 31, 23, 0, 657, 31, 652, 3, 4, 0, 25], ["+", 0, 657, 31, 657, 31, 23, 0, 657, 17, 33], ["+", 0, 657, 31, 657, 31, 23, 0, 657, 12, 612], ["+", 12, 658, 0, 678, 0, 666, 0, 657, 17, 72], ["+", 12, 658, 0, 678, 0, 666, 0, 657, 12, 612]] | 5 | 77 |
<?php
fscanf(STDIN,"%d%d",$N,$M);
$array_A = array_map('intval',explode(" ",trim(fgets(STDIN))));
$sum = array_sum($array_A);
$sum_quart = $sum/4;
rsort($array_A);
array_unshift($array_A,0);
// var_dump($array_A);
if($array_A[$M] < $sum_quart){
echo ... | <?php
fscanf(STDIN,"%d%d",$N,$M);
$array_A = array_map('intval',explode(" ",trim(fgets(STDIN))));
$sum = array_sum($array_A);
$sum_quart = $sum/(4*$M);
rsort($array_A);
array_unshift($array_A,0);
// var_dump($array_A);
// var_dump($array_A[$M]);
// var_dump($... | [["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 24], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 17, 48], ["+", 12, 16, 12, 23, 0, 16, 12, 606, 0, 607], ["+", 12, 16, 12, 23, 0, 16, 12, 606, 0, 141], ["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 25]] | 6 | 101 |
n, m = map(int, input().split())
arr = list(map(int, input().split()))
p = sum(arr)
c = 0
for i in arr:
if i >= p//(4*m):
c += 1
if c>= m:
print("Yes")
else:
print("No")
| n, m = map(int, input().split())
arr = list(map(int, input().split()))
p = sum(arr)
c = 0
for i in arr:
if i >= p/(4*m):
c += 1
if c>= 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]] | 5 | 80 |
n, m = map(int, input().split())
a = sorted(list(map(int, input().split())), reverse=True)
if a[m] >= sum(a) / (4 * m):
print("Yes")
else:
print("No")
| n, m = map(int, input().split())
a = sorted(list(map(int, input().split())), 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 | 71 |
import math
N,M = map(int,input().split())
A = list(map(int,input().split()))
SUM = sum(A)
ans = 0
for i in range(N):
if A[i] >= math.ceil(SUM/4):
ans +=1
if ans >= M:
print("Yes")
else:
print("No") | import math
N,M = map(int,input().split())
A = list(map(int,input().split()))
SUM = sum(A)
ans = 0
for i in range(N):
if A[i] >= math.ceil(SUM/4/M):
ans +=1
if ans >= M:
print("Yes")
else:
print("No") | [["+", 15, 666, 0, 652, 3, 4, 0, 657, 17, 85], ["+", 15, 666, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 89 |
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, m;
vector<int> vec;
cin >> n >> m;
for (int i = 0; i < n; i++) {
int v;
cin >> v;
vec.push_back(v);
}
int ct = 0;
int su... | #include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, m;
vector<int> vec;
cin >> n >> m;
for (int i = 0; i < n; i++) {
int v;
cin >> v;
vec.push_back(v);
}
int ct = 0;
int su... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]] | 1 | 151 |
n,m = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
k=sum(a)
a.sort(reverse=True)
cont=0
ans=''
for i in a:
if i>k*(1/(4*m)):
cont+=1
if cont>=m: print("Yes")
else: print("No")
| n,m = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
k=sum(a)
a.sort(reverse=True)
cont=0
ans=''
for i in a:
if i>=k*(1/(4*m)):
cont+=1
if cont>=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 | 101 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define debug(x) cerr << #x << " = " << x << endl
int main(int qtd, char *nome[]) {
ios::sync_with_stdio(false);
cin.tie(0);
int n, m;
cin >> n >> m;
int a[n], sum = 0;
for (int &x : a)
cin >> x, sum += x;
sort(a, a + n);
bool ans ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define debug(x) cerr << #x << " = " << x << endl
int main(int qtd, char *nome[]) {
ios::sync_with_stdio(false);
cin.tie(0);
int n, m;
cin >> n >> m;
int a[n], sum = 0;
for (int &x : a)
cin >> x, sum += x;
sort(a, a + n);
bool ans ... | [["+", 8, 57, 15, 339, 51, 16, 12, 2, 63, 22], ["+", 15, 339, 51, 16, 12, 2, 3, 4, 0, 24], ["-", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13], ["+", 3, 4, 0, 16, 12, 23, 0, 16, 31, 13], ["+", 12, 2, 3, 4, 0, 16, 12, 23, 0, 25]] | 1 | 154 |
#include <stdio.h>
signed main() {
int N, M, i, j, count = 0, sum = 0;
scanf("%d %d", &N, &M);
int A[100];
for (i = 0; i < N; i++) {
scanf("%d", &A[i]);
sum += A[i];
}
sum /= 4 * M;
for (i = 0; i < N; i++) {
if (A[i] >= sum) {
count++;
}
}
if (count >= M) {
printf("Yes\n");
... | #include <stdio.h>
signed main() {
int N, M, i, j, count = 0;
double sum = 0;
scanf("%d %d", &N, &M);
int A[100];
for (i = 0; i < N; i++) {
scanf("%d", &A[i]);
sum += A[i];
}
sum /= 4 * M;
for (i = 0; i < N; i++) {
if (A[i] >= sum) {
count++;
}
}
if (count >= M) {
printf("Y... | [["-", 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 | 146 |
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();
List<Integer> n = new ArrayList<>();
for (int i = 0; i < N; i++) {
n.add(sc.nextInt());
}
int sum = 0;
for (int i... | 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();
List<Integer> n = new ArrayList<>();
for (int i = 0; i < N; i++) {
n.add(sc.nextInt());
}
double sum = 0;
for (in... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 511, 0, 512], ["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 47], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 20]] | 3 | 204 |
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 t[] = new int[N];
int tt = 0;
for (int i = 0; i < N; i++) {
t[i] = sc.nextInt();
tt += t[i];
}
int... | 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 t[] = new int[N];
double tt = 0;
for (int i = 0; i < N; i++) {
t[i] = sc.nextInt();
tt += t[i];
}
d... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 511, 0, 512]] | 3 | 185 |
def main():
N, M = map(int, input().split())
A = list(map(int, input().split(' ')))
A.sort()
A.reverse()
total = sum(A)
for i in range(M):
if total // (4 * M) < A[i]:
continue
print('No')
return
print('Yes')
main() | def main():
N, M = map(int, input().split())
A = list(map(int, input().split(' ')))
A.sort()
A.reverse()
total = sum(A)
for i in range(M):
if total / (4 * M) <= A[i]:
continue
print('No')
return
print('Yes')
main() | [["-", 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 | 96 |
n, m = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
total = sum(a)
if total/(4*m) > a[m]:
print("No")
else:
print("Yes") | n, m = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
total = sum(a)
if total/(4*m) > a[-m]:
print("No")
else:
print("Yes") | [["+", 0, 57, 15, 666, 0, 206, 206, 664, 17, 33]] | 5 | 72 |
N, M = gets.split(" ").map {|s| s.to_i }
arr = gets.split(" ").map {|s| s.to_i }
sarr = arr.sort
total = sarr.sum
puts sarr[-M] * 4 * M >= total ? "yes" : "no" | N, M = gets.split(" ").map {|s| s.to_i }
arr = gets.split(" ").map {|s| s.to_i }
sarr = arr.sort
total = sarr.sum
puts sarr[-M] * 4 * M >= total ? "Yes" : "No" | [["-", 0, 652, 3, 4, 0, 754, 64, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 754, 64, 557, 0, 6], ["-", 0, 652, 3, 4, 0, 754, 75, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 754, 75, 557, 0, 6]] | 4 | 72 |
n, m = gets.chomp.split(" ").map(&:to_i)
arr = gets.chomp.split(" ").map(&:to_i)
total = arr.sum
if arr.select { |a| a >= total / (4 * m) }.count >= m
puts "Yes"
else
puts "No"
end | n, m = gets.chomp.split(" ").map(&:to_i)
arr = gets.chomp.split(" ").map(&:to_i)
total = arr.sum
if arr.select { |a| a >= total.to_f / (4 * m) }.count >= m
puts "Yes"
else
puts "No"
end | [["+", 8, 734, 0, 738, 12, 738, 31, 652, 17, 131], ["+", 8, 734, 0, 738, 12, 738, 31, 652, 735, 22]] | 4 | 75 |
N, M = gets.split.map(&:to_i)
A = gets.split.map(&:to_i).sort
puts A[N-M]<A.sum/(4*M) ? "No" : "Yes" | N, M = gets.split.map(&:to_i)
A = gets.split.map(&:to_i).sort
puts A[N-M]<A.sum.to_f/(4*M) ? "No" : "Yes" | [["+", 0, 754, 15, 738, 12, 738, 31, 652, 17, 131], ["+", 0, 754, 15, 738, 12, 738, 31, 652, 735, 22]] | 4 | 51 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fast \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fast \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie... | [["-", 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 | 250 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const long long INF = 1LL << 60;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const long long INF = 1LL << 60;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 248 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using namespace std;
using P = pair<int, int>;
using ll = long long;
int main() {
int n, m, sum = 0;
cin >> n >> m;
int a[n];
rep(i, n) {
cin >> a[i];
sum += a[i];
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using namespace std;
using P = pair<int, int>;
using ll = long long;
int main() {
int n, m, sum = 0;
cin >> n >> m;
int a[n];
rep(i, n) {
cin >> a[i];
sum += a[i];
... | [["+", 12, 23, 0, 41, 15, 16, 31, 74, 0, 24], ["+", 0, 41, 15, 16, 31, 74, 39, 77, 39, 40], ["+", 12, 23, 0, 41, 15, 16, 31, 74, 0, 25], ["+", 0, 41, 15, 16, 12, 16, 31, 74, 0, 24], ["+", 15, 16, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 0, 41, 15, 16, 12, 16, 31, 74, 0, 25]] | 1 | 139 |
import math
N, M = map(int, input().split())
ans = 0
Nlist = list(map(int, input().split()))
total = sum(Nlist)
Mmin = math.floor(total*1/(4*M))
ans = len([1 for x in Nlist if x >= Mmin])
if ans >= M:
print('Yes')
else:
print('No')
| import math
N, M = map(int, input().split())
ans = 0
Nlist = list(map(int, input().split()))
total = sum(Nlist)
Mmin = math.ceil(total*1/(4*M))
ans = len([1 for x in Nlist if x >= Mmin])
if ans >= M:
print('Yes')
else:
print('No')
| [["-", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22]] | 5 | 95 |
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[] Az = new int[N];
int[] sortedAz = new int[N];
for (int i = 0; i < N; i++) {
Az[i] = sc.nextInt();
}
Arrays.sort... | 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[] Az = new int[N];
int[] sortedAz = new int[N];
for (int i = 0; i < N; i++) {
Az[i] = sc.nextInt();
}
Arrays.sort... | [["-", 0, 503, 49, 200, 51, 74, 51, 23, 0, 24], ["-", 51, 74, 51, 23, 0, 16, 12, 23, 0, 25]] | 3 | 227 |
n,m=map(int,input().split())
a=list(map(int,input().split()))
print('NYoe s'[len([i for i in a if i>sum(a)/4/m])>=m::2]) | n,m=map(int,input().split())
a=list(map(int,input().split()))
print('NYoe s'[len([i for i in a if i>=sum(a)/4/m])>=m::2]) | [["-", 3, 4, 0, 658, 0, 678, 0, 666, 667, 47], ["+", 3, 4, 0, 658, 0, 678, 0, 666, 667, 20]] | 5 | 67 |
#include <bits/stdc++.h>
#define MAX 1000000
#define MOD 1e9
#define pb push_back
#define pairs pair<int, int>
#define vi vector<int>
#define vb vector<bool>
#define vii vector<pairs>
#define lb lower_bound
#define ub upper_bound
#define ll long long
#define endl '\n'
using namespace std;
/* ---------------------------... | #include <bits/stdc++.h>
#define MAX 1000000
#define MOD 1e9
#define pb push_back
#define pairs pair<int, int>
#define vi vector<int>
#define vb vector<bool>
#define vii vector<pairs>
#define lb lower_bound
#define ub upper_bound
#define ll long long
#define endl '\n'
using namespace std;
/* ---------------------------... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 445 |
#include <bits/stdc++.h>
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define pb push_back
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define ll long long
using namespace std;
const ll P = 1000000007;
const long long INF = 1LL << 60;
int gcd(in... | #include <bits/stdc++.h>
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define pb push_back
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define ll long long
using namespace std;
const ll P = 1000000007;
const long long INF = 1LL << 60;
int gcd(in... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 223 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
const ll INF = 1LL << 60;
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... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
const ll INF = 1LL << 60;
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... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 48], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 13], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 48], ["-", 15, 339, 51, 16, 12, 16, 31, 16, 17, 85], ["-", 15, 339, 51, 16, 12, 16, 31, 16, 12, 13]] | 1 | 149 |
import numpy as np
n, m = map(int, input().split())
vote_lists = list(map(int, input().split()))
vote_arr = np.array(vote_lists)
total_vote = vote_arr.sum()
is_popular = total_vote / (4 * m)
answer_lists = []
for i in vote_lists:
if i >= is_popular:
answer_lists.append(i)
if len(answer_lists) >= m:
print('... | import numpy as np
n, m = map(int, input().split())
vote_lists = list(map(int, input().split()))
vote_arr = np.array(vote_lists)
total_vote = vote_arr.sum()
is_popular = total_vote / (4 * m)
answer_lists = []
for i in vote_lists:
if i >= is_popular:
answer_lists.append(i)
if len(answer_lists) >= m:
print('... | [["-", 75, 76, 8, 196, 0, 1, 0, 652, 63, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 652, 63, 22]] | 5 | 103 |
N,M = map(int,input().split())
A = list(map(int,input().split()))
s = sum(A)
A=sorted(A)
for i in range(N):
if i == M-1:
if (s/(4*M))>A[i]:
print('No')
else:
print('Yes') | N,M = map(int,input().split())
A = list(map(int,input().split()))
s = sum(A)
A.sort(reverse=True)
for i in range(N):
if i == M-1:
if (s/(4*M))>A[i]:
print('No')
else:
print('Yes') | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 0, 131], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 0... | 5 | 90 |
N,M = map(int,input().split())
A = list(map(int,input().split()))
s = sum(A)
A=sorted(A)
for i in range(N):
if i == M-1:
if (s/(4*M))>A[i]:
print('No')
else:
print('Yes') | N,M = map(int,input().split())
A = list(map(int,input().split()))
s = sum(A)
A = sorted(A,reverse=True)
for i in range(N):
if i == M-1:
if (s/(4*M))>A[i]:
print('No')
else:
print('Yes') | [["+", 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 | 90 |
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 list[] = new int[n];
int sum = 0;
for (int i = 0; i < n; i++) {
list[i] = sc.nextInt();
sum += list[i];
}
/... | 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 list[] = new int[n];
double sum = 0;
for (int i = 0; i < n; i++) {
list[i] = sc.nextInt();
sum += list[i];
}
... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 511, 0, 512], ["-", 8, 196, 0, 57, 15, 15, 0, 16, 12, 499], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 12, 22]] | 3 | 178 |
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
int n, m;
cin >> n >> m;
int sum = 0;
vector<int> A(n);
for (size_t i = 0; i < n; i++) {
cin >> A[i];
sum += A[i];
}
int ans = 0;
for (size_t i = 0; i < n; i++) {
if (A[i] >= sum / (4 * m))
++ans;
... | #include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
int n, m;
cin >> n >> m;
int sum = 0;
vector<int> A(n);
for (size_t i = 0; i < n; i++) {
cin >> A[i];
sum += A[i];
}
int ans = 0;
for (size_t i = 0; i < n; i++) {
if (A[i] >= (double)sum / (4 * m))
... | [["+", 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 |
n, m = map(int, input().split())
a = list(map(int, input().split()))
A = sum(a)
count = 0
for i in a:
if i > A / (4*m):
count += 1
if count >= m:
print('Yes')
else:
print('No')
| n, m = map(int, input().split())
a = list(map(int, input().split()))
A = sum(a)
count = 0
for i in a:
if i >= A / (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 | 80 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a[n];
int all = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
all += a[i];
}
sort(a, a + n);
string ans = "Yes";
if (a[n - m] < all / (4 * m)) {
ans = "No";
}
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a[n];
int all = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
all += a[i];
}
sort(a, a + n);
string ans = "Yes";
if (a[n - m] * (4 * m) < all) {
ans = "No";
}
cout << ans << endl;
return 0;
}
| [["-", 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], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 48], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 114 |
N, M = map(int, input().split())
A = list(map(int, input().split()))
mmin = sum(A) * (4*M)
A.sort()
if A[m-1] < mmin:
print('No')
else:
print('Yes') | N, M = map(int, input().split())
A = list(map(int, input().split()))
mmin = sum(A) / (4*M)
A.sort(reverse=True)
if A[M-1] < mmin:
print('No')
else:
print('Yes') | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 48], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 51, 146], ["-", 0, 57, 15, 666, 0, 206, 206, 657, 31, 22], ["+", 0, 57, 15, 666, 0, 206, 206, 657, 31, 22]] | 5 | 74 |
n,m = map(int,input().split())
a = list(map(int,input().split()))
asum = sum(a)
r = 0
for i in range(n):
if a[i] >= asum//(4*m):
r += 1
print("Yes" if r >= m else "No") | n,m = map(int,input().split())
a = list(map(int,input().split()))
asum = sum(a)
r = 0
for i in range(n):
if a[i] >= asum/(4*m):
r += 1
print("Yes" if r >= m else "No") | [["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 676], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 85]] | 5 | 81 |
#include <algorithm>
#include <bitset>
#include <chrono>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a[n];
int total = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
total ... | #include <algorithm>
#include <bitset>
#include <chrono>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a[n];
int total = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
total ... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22]] | 1 | 175 |
#include <bits/stdc++.h>
#define int int64_t
#define REP(i, n) for (int i = 0; (i) < (int)(n); ++(i))
#define REP3(i, m, n) for (int i = (m); (i) < (int)(n); ++(i))
#define REP_R(i, n) for (int i = (int)(n)-1; (i) >= 0; --(i))
#define REP3R(i, m, n) for (int i = (int)(n)-1; (i) >= (int)(m); --(i))
#define REPP(i, n) fo... | #include <bits/stdc++.h>
#define int int64_t
#define REP(i, n) for (int i = 0; (i) < (int)(n); ++(i))
#define REP3(i, m, n) for (int i = (m); (i) < (int)(n); ++(i))
#define REP_R(i, n) for (int i = (int)(n)-1; (i) >= 0; --(i))
#define REP3R(i, m, n) for (int i = (int)(n)-1; (i) >= (int)(m); --(i))
#define REPP(i, n) fo... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 546 |
N, M = map(int, input().split())
A_s = list(map(int, input().split()))
cnt = 0
for A in A_s:
if A > sum(A_s)/4/M:
cnt += 1
if cnt >= M:
print('Yes')
else:
print('No') | N, M = map(int, input().split())
A_s = list(map(int, input().split()))
cnt = 0
for A in A_s:
if A < sum(A_s)/4/M:
cnt += 1
if N-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, 18], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 31, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 33]] | 5 | 75 |
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, s, n) for (int i = s; i < (n); i++)
#define ALL(a) a.begin(), a.end()
#define RALL(a) a.rbegin(), a.rend()
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class ... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, s, n) for (int i = s; i < (n); i++)
#define ALL(a) a.begin(), a.end()
#define RALL(a) a.rbegin(), a.rend()
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class ... | [["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 48], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 12, 13], ["+", 15, 339, 51, 16, 12, 16, 12, 23, 0, 24], ["+", 51, 16, 12, 16, 12, 23, 0, 16, 17, 48], ["+", 51, 16, 12, 16, 12, 23, 0, 16, 12, 22], ["+", 15, 339, 51, 16, 12, 16, 12, 23, 0, 25]] | 1 | 269 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const int mod = 1000000007;
const double PI = 3.14159265359;
#define mxe(v) *max_element(v.begin(), v.end())
#define mne(v) *min_element(v.begin(), v.end())
#define INF 1000000000000
#define pb push_back
#define pf push_front
#d... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const int mod = 1000000007;
const double PI = 3.14159265359;
#define mxe(v) *max_element(v.begin(), v.end())
#define mne(v) *min_element(v.begin(), v.end())
#define INF 1000000000000
#define pb push_back
#define pf push_front
#d... | [["-", 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, 78], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 413 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
int sum = 0; //得票数
int count = 0;
cin >> N >> M;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A[i];
sum += A[i];
}
// cout << "sum" << sum << endl;
int border = sum / (4 * M);
// cout << "border" << border << end... | #include <bits/stdc++.h>
using namespace std;
int main() {
double N, M;
double sum = 0; //得票数
double count = 0;
cin >> N >> M;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A[i];
sum += A[i];
}
// cout << "sum" << sum << endl;
double border = sum / (4 * M);
// cout << "border" << b... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 142 |
n, m = map(int, input().split())
a = map(int, input().split())
ans = 0
for i in range(n):
if a[i] >= sum(a)*(1/(4*m)):
ans += 1
if ans >= m:
print("Yes")
else:
print("No") | n, m = map(int, input().split())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
if a[i] >= sum(a)*(1/(4*m)):
ans += 1
if ans >= m:
print("Yes")
else:
print("No") | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 84 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int N, A[110] = {};
int M, sum = 0;
cin >> N >> M;
for (int i = 0; i < N; i++) {
cin >> A[i];
sum += A[i];
}
sort(A, A + N, greater<>());
if (A[M - 1] >= sum / (4 * M)) {
cout << "Yes" << endl;
} else {
cout ... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int N, M;
double A[110] = {}, sum = 0;
cin >> N >> M;
for (int i = 0; i < N; i++) {
cin >> A[i];
sum += A[i];
}
sort(A, A + N, greater<>());
if (A[M - 1] >= sum / (4 * M)) {
cout << "Yes" << endl;
} else {
co... | [["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 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, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22]] | 1 | 124 |
n,m=map(int,input().split())
li=list(map(int,input().split()))
count=0
for i in li:
if i >= sum(li)*1/4*m : count += 1
if count >= m: print("Yes")
else:print("No") | n,m=map(int,input().split())
li=list(map(int,input().split()))
count=0
for i in li:
if i >= sum(li)/(4*m) : count += 1
if count >= m: print("Yes")
else:print("No") | [["-", 15, 666, 0, 657, 31, 657, 31, 657, 17, 48], ["-", 15, 666, 0, 657, 31, 657, 31, 657, 12, 612], ["+", 0, 57, 15, 666, 0, 657, 12, 23, 0, 24], ["+", 0, 57, 15, 666, 0, 657, 12, 23, 0, 25]] | 5 | 77 |
#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define ll long long
#define int long long
#define inf ((ll)1e18)
#define double long double
#define ull unsigned long long
#define mod 1000000007
#define vi vector<ll>
#define extreme inline
#define ppi pair<ll, pair<ll, ll>>
#define pb p... | #include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define ll long long
#define int long long
#define inf ((ll)1e18)
#define double long double
#define ull unsigned long long
#define mod 1000000007
#define vi vector<ll>
#define extreme inline
#define ppi pair<ll, pair<ll, ll>>
#define pb p... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 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 | 261 |
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#de... | #include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#de... | [["-", 15, 339, 51, 16, 12, 23, 0, 16, 31, 13], ["+", 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], ["+", 51, 16, 12, 23, 0, 16, 31, 74, 51, 22]] | 1 | 189 |
n,m = map(int, input().split())
hyou= list(map(int,input().split()))
all = sum(hyou)
min = all / 4 / m
erabu = 0
for i in range(n):
if hyou[i]>min:
erabu += 1
print("Yes" if erabu >= m else "No") | n,m = map(int, input().split())
hyou= list(map(int,input().split()))
all = sum(hyou)
min = all / 4 / m
erabu = 0
for i in range(n):
if hyou[i] >= min:
erabu += 1
print("Yes" if erabu >= m else "No") | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 82 |
n, m = map(int, input().split())
a = list(map(int, input().split()))
cnt = 0
for val in a:
if val > sum(a) / (4 * m):
cnt += 1
if cnt >= m:
print("Yes")
else:
print("No") | n, m = map(int, input().split())
a = list(map(int, input().split()))
cnt = 0
for val in a:
if val >= sum(a) / (4 * m):
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 | 77 |
#include <bits/stdc++.h>
typedef uint64_t u64;
typedef int64_t i64;
typedef uint32_t u32;
typedef int32_t i32;
typedef uint16_t u16;
typedef int16_t i16;
typedef uint8_t u8;
typedef int8_t i8;
using namespace std;
#define rep(idx, N) for (u64 idx = 0; idx < N; idx++)
int main() {
i64 v[101] = {0};
i64 n, m;
... | #include <bits/stdc++.h>
typedef uint64_t u64;
typedef int64_t i64;
typedef uint32_t u32;
typedef int32_t i32;
typedef uint16_t u16;
typedef int16_t i16;
typedef uint8_t u8;
typedef int8_t i8;
using namespace std;
#define rep(idx, N) for (u64 idx = 0; idx < N; idx++)
int main() {
i64 v[101] = {0};
i64 n, m;
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 169 |
#include <bits/stdc++.h>
#define speed_up \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
#define ll long long
#define ara(A, N) sort(A, A + N)
#define rev(A, N) sort(A, A + N, greater<long long>())
using na... | #include <bits/stdc++.h>
#define speed_up \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
#define ll long long
#define ara(A, N) sort(A, A + N)
#define rev(A, N) sort(A, A + N, greater<long long>())
using na... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 172 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, arr[105], i, count = 0, sum = 0;
double a;
cin >> n;
cin >> m;
for (i = 0; i < n; i++) {
cin >> arr[i];
}
for (i = 0; i < n; i++) {
sum = sum + arr[i];
}
a = sum / (4 * m);
for (i = 0; i < n; i++) {
if (arr[i] >= a) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, arr[105], i, count = 0, sum = 0;
double a;
cin >> n;
cin >> m;
for (i = 0; i < n; i++) {
cin >> arr[i];
}
for (i = 0; i < n; i++) {
sum = sum + arr[i];
}
a = sum / (4.0 * m);
for (i = 0; i < n; i++) {
if (arr[i] >= a) {... | [["-", 0, 11, 12, 16, 12, 23, 0, 16, 31, 13], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 31, 13]] | 1 | 155 |
#include <bits/stdc++.h>
using namespace std;
main() {
long long int a[100000], b[1000], c[1000], n, aaa, k, i,
r = 0, rr = 0, d1, dd = 0, d2, d3, ck = 0, m, j, aa, bb, cc;
// char cr[1000];
float aaf, bbf, ccf, rf, kf;
// scanf("%lld",&n);
cin >> n >> k;
for (i = 0; i < n; i++) {
cin >> a[i];
... | #include <bits/stdc++.h>
using namespace std;
main() {
long long int a[100000], b[1000], c[1000], n, aaa, k, i,
r = 0, rr = 0, d1, dd = 0, d2, d3, ck = 0, m, j, aa, bb, cc;
// char cr[1000];
float aaf, bbf, ccf, rf, kf;
// scanf("%lld",&n);
cin >> n >> k;
for (i = 0; i < n; i++) {
cin >> a[i];
... | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 12, 22], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 12, 22]] | 1 | 223 |
import sys
input = sys.stdin.readline
n,m = map(int,input().split())
L=list(map(int,input().split()))
mx = sum(L)
mn = mx/(4*m)
L.sort(reverse = True)
count = 0
for i in range(n):
if L[i]>mn:
count+=1
if count ==m:
print('Yes')
sys.exit()
print('No')
sys.exit()
| import sys
input = sys.stdin.readline
n,m = map(int,input().split())
L=list(map(int,input().split()))
mx = sum(L)
mn = mx/(4*m)
L.sort(reverse = True)
count = 0
for i in range(n):
if L[i]>=mn:
count+=1
if count ==m:
print('Yes')
sys.exit()
print('No')
sys.exit()
| [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 114 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
typedef long double ld;
#define PI 3.14159265358979... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
typedef long double ld;
#define PI 3.14159265358979... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 12, 23, 0, 16, 12, 23, 0, 16, 31, 13], ["+", 12, 23, 0, 16, 12, 23, 0, 16, 31, 13], ["+", 0, 16, 12, 23, 0, 16, 12, 74, 0, 24], ["+", 12, 23, 0, 16, 12, 74, 39, 77, 39, 78], ["+", 0, 16, 12, 23, 0, 16, 12, 74, 0, 25]] | 1 | 192 |
"use strict";
function main(input) {
const line = input.split("\n");
let arr = line[0].split(" ");
const N = arr[0];
const M = arr[1];
const A = line[1].split(" ").map(Number);
A.sort(function(a, b) { return a < b ? 1 : b < a ? -1 : 0; });
const accum = A.reduce((Ai, x) => Ai + x);
console.log((((accum ... | "use strict";
function main(input) {
const line = input.split("\n");
let arr = line[0].split(" ");
const N = arr[0];
const M = arr[1];
const A = line[1].split(" ").map(Number);
A.sort(function(a, b) { return a < b ? 1 : b < a ? -1 : 0; });
const accum = A.reduce((Ai, x) => Ai + x);
console.log((((accum ... | [["+", 31, 23, 0, 16, 31, 16, 12, 23, 0, 24], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 31, 555], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 12, 22], ["+", 31, 23, 0, 16, 31, 16, 12, 23, 0, 25], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 17, 33]] | 2 | 183 |
"use strict";
function main(input) {
const line = input.split("\n");
let arr = line[0].split(" ");
const N = parseInt(arr[0]);
const M = parseInt(arr[1]);
const A = line[1].split(" ").map(Number);
A.sort(function(a, b) { return a < b ? 1 : b < a ? -1 : 0; });
const accum = A.reduce((Ai, x) => Ai + x);
c... | "use strict";
function main(input) {
const line = input.split("\n");
let arr = line[0].split(" ");
const N = parseInt(arr[0]);
const M = parseInt(arr[1]);
const A = line[1].split(" ").map(Number);
A.sort(function(a, b) { return a < b ? 1 : b < a ? -1 : 0; });
const accum = A.reduce((Ai, x) => Ai + x);
c... | [["-", 3, 3, 0, 510, 15, 16, 31, 23, 0, 24], ["-", 15, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["-", 0, 16, 31, 23, 0, 16, 12, 23, 0, 25], ["-", 15, 16, 31, 23, 0, 16, 31, 23, 0, 25], ["-", 0, 510, 15, 16, 31, 23, 0, 16, 17, 139], ["-", 0, 510, 15, 16, 31, 23, 0, 16, 12, 555]] | 2 | 185 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define fo(a, b) for (int a = 0; a < b; a++)
#define Sort(a) sort(a.begin(), a.end())
#define rev(a) reverse(a.begin(), a.end())
#define fi first
#define se second
#define sz size()
#define bgn begin()
#define en end()
#defin... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define fo(a, b) for (int a = 0; a < b; a++)
#define Sort(a) sort(a.begin(), a.end())
#define rev(a) reverse(a.begin(), a.end())
#define fi first
#define se second
#define sz size()
#define bgn begin()
#define en end()
#defin... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 3,114 |
n,m=map(int,input().split())
a=list(map(int,input().split()))
x=sum(a)//(4*m)
c=0
for i in range(n):
if a[i]>=x:
c+=1
if c<m:
print('No')
else:
print('Yes') | n,m=map(int,input().split())
a=list(map(int,input().split()))
x=sum(a)/(4*m)
c=0
for i in range(n):
if a[i]>=x:
c+=1
if c<m:
print('No')
else:
print('Yes') | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85]] | 5 | 86 |
#include <bits/stdc++.h>
#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());
double criteria = 0;
int s = 0;
rep(i, n) s += a[i];
cri... | #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());
double criteria = 0;
int s = 0;
rep(i, n) s += a[i];
cri... | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 155 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, a, b) for (int i = (a); i < (b); i++)
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
int a[n];
int sum = 0;
rep(i, n) {
cin >> a[i];
sum += a[i];
}
int count = 0;
rep(i, ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, a, b) for (int i = (a); i < (b); i++)
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
int a[n];
double sum = 0;
rep(i, n) {
cin >> a[i];
sum += a[i];
}
int count = 0;
rep(... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 135 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ld long double
#define mp make_pair
#define ff first
#define ss second
#define pb push_back
#define fo(i, n) for (i = 0; i < n; i++)
#define fo1(i, n) for (i = 1; i <= n; i++)
#define FO(i, k, n) for (i = k; k <= n ? i <= n : i >= n; k <= n ? ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ld long double
#define mp make_pair
#define ff first
#define ss second
#define pb push_back
#define fo(i, n) for (i = 0; i < n; i++)
#define fo1(i, n) for (i = 1; i <= n; i++)
#define FO(i, k, n) for (i = k; k <= n ? i <= n : i >= n; k <= n ? ... | [["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 31, 13], ["+", 3, 4, 0, 16, 12, 23, 0, 16, 31, 13], ["+", 12, 2, 3, 4, 0, 16, 12, 23, 0, 25]] | 1 | 748 |
#include <iostream>
using namespace std;
int compare(const void *a, const void *b) { return *(int *)b - *(int *)a; }
int main() {
int N, M;
cin >> N;
cin >> M;
int A[N], total = 0, tmp;
for (int i = 0; i < N; i++) {
cin >> tmp;
A[i] = tmp;
total += tmp;
}
qsort(A, N, sizeof(int), compare)... | #include <iostream>
using namespace std;
int compare(const void *a, const void *b) { return *(int *)b - *(int *)a; }
int main() {
int N, M;
cin >> N;
cin >> M;
int A[N], total = 0, tmp;
for (int i = 0; i < N; i++) {
cin >> tmp;
A[i] = tmp;
total += tmp;
}
qsort(A, N, sizeof(int), compare)... | [["-", 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 | 149 |
n , m = map(int,input().split())
a = list(map(int,input().split()))
can_choice_item_list =[]
for item in a:
if item < 1 / (4 * m):
pass
else:
can_choice_item_list.append(item)
if m <= len(can_choice_item_list):
print('Yes')
else:
print('No') | n , m = map(int,input().split())
a = list(map(int,input().split()))
can_choice_item_list =[]
for item in a:
if item < sum(a) / (4 * m):
pass
else:
can_choice_item_list.append(item)
if m <= len(can_choice_item_list):
print('Yes')
else:
print('No') | [["-", 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 | 84 |
#include <bits/stdc++.h>
#include <iomanip>
#include <sstream>
#define ll long long
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define min_3(a, b, c) min(a, min(b, c))
#define max_3(a, b, c) max(a, max(b, c))
#define nout(ans) cout << (ans) << "\n"
#define sout(ans) cout << (ans) << " "
using names... | #include <bits/stdc++.h>
#include <iomanip>
#include <sstream>
#define ll long long
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define min_3(a, b, c) min(a, min(b, c))
#define max_3(a, b, c) max(a, max(b, c))
#define nout(ans) cout << (ans) << "\n"
#define sout(ans) cout << (ans) << " "
using names... | [["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["+", 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]] | 1 | 298 |
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <cstdio>
#include <ctime>
#include <ctype.h>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <r... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <cstdio>
#include <ctime>
#include <ctype.h>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <r... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 310 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
int cnt = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
cnt += a[i];
}
int ans = 0;
for (int i = 0; i < n; i++) {
if (a[i] * 4 * m >= 1)
ans++;
}
if (ans >= m)
cout << "Yes" <... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
int cnt = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
cnt += a[i];
}
int ans = 0;
for (int i = 0; i < n; i++) {
if (a[i] * 4 * m >= cnt)
ans++;
}
if (ans >= m)
cout << "Yes"... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 127 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> vec(n);
for (int i = 0; i < n; i++) {
cin >> vec[i];
}
int s = 0;
for (int i = 0; i < n; i++) {
s += vec[i];
}
int cnt = 0;
for (int i = 0; i < n; i++) {
if (vec[i] < s / (4 * m))
cnt++... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> vec(n);
for (int i = 0; i < n; i++) {
cin >> vec[i];
}
int s = 0;
for (int i = 0; i < n; i++) {
s += vec[i];
}
int cnt = 0;
for (int i = 0; i < n; i++) {
if (vec[i] * (4 * m) >= s)
cnt+... | [["-", 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], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 48], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 145 |
#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.at(i);
sum += a.at(i);
}
sort(a.begin(), a.end());
reverse(a.begin(), a.end());
if (a.at(m - 1) >= sum / (4 * m)) {
cout << "Yes" << en... | #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.at(i);
sum += a.at(i);
}
sort(a.begin(), a.end());
reverse(a.begin(), a.end());
if (a.at(m - 1) >= double(sum / (4.0 * m))) {
cout << "... | [["+", 0, 57, 15, 339, 51, 16, 12, 2, 63, 40], ["+", 15, 339, 51, 16, 12, 2, 3, 4, 0, 24], ["-", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13], ["+", 3, 4, 0, 16, 12, 23, 0, 16, 31, 13], ["+", 12, 2, 3, 4, 0, 16, 12, 23, 0, 25]] | 1 | 141 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner stdIn = new Scanner(System.in);
int N = stdIn.nextInt();
int M = stdIn.nextInt();
int[] a = new int[N];
int sum = 0;
for (int i = 0; i < N; i++) {
a[i] = stdIn.nextInt();
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner stdIn = new Scanner(System.in);
int N = stdIn.nextInt();
int M = stdIn.nextInt();
int[] a = new int[N];
double sum = 0;
for (int i = 0; i < N; i++) {
a[i] = stdIn.nextInt();
... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 511, 0, 512]] | 3 | 265 |
#inport
import sys
import numpy as np
from collections import deque
#input
N,M = [int(x) for x in sys.stdin.readline().split()]
g = [int(x) for x in sys.stdin.readline().split()]
g = np.array(g)
#print(g)
#print(1/4/M*np.sum(g))
#print(g >= 1/4/M*np.sum(g))
if np.count_nonzero(g >= 1/4/M*np.sum(g)) > M:
print('... | #inport
import sys
import numpy as np
from collections import deque
#input
N,M = [int(x) for x in sys.stdin.readline().split()]
g = [int(x) for x in sys.stdin.readline().split()]
g = np.array(g)
#print(g)
#print(1/4/M*np.sum(g))
#print(g >= 1/4/M*np.sum(g))
if np.count_nonzero(g >= 1/4/M*np.sum(g)) >= M:
print(... | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20]] | 5 | 106 |
#ifdef _DEBUG
#include ".vscode/debug_print.hpp"
#else
#define debug(...)
#endif
#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using namespace std;
constexpr int INF32 = 1050000000;
constexpr long long INF64 = 4000000000000000000;
constexpr int MOD7 = 1000000007;
constexpr int MOD53 = 99824435... | #ifdef _DEBUG
#include ".vscode/debug_print.hpp"
#else
#define debug(...)
#endif
#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using namespace std;
constexpr int INF32 = 1050000000;
constexpr long long INF64 = 4000000000000000000;
constexpr int MOD7 = 1000000007;
constexpr int MOD53 = 99824435... | [["+", 0, 57, 15, 339, 51, 16, 31, 74, 0, 24], ["+", 15, 339, 51, 16, 31, 74, 39, 77, 39, 78], ["+", 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, 78], ["+", 15, 339, 51, 16, 12, 16, 31, 74, 0, 25]] | 1 | 737 |
n, m = map(int, input().split())
a = list(map(int, input().split()))
select = 0
a.sort(reverse=True)
for i in range(m):
if a[i]/sum(a) > 1/(4*m):
select = 1
else:
select = 0
if select == 1:
print('Yes')
else:
print('No')
| n, m = map(int, input().split())
a = list(map(int, input().split()))
select = 0
a.sort(reverse=True)
for i in range(m):
if a[i]/sum(a) >= 1/(4*m):
select = 1
else:
select = 0
if select == 1:
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 | 98 |
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>; // グラフ型
typedef long long ll;
#define _GLIBCXX_DEBUG
#define NN 1001
int main() {
ll N, M;
cin >> N >> M;
vector<ll> A(N);
// vector<vector<int>> data(3, vector<int>(4));
ll sum = 0;
for (ll i = 1; i <= N; i++) {
cin >> A[... | #include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>; // グラフ型
typedef long long ll;
#define _GLIBCXX_DEBUG
int main() {
ll N, M;
cin >> N >> M;
vector<ll> A(N);
// vector<vector<int>> data(3, vector<int>(4));
ll sum = 0;
for (ll i = 0; i < N; i++) {
cin >> A[i];
sum += A[... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 0, 148], ["-", 36, 36, 36, 36, 0, 30, 0, 58, 141, 22], ["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]] | 1 | 167 |
n,m = map(int,input().split())
a=list(map(int,input().split()))
a_sum=sum(a)
a_sort=sorted(a)
for i in range(m):
if a_sort[i]<(a_sum)/4/m:
print("No")
break
else:
print("Yes") | n,m = map(int,input().split())
a=list(map(int,input().split()))
a_sum=sum(a)
a_sort=sorted(a,reverse=True)
for i in range(m):
if a_sort[i]<(a_sum)/4/m:
print("No")
break
else:
print("Yes") | [["+", 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 | 82 |
#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[i];
sort(a.begin(), a.end(), greater<int>());
long long int sum = accumulate(a.begin(), a.end(), 0);
for (int i = 0; i < m; i++) {
if (a[i] < 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[i];
sort(a.begin(), a.end(), greater<int>());
double sum = accumulate(a.begin(), a.end(), 0);
for (int i = 0; i < m; i++) {
if (a[i] < sum / 4 / m) {
... | [["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 43, 39, 86, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 150 |
n, m = map(int, input().split())
A = list(map(int, input().split()))
b = sum(A)/(4*m)
a = 0
print(b)
for i in range(n):
if A[i] >= b:
a += 1
if a >= m:
print("Yes")
else:
print("No") | n, m = map(int, input().split())
A = list(map(int, input().split()))
b = sum(A)/(4*m)
a = 0
#print(b)
for i in range(n):
if A[i] >= b:
a += 1
if a >= m:
print("Yes")
else:
print("No") | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 90 |
n, m = map(int, input().split())
a = list(map(int, input().split()))
a = sorted(a, reverse=True)
a_sum = sum(a)
ans = 'Yes'
for i, c in enumerate(a[:m]):
if c < a_sum / (4 * (i + 1)):
ans = 'No'
print(ans)
| n, m = map(int, input().split())
a = list(map(int, input().split()))
a = sorted(a, reverse=True)
a_sum = sum(a)
ans = 'Yes'
for i, c in enumerate(a[:m]):
if c < a_sum / (4 * m):
ans = 'No'
print(ans)
| [["-", 0, 657, 12, 23, 0, 657, 12, 23, 0, 24], ["-", 12, 23, 0, 657, 12, 23, 0, 657, 31, 22], ["-", 12, 23, 0, 657, 12, 23, 0, 657, 17, 72], ["-", 12, 23, 0, 657, 12, 23, 0, 657, 12, 612], ["-", 0, 657, 12, 23, 0, 657, 12, 23, 0, 25], ["+", 15, 666, 0, 657, 12, 23, 0, 657, 12, 22]] | 5 | 92 |
#include <iostream>
using namespace std;
int main() {
int N, M;
int A[110];
int ALL = 0;
cin >> N >> M;
for (int i = 0; i < N; i++) {
cin >> A[i];
ALL += A[i];
}
ALL /= 4 * M;
int res = 0;
for (int i = 0; i < N; i++) {
if (ALL <= A[i]) {
res++;
}
}
if (res >= M) {... | #include <iostream>
using namespace std;
int main() {
int N, M;
int A[110];
float ALL = 0.0f;
cin >> N >> M;
for (int i = 0; i < N; i++) {
cin >> A[i];
ALL += A[i];
}
ALL /= 4 * M;
int res = 0;
for (int i = 0; i < N; i++) {
if (ALL <= A[i]) {
res++;
}
}
if (res >=... | [["-", 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, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 131 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll, ll> ii;
typedef vector<vector<ll>> vvll;
typedef vector<pair<ll, ll>> vii;
typedef long double ld;
typedef vector<ld> vld;
typedef vector<vector<ld>> vvld;
typedef vector<bool> vbl;
typedef vector<vbl> mbl;
#de... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll, ll> ii;
typedef vector<vector<ll>> vvll;
typedef vector<pair<ll, ll>> vii;
typedef long double ld;
typedef vector<ld> vld;
typedef vector<vector<ld>> vvld;
typedef vector<bool> vbl;
typedef vector<vbl> mbl;
#de... | [["-", 51, 16, 31, 69, 341, 342, 0, 16, 17, 33], ["-", 51, 16, 31, 69, 341, 342, 0, 16, 12, 13]] | 1 | 249 |
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
using Graph = vector<vector<int>>;
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= (ll)(b); i++)
#define FORD(i, a, b) for (ll i = a; i >= (ll)(b); i--)
#... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
using Graph = vector<vector<int>>;
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= (ll)(b); i++)
#define FORD(i, a, b) for (ll i = a; i >= (ll)(b); i--)
#... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 363 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
int a[1001];
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += ... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
int a[1001];
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += ... | [["-", 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 | 156 |
N,M = (int(X) for X in input().split())
A = sorted([int(X) for X in input().split()],reverse=True)
if A[M-1]/sum(A) > 1/(4*M):
print('Yes')
else:
print('No') | N,M = (int(X) for X in input().split())
A = sorted([int(X) for X in input().split()],reverse=True)
if A[M-1]/sum(A) >= 1/(4*M):
print('Yes')
else:
print('No') | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20]] | 5 | 80 |
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("No")
else:
print("Yes")
| 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("No")
else:
print("Yes")
| [["-", 0, 656, 0, 57, 15, 666, 0, 657, 17, 676], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 85]] | 5 | 74 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/rope>
using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;
#define IOS \
ios::sync_with_stdio(0)... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/rope>
using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;
#define IOS \
ios::sync_with_stdio(0)... | [["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 51, 16, 31, 23, 0, 16, 31, 16, 17, 72], ["+", 51, 16, 31, 23, 0, 16, 31, 16, 12, 22], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 17, 33], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 25]] | 1 | 392 |
#include <bits/stdc++.h>
using namespace std;
int main() {
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];
}
sum /= 4 * M;
int count = 0;
for (int i = 0; i < N; i++) {
if (A[i] >= sum)
count++;
}
if (count >= M)
cout <... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int A[N];
double sum = 0;
for (int i = 0; i < N; i++) {
cin >> A[i];
sum += A[i];
}
sum /= 4 * M;
int count = 0;
for (int i = 0; i < N; i++) {
if (A[i] >= sum)
count++;
}
if (count >= M)
cou... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 126 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int A[N];
for (int i = 0; i < N; i++)
cin >> A[i];
sort(A, A + N, greater<int>());
int total = 0;
for (int i = 0; i < N; i++) {
total += A[i];
}
for (int i = 0; i < M; i++) {
if (A[i] < total / (4 * M)) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int A[N];
for (int i = 0; i < N; i++)
cin >> A[i];
sort(A, A + N, greater<int>());
int total = 0;
for (int i = 0; i < N; i++) {
total += A[i];
}
for (int i = 0; i < M; i++) {
if (A[i] < (double)total / (4 ... | [["+", 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 | 146 |
import sys
N, M = map(int, input().split())
A = list(map(int, input().split()))
p = sum(A) // ( 4 * M )
A = sorted(A, reverse=True)
for i in range(M):
if p > A[i]:
print("No")
sys.exit()
print("Yes") | import sys
N, M = map(int, input().split())
A = list(map(int, input().split()))
p = sum(A) / ( 4 * M )
A = sorted(A, reverse=True)
for i in range(M):
if p > A[i]:
print("No")
sys.exit()
print("Yes") | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85]] | 5 | 90 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
ll sum = 0;
rep(i, n) {
cin >> a.at(i);
sum += a.at(i);
}
int cnt = 0;
rep(i, n) {
if (sum < a.at(i) * 4 * m)
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
int sum = 0;
rep(i, n) {
cin >> a.at(i);
sum += a.at(i);
}
int cnt = 0;
rep(i, n) {
if (sum <= a.at(i) * 4 * m)
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 132 |
#include <bits/stdc++.h>
using namespace std;
#define EXCEPTERROR cout << "-1" << endl;
#define rep(k, nu) for (int i = k; i < nu; i++)
#define rep2(k, n) for (int j = k; j < n; j++)
#define size_a(array) sizeof(array) / sizeof(array[0])
#define INF 1000000000000 // 1e+12
#define MOD 10000007 // 1e9+7
#define ll l... | #include <bits/stdc++.h>
using namespace std;
#define EXCEPTERROR cout << "-1" << endl;
#define rep(k, nu) for (int i = k; i < nu; i++)
#define rep2(k, n) for (int j = k; j < n; j++)
#define size_a(array) sizeof(array) / sizeof(array[0])
#define INF 1000000000000 // 1e+12
#define MOD 10000007 // 1e9+7
#define ll l... | [["-", 12, 23, 0, 41, 15, 16, 12, 16, 31, 22], ["-", 12, 23, 0, 41, 15, 16, 12, 16, 17, 85], ["+", 12, 23, 0, 41, 15, 16, 12, 2, 63, 22], ["+", 0, 41, 15, 16, 12, 2, 3, 4, 0, 22], ["+", 0, 41, 15, 16, 12, 2, 3, 4, 0, 21]] | 1 | 254 |
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int a[N], flag[N];
int main() {
cin.tie(0);
cout.tie(0);
ios::sync_with_stdio(0);
int n, m;
cin >> n >> m;
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
int items = 0;
for (int i = 0; i < n; i++) {... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int a[N], flag[N];
int main() {
cin.tie(0);
cout.tie(0);
ios::sync_with_stdio(0);
double n, m;
cin >> n >> m;
double sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
int items = 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], ["-", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13], ["+", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13]] | 1 | 163 |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
int M = scan.nextInt();
int[] A = new int[N];
int votes = 0;
for (int i = 0; i < N; i++) {
A[i] = scan.nextIn... | import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
int M = scan.nextInt();
int[] A = new int[N];
float votes = 0;
for (int i = 0; i < N; i++) {
A[i] = scan.next... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 511, 0, 531], ["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 18], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 20], ["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 166 |
n,m = map(int,input().split())
a = list(map(int,input().split()))
a = sorted(a,reverse = True)
x = sum(a)
if a[m-1]<(x/4*m):
print("No")
else:
print("Yes") | n,m = map(int,input().split())
a = list(map(int,input().split()))
a = sorted(a,reverse = True)
x = sum(a)
if a[m-1]<(x/(4*m)):
print("No")
else:
print("Yes") | [["+", 15, 666, 0, 23, 0, 657, 12, 23, 0, 24], ["+", 15, 666, 0, 23, 0, 657, 12, 23, 0, 25]] | 5 | 79 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define optimize() \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define optimize() \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.... | [["-", 12, 23, 0, 16, 12, 23, 0, 16, 31, 13], ["+", 12, 23, 0, 16, 12, 23, 0, 16, 31, 13]] | 1 | 180 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
#define debug1(x) cerr << #x << " : " << x << "\n";
#define debug2(x, y) \
cerr << #x << " : " << x << "\t" << #y << " : " << y << "\n";
#define IOS ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
#define debug1(x) cerr << #x << " : " << x << "\n";
#define debug2(x, y) \
cerr << #x << " : " << x << "\t" << #y << " : " << y << "\n";
#define IOS ... | [["-", 8, 9, 0, 57, 64, 1, 0, 27, 28, 22], ["+", 8, 9, 0, 57, 64, 1, 0, 27, 28, 22]] | 1 | 174 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.