buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
#include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < (b); i++)
#define rrep(i, a, b) for (int i = a; i >= (b); i--)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
retu... | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < (b); i++)
#define rrep(i, a, b) for (int i = a; i >= (b); i--)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
retu... | [["-", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13], ["+", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13]] | 1 | 284 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(v) v.begin(), v.end()
#define CMAX(m, x) m = max(m, x);
#define CMIN(m, x) m = min(m, x);
#define itn int
typedef long ... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(v) v.begin(), v.end()
#define CMAX(m, x) m = max(m, x);
#define CMIN(m, x) m = min(m, x);
#define itn int
typedef long ... | [["-", 3, 4, 0, 16, 12, 23, 0, 16, 31, 13], ["+", 3, 4, 0, 16, 12, 23, 0, 16, 31, 13]] | 1 | 192 |
#include <iostream>
using namespace std;
int main() {
int a[200], i, m, n, num = 0, sum = 0;
cin >> n >> m;
for (i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
for (i = 0; i < n; i++) {
if (a[i] * 4 * m > sum)
num++;
}
if (num >= m)
cout << "Yes";
else
cout << "No";
return ... | #include <iostream>
using namespace std;
int main() {
int a[200], i, m, n, num = 0, sum = 0;
cin >> n >> m;
for (i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
for (i = 0; i < n; i++) {
if (a[i] * 4 * m >= sum)
num++;
}
if (num >= m)
cout << "Yes";
else
cout << "No";
return... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 120 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
rep(i, n) cin >> a.at(i);
int sum = accumulate(a.begin(), a.end(), 0);
sort(a.rbegin(), a.rend());
int b = 4 * m;
bool flg = ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
rep(i, n) cin >> a.at(i);
int sum = accumulate(a.begin(), a.end(), 0);
sort(a.rbegin(), a.rend());
int b = 4 * m;
bool flg = ... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 48], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 85], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 160 |
import java.util.*;
public class Main {
public static void main(String[] args) {
int count = 0;
boolean sw = false;
int max = Integer.MIN_VALUE;
int min = Integer.MAX_VALUE;
double dMax = Double.MIN_VALUE;
double dMin = Double.MAX_VALUE;
//
Scanner sc = new Scanner(System.in);
int... | import java.util.*;
public class Main {
public static void main(String[] args) {
int count = 0;
boolean sw = false;
int max = Integer.MIN_VALUE;
int min = Integer.MAX_VALUE;
double dMax = Double.MIN_VALUE;
double dMin = Double.MAX_VALUE;
//
Scanner sc = new Scanner(System.in);
int... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 511, 0, 512]] | 3 | 207 |
import numpy as np
n,m,*a = map(int,open(0).read().split())
if np.count_nonzero(np.array(a)>sum(a)/4/m)>=m:
print("Yes")
else:
print("No") | import numpy as np
n,m,*a = map(int,open(0).read().split())
if np.count_nonzero(np.array(a)>=sum(a)/4/m)>=m:
print("Yes")
else:
print("No") | [["-", 15, 666, 0, 652, 3, 4, 0, 666, 667, 47], ["+", 15, 666, 0, 652, 3, 4, 0, 666, 667, 20]] | 5 | 66 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M, sum = 0;
cin >> N >> M;
vector<int> A(N);
for (int i = 0; i < N; ++i) {
cin >> A.at(i);
sum += A.at(i);
}
int t = sum / (4 * M);
sort(A.begin(), A.end());
reverse(A.begin(), A.end());
bool b = 1;
for (int i = 0; i < M; ++... | #include <bits/stdc++.h>
using namespace std;
int main() {
double N, M, sum = 0;
cin >> N >> M;
vector<double> A(N);
for (int i = 0; i < N; ++i) {
cin >> A.at(i);
sum += A.at(i);
}
double t = sum / (4 * M);
sort(A.begin(), A.end());
reverse(A.begin(), A.end());
bool b = 1;
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, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40]] | 1 | 174 |
#include <bits/stdc++.h>
using namespace std;
#define IO ios_base::sync_with_stdio(false)
double a[3000];
int main() {
IO;
double j, n, m, k = 0, l;
int i;
cin >> n >> m;
l = m;
for (i = 1; i <= n; i++) {
cin >> a[i];
k += a[i];
}
m = k / (4 * m);
k = 0;
for (i = 1; i <= n; i++) {
if (a[... | #include <bits/stdc++.h>
using namespace std;
#define IO ios_base::sync_with_stdio(false)
double a[3000];
int main() {
IO;
double j, n, m, k = 0, l;
int i;
cin >> n >> m;
l = m;
for (i = 1; i <= n; i++) {
cin >> a[i];
k += a[i];
}
m = k / (4 * m);
k = 0;
for (i = 1; i <= n; i++) {
if (a[... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 145 |
import java.util.Arrays;
import java.util.Collections;
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();
Integer a[] = new Integer[n];
int total = 0;
for (int i = 0; i < n... | import java.util.Arrays;
import java.util.Collections;
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();
Integer a[] = new Integer[n];
int total = 0;
for (int i = 0; i < n... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 511, 0, 512], ["+", 0, 503, 49, 200, 51, 16, 31, 74, 0, 24], ["+", 49, 200, 51, 16, 31, 74, 39, 511, 0, 512], ["+", 0, 503, 49, 200, 51, 16, 31, 74, 0, 25]] | 3 | 210 |
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#define in(s) cin... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#define in(s) cin... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 190 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define inf 1001001001
#define mod 1000000007
#define pi 3.141592653589793
ll gcd(ll a, ll b) {
if (b > a)
swap(a, b);
if (b == 0)
return a;
return gcd(b, a % b);
}
ll lcm(ll a, ll b) {... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define inf 1001001001
#define mod 1000000007
#define pi 3.141592653589793
ll gcd(ll a, ll b) {
if (b > a)
swap(a, b);
if (b == 0)
return a;
return gcd(b, a % b);
}
ll lcm(ll a, ll b) {... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 369 |
n,m = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
ans = 0
a_all = sum(a)
for x in a:
if x >= a_all // (4*m):
ans += 1
if ans >= m:
print("Yes")
else:
print("No") | n,m = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
ans = 0
a_all = sum(a)
for x in a:
if x >= a_all / (4*m):
ans += 1
if ans >= 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 | 85 |
#include <bits/stdc++.h>
using namespace std;
int main() {
cin.sync_with_stdio(false);
cin.tie(nullptr);
int n, m;
cin >> n >> m;
int A[n], ans = 0;
int Total = 0;
for (int i = 0; i < n; i++) {
cin >> A[i];
Total += A[i];
}
int MinPoints = Total / (4 * m);
for (int i = 0; i < n; i++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.sync_with_stdio(false);
cin.tie(nullptr);
int n, m;
cin >> n >> m;
int A[n], ans = 0;
int Total = 0;
for (int i = 0; i < n; i++) {
cin >> A[i];
Total += A[i];
}
double MinPoints = Total / (4 * (double)m);
for (int i = 0; i < ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 51, 16, 12, 23, 0, 16, 12, 74, 0, 24], ["+", 12, 23, 0, 16, 12, 74, 39, 77, 39, 40], ["+", 51, 16, 12, 23, 0, 16, 12, 74, 0, 25]] | 1 | 145 |
N, M = [int(x) for x in input().strip().split(" ")]
A = [int(x) for x in input().strip().split(" ")]
border = sum(A) // (4 * M)
bordered = [a for a in A if a >= border]
print("Yes" if len(bordered) >= M else "No") | N, M = [int(x) for x in input().strip().split(" ")]
A = [int(x) for x in input().strip().split(" ")]
border = sum(A) / (4 * M)
bordered = [a for a in A if not (a < border)]
print("Yes" if len(bordered) >= M else "No") | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85], ["+", 0, 662, 12, 658, 0, 678, 0, 681, 0, 372], ["+", 12, 658, 0, 678, 0, 681, 28, 23, 0, 24], ["-", 0, 662, 12, 658, 0, 678, 0, 666, 667, 20], ["+", 0, 678, 0, 681, 28, 23, 0, 666, 667, 18], ["+", 12, 658, 0, 678, 0, 681, 28,... | 5 | 94 |
#include <bits/stdc++.h>
#include <iomanip>
#define ll long long
using namespace std;
int main() {
ll N, M, cnt = 0, sum = 0;
cin >> N >> M;
vector<ll> A(N);
for (ll i = 0; i < N; i++) {
cin >> A.at(i);
sum += A.at(i);
}
for (ll i = 0; i < N; i++) {
if (A.at(i) >= double(sum / (4 * M)))
c... | #include <bits/stdc++.h>
#include <iomanip>
#define ll long long
using namespace std;
int main() {
ll N, M, cnt = 0, sum = 0;
cin >> N >> M;
vector<ll> A(N);
for (ll i = 0; i < N; i++) {
cin >> A.at(i);
sum += A.at(i);
}
for (ll i = 0; i < N; i++) {
if (A.at(i) >= double(sum) / (4 * M))
c... | [["+", 51, 16, 12, 16, 31, 2, 3, 4, 0, 25], ["-", 12, 2, 3, 4, 0, 16, 12, 23, 0, 25]] | 1 | 141 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define MAX 9223372036854775807
#define MOD 1000000007
int main(void) {
int n, m;
cin >> n >> m;
vector<int> a(n);
int a_sum = 0;
rep(i, n) {
cin >> a.at(i)... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define MAX 9223372036854775807
#define MOD 1000000007
int main(void) {
int n, m;
cin >> n >> m;
vector<int> a(n);
int a_sum = 0;
rep(i, n) {
cin >> a.at(i)... | [["+", 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], ["-", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13], ["+", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13]] | 1 | 148 |
package main
import "fmt"
var n, m int
var a []int
func main() {
fmt.Scan(&n, &m)
a = make([]int, n)
for i := range a {
fmt.Scan(&a[i])
}
s := 0
for i := range a {
s += a[i]
}
l := (s + 4*m - 1) / (4 * m)
cnt := 0
for i := range a {
if a[i] > l {
cnt++
}
}
if cnt >= m {
fmt.Println("Yes")
... | package main
import "fmt"
var n, m int
var a []int
func main() {
fmt.Scan(&n, &m)
a = make([]int, n)
for i := range a {
fmt.Scan(&a[i])
}
s := 0
for i := range a {
s += a[i]
}
l := (s + 4*m - 1) / (4 * m)
cnt := 0
for i := range a {
if a[i] >= l {
cnt++
}
}
if cnt >= m {
fmt.Println("Yes")
... | [["-", 0, 7, 8, 196, 0, 57, 15, 16, 17, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 16, 17, 20], ["-", 0, 435, 8, 196, 0, 57, 75, 196, 0, 165], ["+", 0, 435, 8, 196, 0, 57, 75, 196, 0, 165]] | 7 | 158 |
n, m = gets.split.map(&:to_i)
nums = gets.split.map(&:to_i).sort.reverse
sum = nums.reduce(:+)
t = nums[m-1]
puts t > (sum / (4.0*m)) ? 'Yes' : 'No'
| n, m = gets.split.map(&:to_i)
nums = gets.split.map(&:to_i).sort.reverse
sum = nums.reduce(:+)
t = nums[m-1]
puts t >= (sum / (4.0*m)) ? 'Yes' : 'No'
| [["-", 0, 652, 3, 4, 0, 754, 15, 738, 17, 47], ["+", 0, 652, 3, 4, 0, 754, 15, 738, 17, 20]] | 4 | 64 |
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, s, n) for (ll i = s; i < (ll)(n); i++)
typedef long long ll;
typedef vector<vector<ll>> vvl;
typedef vector<ll> vl;
typedef vector<vector<char>> vvc;
typedef vector<char> vc;
typedef p... | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, s, n) for (ll i = s; i < (ll)(n); i++)
typedef long long ll;
typedef vector<vector<ll>> vvl;
typedef vector<ll> vl;
typedef vector<vector<char>> vvc;
typedef vector<char> vc;
typedef p... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 221 |
N, M = map(int, input().split())
A = [int(a) for a in input().split()]
thr = sum(A) // (4 * M)
cnt = 0
for a in A:
if a >= thr:
cnt += 1
if cnt >= M:
print('Yes')
else:
print('No')
| N, M = map(int, input().split())
A = [int(a) for a in input().split()]
thr = (sum(A) - 1) // (4 * M) + 1
cnt = 0
for a in A:
if a >= thr:
cnt += 1
if cnt >= M:
print('Yes')
else:
print('No')
| [["+", 0, 662, 12, 657, 31, 657, 31, 23, 0, 24], ["+", 31, 23, 0, 657, 31, 652, 3, 4, 0, 25], ["+", 12, 657, 31, 657, 31, 23, 0, 657, 17, 33], ["+", 12, 657, 31, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 81 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define IFOR(i, a, b) for (int i = (b - 1); i >= (a); --i)
#define RPT(i, a, b) for (int i = (a); i < ((a) + (b)); ++i)
#define IRPT(i, a, b) for (int i = ((a) + (b)-1); i >= ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define IFOR(i, a, b) for (int i = (b - 1); i >= (a); --i)
#define RPT(i, a, b) for (int i = (a); i < ((a) + (b)); ++i)
#define IRPT(i, a, b) for (int i = ((a) + (b)-1); i >= ... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 47], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["-", 12, 23, 0, 16, 12, 23, 0, 16, 31, 22], ["-", 12, 23, 0, 16, 12, 23, 0, 16, 17, 33]] | 1 | 202 |
n, m = [int(elem) for elem in input().split()]
a_lst = [int(elem) for elem in input().split()]
bd = sum(a_lst) / (4 * m)
cnt = 0
for a in a_lst:
if bd < a:
cnt += 1
if cnt >= m:
print("Yes")
else:
print("No") | n, m = [int(elem) for elem in input().split()]
a_lst = [int(elem) for elem in input().split()]
bd = sum(a_lst) / (4 * m)
cnt = 0
for a in a_lst:
if bd <= a:
cnt += 1
if cnt >= m:
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 | 85 |
N,M = map(int,input().split())
*A, = map(int,input().split())
total = sum(A)
border = total/(4*M)
X=[1 for i in range(N) if A[i]>border]
ans = 'Yes' if len(X)>=M else 'No'
print(ans)
| N,M = map(int,input().split())
*A, = map(int,input().split())
total = sum(A)
border = total/(4*M)
X=[1 for i in range(N) if A[i]>=border]
ans = 'Yes' if len(X)>=M else 'No'
print(ans) | [["-", 0, 662, 12, 658, 0, 678, 0, 666, 667, 47], ["+", 0, 662, 12, 658, 0, 678, 0, 666, 667, 20]] | 5 | 86 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, m;
double s = 0;
int a[105];
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> a[i];
s += a[i];
}
s = s / (4 * m);
int cou = 0;
for (int i = 0; i < n; i++) {
if (a[i] > s)
cou++;
}
if (cou ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, m;
double s = 0;
int a[105];
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> a[i];
s += a[i];
}
s = s / (4 * m);
int cou = 0;
for (int i = 0; i < n; i++) {
if (a[i] >= s)
cou++;
}
if (cou... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 134 |
n,m = map(int,input().split())
a=map(int,input().split())
a=sorted(a)
if a[-m] > sum(a)/4/m:
print("Yes")
else:
print("No") | n,m = map(int,input().split())
a=map(int,input().split())
a=sorted(a)
if a[-m] >= sum(a)/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 | 66 |
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
n, m = nm()
aa = nl()
mx = sum(aa)/(4*m)
a = sorted(aa)[::-1]
for i in range(m):
if a[i] <= mx:
print('No')
exit()
print('Yes')
| ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
n, m = nm()
aa = nl()
mx = sum(aa)/(4*m)
a = sorted(aa)[::-1]
for i in range(m):
if a[i] < mx:
print('No')
exit()
print('Yes')
| [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18]] | 5 | 112 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < n; i++)
using namespace std;
const ll INF = ll(1e18) + 1;
const double PI = 3.14159265358979323846;
int ma... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < n; i++)
using namespace std;
const ll INF = ll(1e18) + 1;
const double PI = 3.14159265358979323846;
int ma... | [["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 13], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 48]] | 1 | 156 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, x, n) for (int i = x; i < (int)n; i++)
#define rep(i, n) REP(i, 0, n)
#define sp(p) cout << setprecision(16) << fixed << p << endl;
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define SORT(a) sort(all(a))
#define RSORT(a) sort(rall(... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, x, n) for (int i = x; i < (int)n; i++)
#define rep(i, n) REP(i, 0, n)
#define sp(p) cout << setprecision(16) << fixed << p << endl;
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define SORT(a) sort(all(a))
#define RSORT(a) sort(rall(... | [["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 48], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 12, 13]] | 1 | 587 |
n,m = list(map(int, input().split()))
a = list(map(int, input().split()))
b = 0
s = sum(a)
d = s*(1/(4*m))
for i in a:
if i>d:
b += 1
if b>=m:
print('Yes')
else:
print('No')
| n,m = list(map(int, input().split()))
a = list(map(int, input().split()))
b = 0
s = sum(a)
d = s*(1/(4*m))
for i in a:
if i>=d:
b += 1
if b>=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 | 90 |
n,m = map(int,input().split())
A = list(map(int,input().split()))
x = 0
for i in range(n):
if A[i] > sum(A)/(4*m):
x += 1
print("YNeos"[m > x::2]) | n,m = map(int,input().split())
A = list(map(int,input().split()))
x = 0
for i in range(n):
if A[i] >= sum(A)/(4*m):
x += 1
print("YNeos"[m > x::2]) | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 78 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const long long MOD = 1000000007;
long long modpow(long long a, long long n, long long m) {
long long ans = 1;
while (n) {
if (n & 1) {
ans = (ans * a) % m;
}
a = (a * a) % m;
n >>= 1;
}
return ans;
}
long long combi(lon... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const long long MOD = 1000000007;
long long modpow(long long a, long long n, long long m) {
long long ans = 1;
while (n) {
if (n & 1) {
ans = (ans * a) % m;
}
a = (a * a) % m;
n >>= 1;
}
return ans;
}
long long combi(lon... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 964 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a[n];
int s = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
s += a[i];
}
int valid = s / (4 * m);
int k = 0;
for (int i = 0; i < n; i++) {
if (a[i] >= valid)
k++;
}
if (k >= m)
cout << "Ye... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a[n];
int s = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
s += a[i];
}
float valid = (float)s / (4 * m);
int k = 0;
for (int i = 0; i < n; i++) {
if (a[i] >= valid)
k++;
}
if (k >= m)
co... | [["-", 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 | 127 |
#include <bits/stdc++.h>
#define pll pair<long long, long long>
#define pb push_back
#define ll long long
#define ff first
#define ss second
#define vll vector<ll>
#define NFS \
ios_base::sync_with_stdio(0); ... |
#include <bits/stdc++.h>
#define pll pair<long long, long long>
#define pb push_back
#define ll long long
#define ff first
#define ss second
#define vll vector<ll>
#define NFS \
ios_base::sync_with_stdio(0); ... | [["+", 51, 16, 12, 16, 12, 74, 39, 77, 39, 40], ["+", 15, 339, 51, 16, 12, 16, 12, 74, 0, 25], ["+", 51, 16, 12, 16, 12, 74, 51, 23, 0, 24]] | 1 | 177 |
from sys import stdin
input = stdin.readline
n, k = map(int, input().split())
a = [int(x) for x in input().split()]
vote = sum(a) / 4 / m
a.sort()
a.reverse()
print("Yes" if a[m - 1] >= vote else "No") | from sys import stdin
input = stdin.readline
n, m = map(int, input().split())
a = [int(x) for x in input().split()]
vote = sum(a) / 4 / m
a.sort()
a.reverse()
print("Yes" if a[m - 1] >= vote else "No") | [["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22], ["+", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22]] | 5 | 82 |
n,m=(int(i) for i in input().split())
l=[int(i) for i in input().split()]
c=0
s=sum(l)
for i in l:
if(i>=(s//(4*m))):
c+=1
if(c<m):
print("No")
else:
print("Yes") | n,m=(int(i) for i in input().split())
l=[int(i) for i in input().split()]
c=0
s=sum(l)
for i in l:
if(i>=(s/(4*m))):
c+=1
if(c<m):
print("No")
else:
print("Yes") | [["-", 15, 23, 0, 666, 0, 23, 0, 657, 17, 676], ["+", 15, 23, 0, 666, 0, 23, 0, 657, 17, 85]] | 5 | 91 |
#!python3.4.3
N, M = map(int, input().split(' '))
A = list(map(int, input().split(' ')))
total = sum(A)
count = 0
for a in A:
if a > total/(4*M):
count+=1
if count >= M:
print("Yes")
else:
print("No") | #!python3.4.3
N, M = map(int, input().split(' '))
A = list(map(int, input().split(' ')))
total = sum(A)
count = 0
for a in A:
if not a < total/(4*M):
count+=1
if count >= M:
print("Yes")
else:
print("No") | [["+", 0, 7, 8, 196, 0, 57, 15, 681, 0, 372], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 8, 196, 0, 57, 15, 681, 28, 666, 667, 18]] | 5 | 87 |
#include <bits/stdc++.h>
#define rep(i, a, b) for (i = a; i < b; i++)
#define rep2(i, a, b) for (i = a; i >= b; i--)
#define mod 1000000007
#define mod2 998244353
#define FIO \
ios_base::sync_with_stdio(false); ... | #include <bits/stdc++.h>
#define rep(i, a, b) for (i = a; i < b; i++)
#define rep2(i, a, b) for (i = a; i >= b; i--)
#define mod 1000000007
#define mod2 998244353
#define FIO \
ios_base::sync_with_stdio(false); ... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 85], ["-", 15, 339, 51, 16, 31, 16, 12, 23, 0, 24], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["-", 15, 339, 51, 16, 31, 16, 12, 23, 0, 25], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 48]] | 1 | 444 |
#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
// using namespace __gnu_pbds;
typedef long long int ll;
// typedef tree<pair<ll,ll>, null_type, less<pair<ll,ll>>, rb_tree_tag,
// tree_order_statistics_node_update> ordered_set;
const ll... | #include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
// using namespace __gnu_pbds;
typedef long long int ll;
// typedef tree<pair<ll,ll>, null_type, less<pair<ll,ll>>, rb_tree_tag,
// tree_order_statistics_node_update> ordered_set;
const ll... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 567 |
N,M = map(int, input().split())
A = list(map(int, input().split()))
A_sum = sum(A)
tmp = A_sum/4/M
A.sort()
if A[M-1] <tmp:
print("No")
else:
print("Yes") | N,M = map(int, input().split())
A = list(map(int, input().split()))
A_sum = sum(A)
tmp = A_sum/4/M
A.sort()
if A[N-M] <tmp:
print("No")
else:
print("Yes") | [["-", 0, 57, 15, 666, 0, 206, 206, 657, 31, 22], ["+", 0, 57, 15, 666, 0, 206, 206, 657, 31, 22], ["-", 0, 57, 15, 666, 0, 206, 206, 657, 12, 612], ["+", 0, 57, 15, 666, 0, 206, 206, 657, 12, 22]] | 5 | 75 |
import sys
import numpy as np
sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
de... | import sys
import numpy as np
sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
de... | [["-", 15, 666, 0, 652, 3, 4, 0, 666, 667, 47], ["+", 15, 666, 0, 652, 3, 4, 0, 666, 667, 20]] | 5 | 299 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> ii;
typedef pair<ll, ll> pll;
int main(int argc, char *argv[]) {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll tot = 0;
ll n, m, tmp, c = 0;
cin >> n >> m;
vector<ll> v(n);
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> ii;
typedef pair<ll, ll> pll;
int main(int argc, char *argv[]) {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll tot = 0;
ll n, m, tmp, c = 0;
cin >> n >> m;
vector<ll> v(n);
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 179 |
#include <bits/stdc++.h>
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
int n, m;
std::cin >> n >> m;
std::vector<int> a(n);
for (auto &v : a) {
std::cin >> v;
}
auto sum = std::accumulate(a.begin(), a.end(), 0);
int cnt{0};
... | #include <bits/stdc++.h>
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
int n, m;
std::cin >> n >> m;
std::vector<int> a(n);
for (auto &v : a) {
std::cin >> v;
}
auto sum = std::accumulate(a.begin(), a.end(), 0);
int cnt{0};
... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 7, 15, 16, 31, 16, 17, 19], ["+", 8, 9, 0, 7, 15, 16, 31, 16, 17, 18]] | 1 | 170 |
n,m=map(int,input().split())
v=list(map(int,input().split()))
v2=sorted(v, reverse=True)
vsum=sum(v)
cri=vsum/(4*m)
if v2[m-1]>cri:
print("Yes")
else:
print("No") | n,m=map(int,input().split())
v=list(map(int,input().split()))
v2=sorted(v, reverse=True)
vsum=sum(v)
cri=vsum/(4*m)
if v2[m-1]>=cri:
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 | 82 |
N, M = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
total = sum(a)
tmp = 1 / (4 * M)
cnt = 0
for i in a:
if i > total * tmp:
cnt += 1
else:
break
if cnt >= M:
print('Yes')
else:
print('No') | N, M = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
total = sum(a)
tmp = 1 / (4 * M)
cnt = 0
for i in a:
if i >= total * tmp:
cnt += 1
else:
break
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 | 96 |
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <stdio.h>
#include <vector>
using namespace std;
const int maxn = 110;
int a[maxn];
bool cmp(int a, int b) { return a > b; }
int main() {
int n, m;
scanf("%d%d", &n, &m);
int tot = 0;
for (int i... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <stdio.h>
#include <vector>
using namespace std;
const int maxn = 110;
int a[maxn];
bool cmp(int a, int b) { return a > b; }
int main() {
int n, m;
scanf("%d%d", &n, &m);
int tot = 0;
for (int i... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 195 |
#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>;
// int choose2(ll x){
// return x*(x-1)/2;}
const int INF = 1001001001;
int main() {
int N, M, ans, tmp;
cin >> N >> M;
vector<int> A(N);
tmp = 0;
ans = 0;
rep(i, ... | #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>;
// int choose2(ll x){
// return x*(x-1)/2;}
const int INF = 1001001001;
int main() {
int N, M, ans, tmp;
cin >> N >> M;
vector<int> A(N);
tmp = 0;
ans = 0;
rep(i, ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 141 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int N, M;
int sum = 0;
cin >> N >> M;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A[i];
sum += A[i];
}
bool flag = false;
int cnt = 0;
for (int i = 0; i < N; i++) {
if (A[i] < sum / (4 * M))
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int N, M;
int sum = 0;
cin >> N >> M;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A[i];
sum += A[i];
}
bool flag = false;
int cnt = 0;
for (int i = 0; i < N; i++) {
if ((double)A[i] < (double)su... | [["+", 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 | 153 |
#include <bits/stdc++.h>
using ll = long long;
#define FOR(i, k, n) for (ll i = (k); i < (n); i++)
#define FORe(i, k, n) for (ll i = (k); i <= (n); i++)
#define FORr(i, k, n) for (ll i = (k)-1; i > (n); i--)
#define FORre(i, k, n) for (ll i = (k)-1; i >= (n); i--)
#define REP(i, n) FOR(i, 0, n)
#define REPr(i, n) FORre... | #include <bits/stdc++.h>
using ll = long long;
#define FOR(i, k, n) for (ll i = (k); i < (n); i++)
#define FORe(i, k, n) for (ll i = (k); i <= (n); i++)
#define FORr(i, k, n) for (ll i = (k)-1; i > (n); i--)
#define FORre(i, k, n) for (ll i = (k)-1; i >= (n); i--)
#define REP(i, n) FOR(i, 0, n)
#define REPr(i, n) FORre... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 200 |
#include <algorithm>
#include <cmath>
#include <iomanip> //setwで幅指定
#include <ios> //左右揃え
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define MOD 1000000007LL
int main(void) {
int n, m, sum = 0;
cin >> n >> m;
vector<int> a(n);
... | #include <algorithm>
#include <cmath>
#include <iomanip> //setwで幅指定
#include <ios> //左右揃え
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define MOD 1000000007LL
int main(void) {
long double n, m, sum = 0;
cin >> n >> m;
vector<int>... | [["-", 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 | 148 |
n,m=map(int,input().split())
a=list(map(int,input().split()))
a=sorted(a)[::-1]
s=sum(a)
print("Yes" if a[m]>=s/4/m else "No")
| n,m=map(int,input().split())
a=list(map(int,input().split()))
a=sorted(a)[::-1]
s=sum(a)
print("Yes" if a[m-1]>=s/4/m else "No") | [["+", 0, 41, 0, 666, 0, 206, 206, 657, 17, 33], ["+", 0, 41, 0, 666, 0, 206, 206, 657, 12, 612]] | 5 | 72 |
N, M = (int(i) for i in input().split())
A = [int(i) for i in input().split()]
import numpy as np
thrs = sum(A) / (4 * M)
if sum(np.array(A) > thrs) >= M:
print('Yes')
else:
print('No')
| N, M = (int(i) for i in input().split())
A = [int(i) for i in input().split()]
import numpy as np
thrs = sum(A) / (4 * M)
if sum(np.array(A) >= thrs) >= M:
print('Yes')
else:
print('No') | [["-", 15, 666, 0, 652, 3, 4, 0, 666, 667, 47], ["+", 15, 666, 0, 652, 3, 4, 0, 666, 667, 20]] | 5 | 83 |
// In god we trust
#include <algorithm>
#include <bits/stdc++.h>
#include <chrono>
#include <signal.h>
#include <thread>
#define pb push_back
#define fi first
#define se second
#define Vi vector<int>
#define Vb vector<bool>
#define Pi pair<int, int>
#define MP make_pair
#define MT make_tuple
#define INF 1000000000
#d... | // In god we trust
#include <algorithm>
#include <bits/stdc++.h>
#include <chrono>
#include <signal.h>
#include <thread>
#define pb push_back
#define fi first
#define se second
#define Vi vector<int>
#define Vb vector<bool>
#define Pi pair<int, int>
#define MP make_pair
#define MT make_tuple
#define INF 1000000000
#d... | [["-", 15, 339, 51, 16, 12, 74, 39, 77, 39, 40], ["-", 8, 57, 15, 339, 51, 16, 12, 74, 0, 25], ["-", 15, 339, 51, 16, 12, 74, 51, 23, 0, 24]] | 1 | 207 |
#include <bits/stdc++.h>
#define int long long int
#define db double
#define ull unsigned long long
#define vii vector<int>
#define pii pair<int, int>
#define fi first
#define se second
#define rep(i, a, n) for (int i = a; i < n; i++)
#define endl '\n'
#define mem(a, b) memset(a, b, sizeof a)
#define mkp make_pair
#def... | #include <bits/stdc++.h>
#define int long long int
#define db double
#define ull unsigned long long
#define vii vector<int>
#define pii pair<int, int>
#define fi first
#define se second
#define rep(i, a, n) for (int i = a; i < n; i++)
#define endl '\n'
#define mem(a, b) memset(a, b, sizeof a)
#define mkp make_pair
#def... | [["-", 0, 14, 8, 9, 0, 1, 0, 27, 28, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 27, 17, 68], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 480 |
a,b = [int(x) for x in input().split()]
l = list(map(int,input().split()))
total = sum(l)
l= sorted(l)[::-1];
if(l[b-1]*4*b>total):
print("Yes")
else:
print("No")
| a,b = [int(x) for x in input().split()]
l = list(map(int,input().split()))
total = sum(l)
l= sorted(l)[::-1];
if(l[b-1]*4*b>=total):
print("Yes")
else:
print("No")
| [["-", 0, 656, 0, 57, 15, 23, 0, 666, 667, 47], ["+", 0, 656, 0, 57, 15, 23, 0, 666, 667, 20]] | 5 | 86 |
if __name__ == "__main__":
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
total = sum(a)
for i in range(m):
if a[i] < total // (4*m):
print('No')
exit()
print('Yes')
| if __name__ == "__main__":
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
total = sum(a)
for i in range(m):
if a[i] < total / (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 | 91 |
import numpy as np
from sys import stdin
def get_result(data):
N, M = data[0]
A = np.array(data[1])
total = sum(A)
pop_goods = A[A > total/(4*M)]
if len(pop_goods) >= M:
return 'Yes'
return 'No'
if __name__ == '__main__':
raw_data = [val.rstrip() for val in stdin.readlines()]
... | import numpy as np
from sys import stdin
def get_result(data):
N, M = data[0]
A = np.array(data[1])
total = sum(A)
pop_goods = A[A >= total/(4*M)]
if len(pop_goods) >= M:
return 'Yes'
return 'No'
if __name__ == '__main__':
raw_data = [val.rstrip() for val in stdin.readlines()]
... | [["-", 0, 1, 0, 662, 12, 206, 206, 666, 667, 47], ["+", 0, 1, 0, 662, 12, 206, 206, 666, 667, 20]] | 5 | 127 |
#include <bits/stdc++.h>
using namespace std;
#define fastIO \
std::ios_base::sync_with_stdio(false); \
std::cin.tie(0); \
std::cout.tie(0)
#define rep(... | #include <bits/stdc++.h>
using namespace std;
#define fastIO \
std::ios_base::sync_with_stdio(false); \
std::cin.tie(0); \
std::cout.tie(0)
#define rep(... | [["-", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 8, 9, 0, 57, 64, 1, 0, 27, 28, 22], ["+", 8, 9, 0, 57, 64, 1, 0, 27, 28, 22], ["-", 0, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 316 |
#include <algorithm>
#include <iostream>
using namespace std;
int v[102];
int main() {
int n, m, sum = 0;
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> v[i];
sum += v[i];
}
sort(v, v + n);
if (v[n - m] < sum / (4 * m)) {
cout << "No";
} else {
cout << "Yes";
}
return 0;
}
| #include <algorithm>
#include <iostream>
using namespace std;
int v[102];
int main() {
int n, m;
long long sum = 0;
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> v[i];
sum += v[i];
}
sort(v, v + n);
if (v[n - m] < (double)sum / (4 * m)) {
cout << "No";
} else {
cout << "Yes";
}
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 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 | 111 |
n,m = map(int,input().split())
a = [int(k) for k in input().split()]
cnt = 0
for i in range(n):
if 4*m*a[i] >= 1:
cnt += 1
print("Yes" if cnt >= m else "No") | n,m = map(int,input().split())
a = [int(k) for k in input().split()]
cnt = 0
for i in range(n):
if 4*m*a[i] >= sum(a):
cnt += 1
print("Yes" if cnt >= m else "No") | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 8, 196, 0, 57, 15, 666, 0, 652, 63, 22], ["+", 0, 57, 15, 666, 0, 652, 3, 4, 0, 24], ["+", 0, 57, 15, 666, 0, 652, 3, 4, 0, 22], ["+", 0, 57, 15, 666, 0, 652, 3, 4, 0, 25]] | 5 | 74 |
n,m = map(int, input().split())
a = list(map(int, input().split()))
a = [i for i in a if i >= sum(a)/4*m]
if len(a) < m:
print("No")
else:
print("Yes") | n,m = map(int, input().split())
a = list(map(int, input().split()))
b = [i for i in a if i >= sum(a)/4/m]
if len(b) < m:
print("No")
else:
print("Yes") | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 12, 658, 0, 678, 0, 666, 0, 657, 17, 48], ["+", 12, 658, 0, 678, 0, 666, 0, 657, 17, 85], ["-", 0, 57, 15, 666, 0, 652, 3, 4, 0, 22], ["+", 0, 57, 15, 666, 0, 652, 3, 4, 0, 22]] | 5 | 75 |
/*
@author
_ _ _ _ _
\\ // /\ | | \ | | /\ \\ //
\\ // /__\ | |_/ |_____| /__\ \\ //
\\// / \ | | \ | | / \ \\//
\/ / \ | |_/ | | / \ \/
@ Indian Institute of Technology Bhilai
With practice comes perfection,
with knowledge c... | /*
@author
_ _ _ _ _
\\ // /\ | | \ | | /\ \\ //
\\ // /__\ | |_/ |_____| /__\ \\ //
\\// / \ | | \ | | / \ \\//
\/ / \ | |_/ | | / \ \/
@ Indian Institute of Technology Bhilai
With practice comes perfection,
with knowledge c... | [["-", 0, 52, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 2, 63, 22]] | 1 | 500 |
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <tu... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <tu... | [["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 108]] | 1 | 174 |
#include <bits/stdc++.h>
#define int long long
using namespace std;
int n, m, num, sumv, ans = 0;
int a[100005];
signed main() {
cin >> n >> m;
for (int i = 1; i <= n; i++) {
cin >> a[i];
sumv += a[i];
}
num = sumv * (1.00 / (4.00 * m));
for (int i = 1; i <= n; i++) {
if (a[i] >= num)
ans... | #include <bits/stdc++.h>
#define int long long
using namespace std;
double n, m, sumv, ans = 0;
double a[100005];
signed main() {
cin >> n >> m;
for (int i = 1; i <= n; i++) {
cin >> a[i];
sumv += a[i];
}
double num = sumv * (1.00 / (4.00 * m));
for (int i = 1; i <= n; i++) {
if (a[i] >= num)
... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 49, 22], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 138 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
using namespace std;
using i64 = int64_t;
using P = pair<i64, i64>;
i64 mod = ... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
using namespace std;
using i64 = int64_t;
using P = pair<i64, i64>;
i64 mod = ... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 212 |
N,M = map(int, input().split())
A = list(map(int, input().split()))
sum = 0
for i in range(N):
sum = sum + A[i]
judge = 0
for i in range(N):
if A[i] >= sum//(4*M):
judge = judge +1
if judge >= M:
print('Yes')
else:
print('No') | N,M = map(int, input().split())
A = list(map(int, input().split()))
sum = 0
for i in range(N):
sum = sum + A[i]
judge = 0
for i in range(N):
if A[i] >= sum/(4*M):
judge = judge +1
if judge >= 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 | 101 |
#def main(S, b):
if __name__ == '__main__':
n, m = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
cnt = 0
for i in range(n):
if (a[i] > s / 4 / m):
cnt += 1
#print(cnt)
if (cnt >= m):
print("Yes")
else:
print("No")
| #def main(S, b):
if __name__ == '__main__':
n, m = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
cnt = 0
for i in range(n):
if (a[i] >= s / 4 / m):
cnt += 1
#print(cnt)
if (cnt >= m):
print("Yes")
else:
print("No")
| [["-", 8, 196, 0, 57, 15, 23, 0, 666, 667, 47], ["+", 8, 196, 0, 57, 15, 23, 0, 666, 667, 20]] | 5 | 97 |
N, M = map(int, input().split())
A = list(map(int, input().split()))
ans = 'Yes'
A.sort(reverse=True)
for i in range(M):
if A[i] < sum(A)//(4*M):
ans = 'No'
break
print(ans)
| N, M = map(int, input().split())
A = list(map(int, input().split()))
ans = 'Yes'
A.sort(reverse=True)
for i in range(M):
if A[i] < sum(A)/(4*M):
ans = 'No'
break
print(ans)
| [["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 676], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 85]] | 5 | 81 |
#include <bits/stdc++.h>
#ifdef HIRO
#define d(f_, ...) printf((f_), ##__VA_ARGS__)
#else
#define d(f_, ...)
#endif
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<long long, long long> pllll;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vec... | #include <bits/stdc++.h>
#ifdef HIRO
#define d(f_, ...) printf((f_), ##__VA_ARGS__)
#else
#define d(f_, ...)
#endif
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<long long, long long> pllll;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vec... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 49, 50, 51, 16, 31, 16, 31, 74, 0, 24], ["+", 51, 16, 31, 16, 31, 74, 39, 77, 39, 78], ["+", 49, 50, 51, 16, 31, 16, 31, 74, 0, 25]] | 1 | 699 |
package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
func out(x ...interface{}) {
fmt.Println(x...)
}
var sc = bufio.NewScanner(os.Stdin)
func getInt() int {
sc.Scan()
i, e := strconv.Atoi(sc.Text())
if e != nil {
panic(e)
}
return i
}
func getString() string {
sc.Scan()
return sc.Text()
}
// min, m... | package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
func out(x ...interface{}) {
fmt.Println(x...)
}
var sc = bufio.NewScanner(os.Stdin)
func getInt() int {
sc.Scan()
i, e := strconv.Atoi(sc.Text())
if e != nil {
panic(e)
}
return i
}
func getString() string {
sc.Scan()
return sc.Text()
}
// min, m... | [["-", 0, 435, 8, 196, 0, 1, 0, 2, 63, 22], ["-", 8, 196, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 36, 36, 0, 434, 0, 435, 8, 196, 0, 165]] | 7 | 388 |
#include "bits/stdc++.h"
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef vector<PII> VPII;
typedef long long LL;
typedef priority_queue<int> PQ_DESC;
typedef priority_queue<int, vector<int>, greater<int>> PQ_ASC;
typedef priority_queu... | #include "bits/stdc++.h"
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef vector<PII> VPII;
typedef long long LL;
typedef priority_queue<int> PQ_DESC;
typedef priority_queue<int, vector<int>, greater<int>> PQ_ASC;
typedef priority_queu... | [["+", 12, 2, 3, 4, 0, 16, 31, 74, 0, 24], ["+", 3, 4, 0, 16, 31, 74, 39, 77, 39, 40], ["+", 12, 2, 3, 4, 0, 16, 31, 74, 0, 25], ["-", 3, 4, 0, 16, 12, 23, 0, 16, 31, 13], ["+", 3, 4, 0, 16, 12, 23, 0, 16, 31, 13]] | 1 | 441 |
n,m=map(int,input().split())
a=list(map(int,input().split()))
ans=0
al=0
for i in range(n):
al+=a[i]
p=al/(4*m)
for i in range(n):
if p<a[i]:
ans+=1
print("Yes" if m<=ans else "No") | n,m=map(int,input().split())
a=list(map(int,input().split()))
ans=0
al=0
for i in range(n):
al+=a[i]
p=al/(4*m)
for i in range(n):
if p<=a[i]:
ans+=1
print("Yes" if m<=ans else "No") | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]] | 5 | 95 |
N, M = map(int, input().split())
A = sorted(list(map(int, input().split())), reverse=True)
th = sum(A) / 4 * M
flag = True
for i in range(M):
if A[i] < th:
flag = False
break
if flag:
print("Yes")
else:
print("No") | N, M = map(int, input().split())
A = sorted(list(map(int, input().split())), reverse=True)
th = sum(A) / (4 * M)
flag = True
for i in range(M):
if A[i] < th:
flag = False
break
if flag:
print("Yes")
else:
print("No") | [["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 25]] | 5 | 90 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
int bo = 0;
for (int i = 0; i < n; ++i) {
cin >> a.at(i);
bo += a.at(i);
}
bo = (bo + 4 * m) / (4 * m);
int cnt = 0;
for (int i = 0; i < n; ++i) {
if (bo <= a.at(i))
cnt++;
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
int bo = 0;
for (int i = 0; i < n; ++i) {
cin >> a.at(i);
bo += a.at(i);
}
bo = (bo + 4 * m - 1) / (4 * m);
int cnt = 0;
for (int i = 0; i < n; ++i) {
if (bo <= a.at(i))
cnt++;
}... | [["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13]] | 1 | 145 |
#include <algorithm>
#include <cmath>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <queue>
#include <stack>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int arr[n];
for (int i = 0; i < n; i++)
cin >> arr[i];
int coun... | #include <algorithm>
#include <cmath>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <queue>
#include <stack>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int arr[n];
for (int i = 0; i < n; i++)
cin >> arr[i];
int coun... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 162 |
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
a.reverse()
if a[m-1]>sum(a)/4/m:
print('Yes')
else:
print('No')
| n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
a.reverse()
if a[m-1]>=sum(a)/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 | 74 |
def solve():
N, M = map(int, input().split())
A = list(map(int, input().split()))
s = sum(A)
b = s // (4 * M)
c = 0
for a in A:
if a >= b:
c+=1
return 'Yes' if c >= M else 'No'
print(solve()) | def solve():
N, M = map(int, input().split())
A = list(map(int, input().split()))
s = sum(A)
b = s / (4 * M)
c = 0
for a in A:
if a >= b:
c+=1
return 'Yes' if c >= M else 'No'
print(solve()) | [["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 85]] | 5 | 87 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mii make_pair<int, int>
#define mll make_pair<ll, ll>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define rep(i, a, b) for (int i = a; i < b; ++i)
#define vi vector<int>
#define vvi vector<vector<int>>
#define vl vector<ll>
#define vvl ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mii make_pair<int, int>
#define mll make_pair<ll, ll>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define rep(i, a, b) for (int i = a; i < b; ++i)
#define vi vector<int>
#define vvi vector<vector<int>>
#define vl vector<ll>
#define vvl ... | [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 197 |
package main
import (
"bufio"
"fmt"
"os"
"sort"
"strconv"
)
var sc = bufio.NewScanner(os.Stdin)
func Scanner() string {
sc.Scan()
return sc.Text()
}
func main() {
buf := make([]byte, 0)
sc.Buffer(buf, 1000000007)
sc.Split(bufio.ScanWords)
n, _ := strconv.Atoi(Scanner())
m, _ := strconv.Atoi(Scanner())
... | package main
import (
"bufio"
"fmt"
"os"
"sort"
"strconv"
)
var sc = bufio.NewScanner(os.Stdin)
func Scanner() string {
sc.Scan()
return sc.Text()
}
func main() {
buf := make([]byte, 0)
sc.Buffer(buf, 1000000007)
sc.Split(bufio.ScanWords)
n, _ := strconv.Atoi(Scanner())
m, _ := strconv.Atoi(Scanner())
... | [["-", 0, 435, 8, 196, 0, 436, 31, 432, 0, 22], ["-", 0, 434, 0, 435, 8, 196, 0, 436, 17, 32], ["+", 0, 435, 8, 196, 0, 431, 31, 432, 0, 22], ["+", 0, 434, 0, 435, 8, 196, 0, 431, 0, 466], ["-", 0, 57, 64, 196, 0, 436, 31, 432, 0, 22], ["+", 0, 57, 64, 196, 0, 436, 31, 432, 0, 22], ["-", 0, 7, 8, 196, 0, 57, 15, 16, 12... | 7 | 275 |
hoge = input().split()
N = int(hoge[0])
M = int(hoge[1])
A_list = list(map(int,input().split()))
sugoi = 4 * M
_sum = sum(A_list)
ok = 0
for i in range(len(A_list)):
if A_list[i] > _sum / sugoi:
ok += 1
if ok >= M:
print("Yes")
else:
print("No") | hoge = input().split()
N = int(hoge[0])
M = int(hoge[1])
A_list = list(map(int,input().split()))
sugoi = 4 * M
_sum = sum(A_list)
ok = 0
for i in range(len(A_list)):
if A_list[i] >= _sum / sugoi:
ok += 1
if ok >= 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;
typedef long long ll;
//#include<ext/pb_ds/assoc_container.hpp>
//#nclude<ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// typedef
// tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>pb_ds;
#define pii pair<int, ll>
#define pi pair<in... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#include<ext/pb_ds/assoc_container.hpp>
//#nclude<ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// typedef
// tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>pb_ds;
#define pii pair<int, ll>
#define pi pair<in... | [["+", 0, 11, 12, 16, 31, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 11, 12, 16, 31, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 193 |
import sys
N, M = map(int, sys.stdin.readline().split())
li = list(map(int, sys.stdin.readline().split()))
li.sort(reverse=False)
if li[M-1] < sum(li)/(4*M):
print('No')
else:
print('Yes')
| import sys
N, M = map(int, sys.stdin.readline().split())
li = list(map(int, sys.stdin.readline().split()))
li.sort(reverse=True)
if li[M-1] < sum(li)/(4*M):
print('No')
else:
print('Yes')
| [["-", 0, 1, 0, 652, 3, 4, 0, 653, 51, 147], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 51, 146]] | 5 | 84 |
#include <bits/stdc++.h>
#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 rrep(i, n) for (int i = (n - 1); i >= 0; i--)
#define all(v) v.begin(), v.end()... | #include <bits/stdc++.h>
#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 rrep(i, n) for (int i = (n - 1); i >= 0; i--)
#define all(v) v.begin(), v.end()... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 418 |
N, M = map(int, input().split())
A = list(map(int, input().split()))
b = sum(A)//(4*M)
c = len(list(filter(lambda x: x>b, A)))
print("Yes" if c >= M else "No")
| N, M = map(int, input().split())
A = list(map(int, input().split()))
b = sum(A)/(4*M)
c = len(list(filter(lambda x: x>=b, A)))
print("Yes" if c >= M else "No")
| [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85], ["-", 0, 652, 3, 4, 0, 670, 8, 666, 667, 47], ["+", 0, 652, 3, 4, 0, 670, 8, 666, 667, 20]] | 5 | 78 |
def resolve():
'''
code here
'''
N, M = [int(item) for item in input().split()]
A = [int(item) for item in input().split()]
cnt = 0
A_sum = sum(A)
for a in A:
if 1 / (4 * M) * A_sum < a:
cnt += 1
if cnt >= M:
print('Yes')
else:
print('No'... | def resolve():
'''
code here
'''
N, M = [int(item) for item in input().split()]
A = [int(item) for item in input().split()]
cnt = 0
A_sum = sum(A)
for a in A:
if 1 / (4 * M) * A_sum <= a:
cnt += 1
if cnt >= M:
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 | 105 |
//“Make it work, make it right, make it fast.” – Kent Beck
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double dd;
const int siz = 1e6 + 5;
const int MOD = 1e9 + 7;
#define endl '\n'
#define deb(x) cout << #x << " = " << x << endl;
void solve() {
int n, m;
cin >> n >> m;
int a[n], ... | //“Make it work, make it right, make it fast.” – Kent Beck
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double dd;
const int siz = 1e6 + 5;
const int MOD = 1e9 + 7;
#define endl '\n'
#define deb(x) cout << #x << " = " << x << endl;
void solve() {
int n, m;
cin >> n >> m;
double a[n... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 338, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 338, 39, 40], ["-", 12, 23, 0, 16, 12, 23, 0, 16, 31, 13], ["+", 12, 23, 0, 16, 12, 23, 0, 16, 31, 13]] | 1 | 188 |
n, m = map(int, input().split())
a = list(map(int, input().split()))
mean = sum(a) / n / 4
cnt = 0
for i in range(n):
if a[i] >= mean:
cnt += 1
print("Yes" if cnt >= m else "No") |
n, m = map(int, input().split())
a = list(map(int, input().split()))
mean = sum(a) / m / 4
cnt = 0
for i in range(n):
if a[i] >= mean:
cnt += 1
print("Yes" if cnt >= m else "No") | [["-", 0, 1, 0, 662, 12, 657, 31, 657, 12, 22], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 12, 22]] | 5 | 79 |
n,m=map(int,input().split())
l=list(map(int,input().split()))
cnt=0
for i in range(n):
if l[i] > sum(l)*(1/(4*m)):
cnt += 1
else:
continue
if cnt >= m:
print("Yes")
else:
print("No") | n,m=map(int,input().split())
l=list(map(int,input().split()))
cnt=0
for i in range(n):
if l[i] >= sum(l)*(1/(4*m)):
cnt += 1
else:
continue
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 | 90 |
# -*- coding: utf-8 -*-
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))
A = sorted(A, reverse=True)
if (A[M - 1] > sum(A) / (4 * M)):
print('Yes')
else:
print('No') | # -*- coding: utf-8 -*-
N, M = list(map(int, input().split()))
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, 23, 0, 666, 667, 47], ["+", 0, 656, 0, 57, 15, 23, 0, 666, 667, 20]] | 5 | 82 |
import java.io.BufferedInputStream;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int n = sc.nextInt();
int m = sc.nextInt();
int total = 0;
PriorityQueue<Integer> st = new PriorityQueue<>();
for ... | import java.io.BufferedInputStream;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
int n = sc.nextInt();
int m = sc.nextInt();
int total = 0;
PriorityQueue<Integer> st = new PriorityQueue<>();
for ... | [["+", 15, 15, 0, 16, 12, 16, 12, 23, 0, 24], ["+", 15, 15, 0, 16, 12, 16, 12, 23, 0, 25]] | 3 | 196 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <tuple>
#include <unordered_map>
#incl... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <tuple>
#include <unordered_map>
#incl... | [["-", 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 | 453 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#i... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#i... | [["+", 12, 2, 3, 4, 0, 16, 31, 74, 0, 24], ["+", 3, 4, 0, 16, 31, 74, 39, 77, 39, 40], ["+", 12, 2, 3, 4, 0, 16, 31, 74, 0, 25], ["+", 12, 2, 3, 4, 0, 16, 12, 74, 0, 24], ["+", 3, 4, 0, 16, 12, 74, 39, 77, 39, 40], ["+", 12, 2, 3, 4, 0, 16, 12, 74, 0, 25]] | 1 | 1,150 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
const int MAXN = 1e2 + 10;
int a[MAXN], n, m;
bool cmp(int &a, int &b) { return a > b; }
int main() {
scanf("%d %d", &n, &m);
int sum = 0;
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]), sum += a[i];
sort(a + 1... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
const int MAXN = 1e2 + 10;
int a[MAXN], n, m;
bool cmp(int &a, int &b) { return a > b; }
int main() {
scanf("%d %d", &n, &m);
int sum = 0;
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]), sum += a[i];
sort(a + 1... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 187 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n, m, x;
cin >> n >> m;
ll c = 0;
vector<ll> ve = {};
ll su = 0;
for (ll i = 0; i < n; i++) {
cin >> x;
su += x;
ve.push_back(x);
}
for (auto u : ve) {
if (su < u * 4 * m)
c++;
}
if (c >= m)
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n, m, x;
cin >> n >> m;
ll c = 0;
vector<ll> ve = {};
ll su = 0;
for (ll i = 0; i < n; i++) {
cin >> x;
su += x;
ve.push_back(x);
}
for (auto u : ve) {
if (su <= u * 4 * m)
c++;
}
if (c >= m)
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 123 |
n,m=map(int,input().split())
a=sorted(list(map(int,input().split())),reverse=True)
print(a)
total=sum(a)
import math
border=math.ceil(total/(4*m))
cnt=0
for i in a:
if i>=border:
cnt+=1
print('Yes' if cnt>=m else 'No') | n,m=map(int,input().split())
a=sorted(list(map(int,input().split())),reverse=True)
total=sum(a)
import math
border=math.ceil(total/(4*m))
cnt=0
for i in a:
if i>=border:
cnt+=1
print('Yes' if cnt>=m else '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 | 96 |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int m = scanner.nextInt();
int sum = 0;
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = scan... |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int m = scanner.nextInt();
int sum = 0;
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = scan... | [["-", 500, 492, 3, 4, 0, 218, 8, 16, 17, 47], ["-", 3, 4, 0, 218, 8, 16, 12, 16, 31, 22], ["-", 3, 4, 0, 218, 8, 16, 12, 16, 17, 85], ["+", 3, 4, 0, 218, 8, 16, 31, 16, 17, 48], ["+", 500, 492, 3, 4, 0, 218, 8, 16, 17, 20], ["+", 500, 492, 3, 4, 0, 218, 8, 16, 12, 22]] | 3 | 171 |
from sys import stdin
from sys import setrecursionlimit
from math import ceil
from collections import Counter, deque, defaultdict
setrecursionlimit(1000000)
# INF = float('inf')
INF = int(1e10)
def input():
return stdin.readline()[:-1]
def main():
from builtins import int, map
N, M = map(int, input().spl... | from sys import stdin
from sys import setrecursionlimit
from math import ceil
from collections import Counter, deque, defaultdict
setrecursionlimit(1000000)
# INF = float('inf')
INF = int(1e10)
def input():
return stdin.readline()[:-1]
def main():
from builtins import int, map
N, M = map(int, input().spl... | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 155 |
n,m = input().split(' ')
l = [int(x) for x in input().split(' ')]
l.sort()
if sum(l) >= l[-int(m)]*4*int(m):
print("No")
else:
print("Yes")
| n,m = input().split(' ')
l = [int(x) for x in input().split(' ')]
l.sort()
if sum(l) > l[-int(m)]*4*int(m):
print("No")
else:
print("Yes")
| [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47]] | 5 | 76 |
package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
var sc, wr = bufio.NewScanner(os.Stdin), bufio.NewWriter(os.Stdout)
func scanString() string { sc.Scan(); return sc.Text() }
func scanRunes() []rune { return []rune(scanString()) }
func scanInt() int { a, _ := strconv.Atoi(scanString()); return a ... | package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
var sc, wr = bufio.NewScanner(os.Stdin), bufio.NewWriter(os.Stdout)
func scanString() string { sc.Scan(); return sc.Text() }
func scanRunes() []rune { return []rune(scanString()) }
func scanInt() int { a, _ := strconv.Atoi(scanString()); return a ... | [["+", 12, 432, 0, 16, 31, 2, 3, 4, 0, 25], ["+", 0, 431, 12, 432, 0, 16, 12, 2, 63, 22], ["-", 0, 2, 3, 4, 0, 16, 12, 23, 0, 25]] | 7 | 469 |
#include <bits/stdc++.h>
#define rep(i, l, r) for (register int i = l; i < r; i++)
#define hrp(i, l, r) for (register int i = l; i <= r; i++)
#define rev(i, r, l) for (register int i = r; i >= l; i--)
#define tms(x) \
___ = x; ... | #include <bits/stdc++.h>
#define rep(i, l, r) for (register int i = l; i < r; i++)
#define hrp(i, l, r) for (register int i = l; i <= r; i++)
#define rev(i, r, l) for (register int i = r; i >= l; i--)
#define tms(x) \
___ = x; ... | [["-", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13]] | 1 | 444 |
n, m = map(int, input().split())
a = list(map(int , input().split()))
s = sum(a)
ans = 0
for ai in a:
if ai*4*m > s:
ans += 1
if ans >= m:
print("Yes")
else:
print("No") | n, m = map(int, input().split())
a = list(map(int , input().split()))
s = sum(a)
ans = 0
for ai in a:
if ai*4*m >= s:
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 | 78 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.