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>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
typedef char chr;
typedef double dbl;
typedef long long int lld;
#define FastIO \
ios::sync_with_stdio(false); ... | #include <bits/stdc++.h>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
typedef char chr;
typedef double dbl;
typedef long long int lld;
#define FastIO \
ios::sync_with_stdio(false); ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 246 |
n, m = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
a.sort(reversed = True)
k = s/(4*m)
if a[m-1] < k:
print("No")
else:
print("Yes") | n, m = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
a.sort(reverse = True)
k = s/(4*m)
if a[m-1] < k:
print("No")
else:
print("Yes") | [["-", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22]] | 5 | 80 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int arr[n];
long long vote = 0;
for (int i = 0; i < n; i++) {
cin >> arr[i];
vote += arr[i];
}
sort(arr, arr + n);
reverse(arr, arr + n);
double acc = vote / (m * 4);
if (arr[m - 1] >= acc) {
cout << "Ye... | #include <bits/stdc++.h>
using namespace std;
int main() {
long n, m;
cin >> n >> m;
double arr[n];
double vote = 0;
for (int i = 0; i < n; i++) {
cin >> arr[i];
vote += arr[i];
}
sort(arr, arr + n);
reverse(arr, arr + n);
double acc = vote / (m * 4);
if (arr[m - 1] >= acc) {
cout << "Y... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]] | 1 | 137 |
import sys
N, M = map(int, input().split())
A = list(map(int, input().split()))
A = sorted(A,reverse=True)
for i in range(M):
if A[i] < sum(A)*1//(4*M):
# print(A[i])
print('No')
sys.exit()
print('Yes') | import sys
N, M = map(int, input().split())
A = list(map(int, input().split()))
A = sorted(A,reverse=True)
for i in range(M):
if A[i] < sum(A)*1/(4*M):
#print(A[i],sum(A)*1/(4*M))
print('No')
sys.exit()
print('Yes')
#print(sum(A)*1/(4*M)) | [["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 676], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 85]] | 5 | 90 |
import java.io.*;
import java.math.BigDecimal;
import java.util.*;
public class Main {
private static void solve() {
// Implement solution here.
int N = ni();
int M = ni();
int[] A = na(N);
int tv = 0;
for (int i : A)
tv += i;
int cnt = 0;
for (int i = 0; i < N; i++) {
if... | import java.io.*;
import java.math.BigDecimal;
import java.util.*;
public class Main {
private static void solve() {
// Implement solution here.
int N = ni();
int M = ni();
int[] A = na(N);
int tv = 0;
for (int i : A)
tv += i;
int cnt = 0;
for (int i = 0; i < N; i++) {
if... | [["+", 15, 15, 0, 16, 12, 16, 31, 74, 0, 24], ["+", 0, 16, 12, 16, 31, 74, 39, 511, 0, 512], ["+", 15, 15, 0, 16, 12, 16, 31, 74, 0, 25]] | 3 | 549 |
#include <iostream>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int pop = 0;
double a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
double total_votes = 0;
for (int i = 0; i < n; i++)
total_votes += a[i];
double req = total_votes * (0.25) / m;
for (int i = 0; i < n; i++) {
if... | #include <iostream>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int pop = 0;
double a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
double total_votes = 0;
for (int i = 0; i < n; i++)
total_votes += a[i];
double req = total_votes * (0.25) / m;
for (int i = 0; i < n; i++) {
if... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 147 |
#include <bits/stdc++.h>
using namespace std;
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define fl(i... | #include <bits/stdc++.h>
using namespace std;
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define fl(i... | [["-", 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 | 244 |
#include <stdio.h>
int main() {
int i;
int n, m;
int a[100] = {0};
int all = 0;
double k;
int ans = 0;
//読み込む
scanf("%d %d", &n, &m);
for (i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
//総投票数の計算
for (i = 0; i < n; i++) {
all = all + a[i];
}
//基準値の計算
k = all / (4 * m);
//人気商品として選べる... | #include <stdio.h>
int main() {
int i;
int n, m;
int a[100] = {0};
double all = 0;
double k;
int ans = 0;
//読み込む
scanf("%d %d", &n, &m);
for (i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
//総投票数の計算
for (i = 0; i < n; i++) {
all = all + a[i];
}
//基準値の計算
k = all / (4 * m);
//人気商品として... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 0 | 178 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
#define fastInp \
cin.tie(0); ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
#define fastInp \
cin.tie(0); ... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 192 |
#include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
#include <map>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
vector<int> vec(n);
rep(i, n) cin >> vec[i];
int sum = 0;
rep... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
#include <map>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
vector<int> vec(n);
rep(i, n) cin >> vec[i];
int sum = 0;
rep... | [["-", 49, 50, 51, 16, 12, 23, 0, 16, 31, 13], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 31, 13]] | 1 | 156 |
n, m = map(int, input().split())
a = [int(x) for x in input().split()]
a.sort(reverse=True)
if a[m-1]*4*m >= 1:
print("Yes")
else:
print("No") | n, m = map(int, input().split())
a = [int(x) for x in input().split()]
a.sort(reverse=True)
if a[m-1]*4*m >= sum(a):
print("Yes")
else:
print("No") | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612], ["+", 0, 656, 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 | 70 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long
#define vi vector<int>
#define vec(x) vector<x>
#define matrix vector<vector<int>>
#define pii pair<int, int>
#define rep(i, s, e) for (int i = ... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long
#define vi vector<int>
#define vec(x) vector<x>
#define matrix vector<vector<int>>
#define pii pair<int, int>
#define rep(i, s, e) for (int i = ... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 403 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
// typedef
//------------------------------------------
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef vector<PII> VP;
// rep
//------------------------------------------
#define FOR(i, ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
// typedef
//------------------------------------------
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef vector<PII> VP;
// rep
//------------------------------------------
#define FOR(i, ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 199 |
#include <bits/stdc++.h>
using namespace std;
int arr[1010];
int main() {
int n, m, ss = 0, cnt = 0;
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> arr[i];
ss += arr[i];
}
ss /= (4 * m);
for (int i = 0; i < n; i++)
cnt += (arr[i] >= ss);
cout << (cnt >= m ? "Yes" : "No") << endl;
... | #include <bits/stdc++.h>
using namespace std;
int arr[1010];
int main() {
int n, m, cnt = 0;
double ss = 0;
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> arr[i];
ss += arr[i];
}
ss /= (4 * m);
for (int i = 0; i < n; i++)
cnt += (arr[i] >= ss);
cout << (cnt >= m ? "Yes" : "No") ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 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 | 121 |
#include <cstdio>
int main() {
int N, M;
scanf("%d %d", &N, &M);
int s[N];
int sum = 0;
for (int i = 0; i < N; i++) {
scanf("%d", &s[i]);
sum += s[i];
}
int ans = 0;
float ness = float(sum / 4 / M);
for (int i = 0; i < N; i++) {
float x = float(s[i]);
if (x >= ness)
ans += 1;
... | #include <cstdio>
int main() {
int N, M;
scanf("%d %d", &N, &M);
int s[N];
int sum = 0;
for (int i = 0; i < N; i++) {
scanf("%d", &s[i]);
sum += s[i];
}
int ans = 0;
float ness = float(sum) / float(4 * M);
for (int i = 0; i < N; i++) {
float x = float(s[i]);
if (x >= ness)
ans +... | [["+", 49, 50, 51, 16, 31, 2, 3, 4, 0, 25], ["+", 0, 43, 49, 50, 51, 16, 12, 2, 63, 40], ["+", 49, 50, 51, 16, 12, 2, 3, 4, 0, 24], ["-", 49, 50, 51, 2, 3, 4, 0, 16, 17, 85], ["+", 51, 16, 12, 2, 3, 4, 0, 16, 17, 48]] | 1 | 151 |
import math
import sys
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] > 1/4/M*S:
cnt+=1
if cnt>=M:
print("Yes")
else:
print("No")
#print(cnt)
| import math
import sys
N,M=map(int,input().split())
A=list(map(int,input().split()))
S=sum(A)
cnt=0
for i in range(N):
#print(A[i], 1 / 4 / M * S)
if A[i] >= 1/4/M*S:
#print(A[i],1/4/M*S)
cnt+=1
if cnt>=M:
print("Yes")
else:
print("No")
#print(cnt)
| [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 91 |
#include <bits/stdc++.h>
#include <cmath>
using namespace std;
#define pb push_back
#define M 998244353
#define ff first
#define ss second
#define deb(x) cout < #x < " " < x < endl;
#define fo(i, n) for (int i = 0; i < n; i++)
#define Fo(i, k, n) for (int i = k; i <= n; i++)
#define FORR(a, b, c) for (int a = b; a >= c... | #include <bits/stdc++.h>
#include <cmath>
using namespace std;
#define pb push_back
#define M 998244353
#define ff first
#define ss second
#define deb(x) cout < #x < " " < x < endl;
#define fo(i, n) for (int i = 0; i < n; i++)
#define Fo(i, k, n) for (int i = k; i <= n; i++)
#define FORR(a, b, c) for (int a = b; a >= c... | [["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 257 |
import sys
nm=input().split()
a=input()
n=int(nm[0])
m=int(nm[1])
lista=[]
for i in a:
lista.append(int(i))
count=0
suma=sum(lista)
thre=suma/4/m
for i in lista:
if i >= thre:
count+=1
if count >= m:
print('Yes')
sys.exit()
print('No') | import sys
nm=input().split()
a=input().split()
n=int(nm[0])
m=int(nm[1])
lista=[]
for i in a:
lista.append(int(i))
count=0
suma=sum(lista)
thre=suma/4/m
for i in lista:
if i >= thre:
count+=1
if count >= m:
print('Yes')
sys.exit()
print('No') | [["+", 0, 1, 0, 662, 12, 652, 63, 319, 0, 131], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 103 |
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> v;
int n, m, sum = 0;
cin >> n >> m;
for (int i = 0; i < n; i++) {
int a;
cin >> a;
sum += a;
v.push_back(a);
}
double ll = ((1.00 / ((double)m * 4.00)) * sum);
int nt = 0;
for (int i = 0; i < n; i++) {
if (v[i]... | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> v;
int n, m, sum = 0;
cin >> n >> m;
for (int i = 0; i < n; i++) {
int a;
cin >> a;
sum += a;
v.push_back(a);
}
double ll = ((1.00 / ((double)m * 4.00)) * sum);
int nt = 0;
for (int i = 0; i < n; i++) {
if (v[i]... | [["-", 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 | 144 |
/*********************
*@Author: CKang *
*@Language: C++11 *
*********************/
#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
//#define DEBUG
#define RI register int
#define endl "\n"
using namespace std;
typedef long long ll;
// typedef __int128 lll;
// const int N=100000... | /*********************
*@Author: CKang *
*@Language: C++11 *
*********************/
#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
//#define DEBUG
#define RI register int
#define endl "\n"
using namespace std;
typedef long long ll;
// typedef __int128 lll;
// const int N=100000... | [["-", 51, 16, 12, 23, 0, 16, 12, 23, 0, 24], ["-", 12, 23, 0, 16, 12, 23, 0, 16, 17, 48], ["+", 15, 339, 51, 16, 12, 23, 0, 16, 17, 85], ["-", 51, 16, 12, 23, 0, 16, 12, 23, 0, 25], ["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, ... | 1 | 350 |
#include <bits/stdc++.h>
#define F first
#define S second
#define PB push_back
#define MP make_pair
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
int sum = 0;
int a[n];
for (int i ... | #include <bits/stdc++.h>
#define F first
#define S second
#define PB push_back
#define MP make_pair
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
int sum = 0;
int a[n];
for (int i ... | [["-", 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 | 211 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, a, sum = 0, count = 0;
cin >> n >> m;
vector<int> v;
while (cin >> a) {
v.push_back(a);
sum += a;
}
float c = sum / (4 * m);
for (int i = 0; i < v.size(); i++) {
if (v[i] >= c)
count++;
}
if (count >= m)
cout <<... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, a, sum = 0, count = 0;
cin >> n >> m;
vector<int> v;
while (cin >> a) {
v.push_back(a);
sum += a;
}
float c = (float)sum / (4 * m);
for (int i = 0; i < v.size(); i++) {
if (v[i] >= c)
count++;
}
if (count >= m)
... | [["+", 0, 43, 49, 50, 51, 16, 31, 74, 0, 24], ["+", 49, 50, 51, 16, 31, 74, 39, 77, 39, 40], ["+", 0, 43, 49, 50, 51, 16, 31, 74, 0, 25]] | 1 | 125 |
/*
██████╗ ███████╗
██╔══██╗ ██╔════╝
██████╔╝ ███████╗
██╔══██╗ ╚════██║
██║ ██║ ███████║
╚═╝ ╚═╝ ╚══════╝
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define rev(i, n) for (int i = n - 1; i >= 0; i--)
#define haha(j, a, n) for (int j = ... |
/*
██████╗ ███████╗
██╔══██╗ ██╔════╝
██████╔╝ ███████╗
██╔══██╗ ╚════██║
██║ ██║ ███████║
╚═╝ ╚═╝ ╚══════╝
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define rev(i, n) for (int i = n - 1; i >= 0; i--)
#define haha(j, a, n) for (int j = ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 49, 50, 51, 16, 12, 23, 0, 16, 12, 13], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 12, 13]] | 1 | 307 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
vector<int> a;
int main() {
int n, m;
cin >> n >> m;
int sum = 0;
for (int i = 0; i < n; i++) {
int tmp;
cin >> tmp;
sum += tmp;
a.push_back(tmp);
}
int thr = sum / (4 * m);
sort(a.rbegin(), a.rend());
int c... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
vector<int> a;
int main() {
int n, m;
cin >> n >> m;
int sum = 0;
for (int i = 0; i < n; i++) {
int tmp;
cin >> tmp;
sum += tmp;
a.push_back(tmp);
}
int thr = sum / (4 * m);
sort(a.rbegin(), a.rend());
int c... | [["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 48], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 48], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 161 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> vote(N);
int sum = 0;
for (int i = 0; i < N; i++) {
cin >> vote.at(i);
sum += vote.at(i);
}
sort(vote.begin(), vote.end());
reverse(vote.begin(), vote.end());
int count = 0;
for (int i = 0; i < ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> vote(N);
int sum = 0;
for (int i = 0; i < N; i++) {
cin >> vote.at(i);
sum += vote.at(i);
}
sort(vote.begin(), vote.end());
reverse(vote.begin(), vote.end());
int count = 0;
for (int i = 0; i < ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 85], ["-", 15, 339, 51, 16, 12, 16, 12, 23, 0, 24], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 48], ["-", 15, 339, 51, 16, 12, 16, 12, 23, 0, 25], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17... | 1 | 177 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, sum = 0;
cin >> n >> m;
int a[n + 1];
for (int i = 1; i <= n; i++) {
cin >> a[i];
sum += a[i];
}
sort(a + 1, a + 1 + n);
int x = sum / (4 * m);
int f = 0;
if (x * m * 4 == sum)
f = 1;
bool f1 = true;
for (int i = n; ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, sum = 0;
cin >> n >> m;
int a[n + 1];
for (int i = 1; i <= n; i++) {
cin >> a[i];
sum += a[i];
}
sort(a + 1, a + 1 + n);
int x = sum / (4 * m);
int f = 0;
if (x * m * 4 == sum)
f = 1;
bool f1 = true;
// cout << "lol"... | [["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 17, 68]] | 1 | 190 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
long l... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
long l... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 166 |
#include <algorithm>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, M, sum, cnt = 0;
cin >> N >> M;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A.at(i);
}
sort(A.begin(), A.end());
sum = accumulate(A.begin(), A.end(), 0);... | #include <algorithm>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, M, sum, cnt = 0;
cin >> N >> M;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A.at(i);
}
sort(A.begin(), A.end());
sum = accumulate(A.begin(), A.end(), 0);... | [["+", 12, 16, 12, 23, 0, 16, 12, 2, 63, 40], ["+", 12, 23, 0, 16, 12, 2, 3, 4, 0, 24], ["+", 12, 23, 0, 16, 12, 2, 3, 4, 0, 25]] | 1 | 182 |
#define _CRT_NO_SECURE_WARNINGS
#pragma warning(disable : 4996)
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define sim template <class c
#define ris return *this
#define dor > deb... | #define _CRT_NO_SECURE_WARNINGS
#pragma warning(disable : 4996)
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define sim template <class c
#define ris return *this
#define dor > deb... | [["-", 365, 16, 12, 23, 0, 16, 31, 74, 0, 24], ["-", 12, 23, 0, 16, 31, 74, 39, 77, 39, 40], ["-", 365, 16, 12, 23, 0, 16, 31, 74, 0, 25], ["-", 365, 16, 12, 23, 0, 16, 31, 74, 51, 13], ["+", 0, 124, 365, 16, 12, 23, 0, 16, 31, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20... | 1 | 480 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> vote(N); // N個の票数データ
// 票数データを受け取る(入力)
for (int i = 0; i < N; i++) {
cin >> vote.at(i);
}
// 総投票数をsumとおく
int sum = 0;
for (int i = 0; i < N; i++) {
sum += vote.at(i);
}
// 配列の中で1/4M以上のものの個... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> vote(N); // N個の票数データ
// 票数データを受け取る(入力)
for (int i = 0; i < N; i++) {
cin >> vote.at(i);
}
// 総投票数をsumとおく
int sum = 0;
for (int i = 0; i < N; i++) {
sum += vote.at(i);
}
// 配列の中で1/4M以上のものの個... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["-", 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 | 161 |
n,m = map(int, input().split())
nums = [int(i) for i in input().split()]
tot = 0
for i in nums:
tot+= i
cons = m/(4*tot)
count = 0
for i in nums:
if i>= cons:
count+=1
if count>= m:
print('Yes')
else:
print("No") | n,m = map(int, input().split())
nums = [int(i) for i in input().split()]
tot = 0
for i in nums:
tot+= i
cons = tot/(4*m)
count = 0
for i in nums:
if i>= cons:
count+=1
if count>= m:
print('Yes')
else:
print("No") | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 31, 22], ["-", 0, 662, 12, 657, 12, 23, 0, 657, 12, 22], ["+", 0, 662, 12, 657, 12, 23, 0, 657, 12, 22]] | 5 | 89 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(N);
int all = 0;
for (int i = 0; i < N; i++) {
cin >> A.at(i);
all += A.at(i);
}
int count = 0;
for (int i = 0; i < N; i++) {
if (A.at(i) >= all / (4 * M)) {
count++;
}
... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(N);
int all = 0;
for (int i = 0; i < N; i++) {
cin >> A.at(i);
all += A.at(i);
}
int count = 0;
for (int i = 0; i < N; i++) {
if (A.at(i) >= (double)all / (4 * M)) {
count++... | [["+", 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 | 143 |
#include <iostream>
using namespace std;
int main(void) {
// Your code here!
int N, M, wa = 0;
int count = 0;
int A[1000];
cin >> N >> M;
for (int i = 0; i < N; i++) {
cin >> A[i];
wa = wa + A[i];
}
for (int i = 0; i < N; i++) {
if (wa <= 4 * M * A[i])
count++;
}
if (count > M)
... | #include <iostream>
using namespace std;
int main(void) {
// Your code here!
int N, M, wa = 0;
int count = 0;
int A[1000];
cin >> N >> M;
for (int i = 0; i < N; i++) {
cin >> A[i];
wa = wa + A[i];
}
for (int i = 0; i < N; i++) {
if (wa <= 4 * M * A[i])
count++;
}
if (count >= M)
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 131 |
/*╔═══╗──╔╗╔╗───────────────────╔╗────────╔═══╦═══╗
║║─║╠╗╠╗╔╣╚═╦══╦═╗╔╦╗╔═╗╔══╦══╣╚═╦╦══╦══╣║─║║║─╚╝
║╔═╗║╚╝║╚╣║║║╚╝║║─╔╦╗║║║║╚╝║╚╝║╚╝║║║═╬══║╔═╗║╚╩═║
╚╝─╚╩══╩═╩╝╚╩══╩╝─╚╩╝╚╝╚╩══╩══╩══╩╩══╩══╩╝─╚╩═══╝*/
#include <bits/stdc++.h>
#define mod 1000000007
#define modc 998244353
#define pb push_back
#define ll long lo... | /*╔═══╗──╔╗╔╗───────────────────╔╗────────╔═══╦═══╗
║║─║╠╗╠╗╔╣╚═╦══╦═╗╔╦╗╔═╗╔══╦══╣╚═╦╦══╦══╣║─║║║─╚╝
║╔═╗║╚╝║╚╣║║║╚╝║║─╔╦╗║║║║╚╝║╚╝║╚╝║║║═╬══║╔═╗║╚╩═║
╚╝─╚╩══╩═╩╝╚╩══╩╝─╚╩╝╚╝╚╩══╩══╩══╩╩══╩══╩╝─╚╩═══╝*/
#include <bits/stdc++.h>
#define mod 1000000007
#define modc 998244353
#define pb push_back
#define ll long lo... | [["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 48], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 12, 13]] | 1 | 184 |
import sys
input = sys.stdin.readline
n, m = map(int, input().split())
A = list(map(int, input().split()))
sm = sum(A)
cnt = 0
for a in A:
if 4 * m * a > sm:
cnt += 1
can = "Yes" if cnt >= m else "No"
print(can)
| import sys
input = sys.stdin.readline
n, m = map(int, input().split())
A = list(map(int, input().split()))
sm = sum(A)
cnt = 0
for a in A:
if 4 * m * a >= sm:
cnt += 1
can = "Yes" if cnt >= m else "No"
print(can)
| [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 85 |
data = input().split()
n = int(data[0])
m = int(data[1])
pro = [int(s) for s in input().split()]
vote = 0
for i in pro:
vote += i
s_pro = sorted(pro, reverse=True)
if s_pro[m - 1] < 1 / (4 * vote):
print("No")
else:
print("Yes")
| data = input().split()
n = int(data[0])
m = int(data[1])
pro = [int(s) for s in input().split()]
vote = 0
for i in pro:
vote += i
s_pro = sorted(pro, reverse=True)
if s_pro[m - 1] < vote * 1 / (4 * m):
print("No")
else:
print("Yes") | [["+", 0, 57, 15, 666, 0, 657, 31, 657, 31, 22], ["+", 0, 57, 15, 666, 0, 657, 31, 657, 17, 48], ["-", 15, 666, 0, 657, 12, 23, 0, 657, 12, 22], ["+", 15, 666, 0, 657, 12, 23, 0, 657, 12, 22]] | 5 | 96 |
N,M = map(int,input().split())
A = list(map(int, input().split()))
total = sum(A)
cutoff = total/4*M
over=[]
for i in A:
if i>=cutoff:
over.append(i)
if len(over)>=M:
print('Yes')
else:
print('No') | N,M = map(int,input().split())
A = list(map(int, input().split()))
total = sum(A)
cutoff = total/(4*M)
over=[]
for i in A:
if i>=cutoff:
over.append(i)
if len(over)>=M:
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 | 88 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int sum = 0;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
int cnt = 0;
for (int i = 0; i < n; i++) {
if (!(a[i] < sum / (4 * m)))
cnt++;
}
if (cnt >= m)
cout << "... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int sum = 0;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
int cnt = 0;
for (int i = 0; i < n; i++) {
if (!(a[i] < (double)sum / (4 * m)))
cnt++;
}
if (cnt >= m)
c... | [["+", 28, 23, 0, 16, 12, 16, 31, 74, 0, 24], ["+", 0, 16, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 28, 23, 0, 16, 12, 16, 31, 74, 0, 25]] | 1 | 132 |
#!/usr/bin/python3
import sys
# input = sys.stdin.readline
sys.setrecursionlimit(100000)
INF = float('inf')
MOD = 10**9+7
EPS = 10**-7
#N = int(input())
#A = [int(x) for x in input().split()]
#V = [[0] * 100 for _ in range(100)]
N, M = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
s = sum(... | #!/usr/bin/python3
import sys
# input = sys.stdin.readline
sys.setrecursionlimit(100000)
INF = float('inf')
MOD = 10**9+7
EPS = 10**-7
#N = int(input())
#A = [int(x) for x in input().split()]
#V = [[0] * 100 for _ in range(100)]
N, M = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
s = sum(... | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 31, 22], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 85], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 48], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22]] | 5 | 119 |
#include <iostream>
using namespace std;
int main() {
int n, m, total = 0;
float a[1000];
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> a[i];
total += a[i];
}
float limit = (float)(total / (4 * m));
int cnt = 0;
for (int i = 0; i < n; i++) {
if (a[i] >= limit)
cnt++;
}
... | #include <iostream>
using namespace std;
int main() {
float n, m, total = 0, a[1000];
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> a[i];
total += a[i];
}
float limit = (total / (4 * m));
int cnt = 0;
for (int i = 0; i < n; i++) {
if (a[i] >= limit)
cnt++;
}
if (cnt >= m)... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 8, 9, 0, 43, 49, 50, 51, 74, 0, 24], ["-", 0, 43, 49, 50, 51, 74, 39, 77, 39, 40], ["-", 8, 9, 0, 43, 49, 50, 51, 74, 0, 25]] | 1 | 135 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int i, j, n, m, cnt = 0, s = 0;
map<long long int, long long int> a;
cin >> n >> m;
for (i = 0; i < n; i++) {
cin >> a[i];
}
for (i = 0; i < n; i++) {
s += a[i];
}
j = s / (4 * m);
for (i = 0; i < n; i++) {
if (a[i] >= j)... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int i, j, n, m, cnt = 0, s = 0;
map<long long int, long long int> a;
cin >> n >> m;
for (i = 0; i < n; i++) {
cin >> a[i];
}
for (i = 0; i < n; i++) {
s += a[i];
}
j = (4 * m);
for (i = 0; i < n; i++) {
if (j * a[i] >= s)... | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 85], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 48], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]] | 1 | 157 |
n,m = map(int,input().split())
a=list(map(int,input().split()))
s=sum(a)
l=int(s/(4*m))
# print(a,s,l)
a.sort(reverse=True)
if(a[m-1]>=l):
print("Yes")
else:
print("No") | n,m = map(int,input().split())
a=list(map(int,input().split()))
s=sum(a)
l=s/(4*m)
# print(a,s,l)
a.sort(reverse=True)
if(a[m-1]>=l):
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], ["-", 12, 652, 3, 4, 0, 657, 12, 23, 0, 25]] | 5 | 86 |
#include <bits/stdc++.h>
using namespace std;
int n, m, a, total = 0;
int nums[100];
double minM;
int main() {
ios_base::sync_with_stdio(false);
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> a;
nums[i] = a;
total += a;
}
minM = total / (4 * m);
total = 0;
for (int i = 0; i < n; i++) ... | #include <bits/stdc++.h>
using namespace std;
double n, m, a, total = 0;
double nums[100];
double minM;
int main() {
ios_base::sync_with_stdio(false);
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> a;
nums[i] = a;
total += a;
}
minM = total / (4 * m);
total = 0;
for (int i = 0; i < n;... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40]] | 1 | 136 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define rep1(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = (int)(n)-1; 0 <= i; i--)
#define rrep1(i, n) for (int i = (int)(n); 1 <= i; i--)
#define each(it, c) ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define rep1(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = (int)(n)-1; 0 <= i; i--)
#define rrep1(i, n) for (int i = (int)(n); 1 <= i; i--)
#define each(it, c) ... | [["-", 31, 2, 3, 4, 0, 16, 12, 2, 63, 22], ["+", 31, 2, 3, 4, 0, 16, 12, 2, 63, 22]] | 1 | 281 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define rep1(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = (int)(n)-1; 0 <= i; i--)
#define rrep1(i, n) for (int i = (int)(n); 1 <= i; i--)
#define each(it, c) ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define rep1(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = (int)(n)-1; 0 <= i; i--)
#define rrep1(i, n) for (int i = (int)(n); 1 <= i; i--)
#define each(it, c) ... | [["+", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["+", 51, 2, 3, 4, 0, 16, 12, 2, 63, 40], ["+", 3, 4, 0, 16, 12, 2, 3, 4, 0, 25]] | 1 | 277 |
#include <iostream>
#include <vector>
#define ll long long int
using namespace std;
int main() {
ll n, m, i;
cin >> n >> m;
vector<ll> a(n);
ll sum = 0;
for (i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
ll cnt = 0;
for (i = 0; i < n; i++)
if (sum / (4 * m) <= a[i])
cnt++;
if (cnt... | #include <iostream>
#include <vector>
#define ll long long int
using namespace std;
int main() {
ll n, m, i;
cin >> n >> m;
vector<ll> a(n);
ll sum = 0;
for (i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
ll cnt = 0;
for (i = 0; i < n; i++)
if (sum / (4.0 * m) <= a[i])
cnt++;
if (c... | [["-", 51, 16, 31, 16, 12, 23, 0, 16, 31, 13], ["+", 51, 16, 31, 16, 12, 23, 0, 16, 31, 13]] | 1 | 128 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
int sum = 0;
for (int i = 0; i < n; i++)
cin >> a[i], sum += a[i];
int cnt = 0;
for (int i = 0; i < n; i++)
if (4 * m * a[i] >= sum)
cnt++;
if (cnt >= m)
cout <... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
int sum = 0;
for (int i = 0; i < n; i++)
cin >> a[i], sum += a[i];
int cnt = 0;
for (int i = 0; i < n; i++)
if (4 * m * a[i] >= sum)
cnt++;
if (cnt >= m)
cout <... | [["-", 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 | 126 |
n,m = map(int,input().split())
lis = list(map(int,input().split()))
lis.sort()
t = sum(lis)
c=0
condition = 1/(4*m)
cost = t*condition
for i in range(len(lis)):
if(lis[i]>cost):
c+=1
if(c>=m):
print("Yes")
else:
print("No") | n,m = map(int,input().split())
lis = list(map(int,input().split()))
lis.sort()
t = sum(lis)
c=0
condition = 1/(4*m)
cost = t*condition
for i in range(len(lis)):
if(lis[i]>=cost):
c+=1
if(c>=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 | 106 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define yes cout << "yes" << endl;
#define Yes cout << "Yes" << endl;
#define YES cout << "YES" << endl;... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define yes cout << "yes" << endl;
#define Yes cout << "Yes" << endl;
#define YES cout << "YES" << endl;... | [["+", 0, 1, 0, 11, 12, 16, 31, 74, 0, 24], ["+", 0, 11, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 0, 1, 0, 11, 12, 16, 31, 74, 0, 25]] | 1 | 156 |
#include <bits/stdc++.h>
#define ll long long
#define pi pair<int, int>
#define ppi pair<pi, pi>
#define mp make_pair
#define fr first
#define sc second
using namespace std;
int main() {
// ios::sync_with_stdio(0);
// cin.tie(0) , cout.tie(0);
int n, m;
cin >> n >> m;
vector<int> v;
int sum = 0;
... | #include <bits/stdc++.h>
#define ll long long
#define pi pair<int, int>
#define ppi pair<pi, pi>
#define mp make_pair
#define fr first
#define sc second
using namespace std;
int main() {
// ios::sync_with_stdio(0);
// cin.tie(0) , cout.tie(0);
int n, m;
cin >> n >> m;
vector<int> v;
int sum = 0;
... | [["-", 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 | 186 |
import numpy as np
n_m = [int(i) for i in input().split()]
ai = np.array([int(i) for i in input().split()])
n = n_m[0]
m = n_m[1]
asum = ai.sum()
thread = asum / (4 * asum)
real_m = 0
for a in ai:
if a < thread:
continue
else:
real_m += 1
print("No") if real_m < m else print("Yes")
| import numpy as np
n_m = [int(i) for i in input().split()]
ai = np.array([int(i) for i in input().split()])
n = n_m[0]
m = n_m[1]
asum = ai.sum()
thread = asum / (4 * m)
real_m = 0
for a in ai:
if a < thread:
continue
else:
real_m += 1
print("No") if real_m < m else print("Yes")
| [["-", 0, 662, 12, 657, 12, 23, 0, 657, 12, 22], ["+", 0, 662, 12, 657, 12, 23, 0, 657, 12, 22]] | 5 | 109 |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a.at(i);
}
int sum = accumulate(a.begin(), a.end(), 0);
sort(a.rbegin(), a.rend());
for (int i = 0; i < m; i++) {
if (a.at(i) < sum / ... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a.at(i);
}
int sum = accumulate(a.begin(), a.end(), 0);
sort(a.rbegin(), a.rend());
for (int i = 0; i < m; i++) {
if (a.at(i) * 4 * m ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 85], ["-", 15, 339, 51, 16, 12, 16, 12, 23, 0, 24], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 48], ["-", 15, 339, 51, 16, 12, 16, 12, 23, 0, 25], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17... | 1 | 149 |
n, m = map(int, input().split())
a = list(map(int, input().split()))
cnt = 0
for i in a:
if i >= (1/(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 i in a:
if i >= sum(a)*(1/(4*m)):
cnt += 1
if cnt >= m:
print("Yes")
else:
print("No") | [["+", 0, 57, 15, 666, 0, 657, 31, 652, 63, 22], ["+", 15, 666, 0, 657, 31, 652, 3, 4, 0, 22], ["+", 15, 666, 0, 657, 31, 652, 3, 4, 0, 25], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 48], ["+", 0, 57, 15, 666, 0, 657, 12, 23, 0, 24]] | 5 | 76 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define F first
#define S second
#define ppp pair<ll, pair<ll, ll>>
#define pp pair<ll, ll>
#define all(x) (x).begin(), (x).end()
#define pi 3.14159265358
#define MOD 998244353
int main() {
// #ifndef ONLINE_JUDGE
// freope... |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define F first
#define S second
#define ppp pair<ll, pair<ll, ll>>
#define pp pair<ll, ll>
#define all(x) (x).begin(), (x).end()
#define pi 3.14159265358
#define MOD 998244353
int main() {
// #ifndef ONLINE_JUDGE
// freope... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 194 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int c = 0;
vector<int> v;
int total = 0;
for (int i = 0; i < n; i++) {
int temp;
cin >> temp;
v.push_back(temp);
}
for (int i = 0; i < n; i++) {
total += v[i];
}
sort... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int c = 0;
vector<int> v;
int total = 0;
for (int i = 0; i < n; i++) {
int temp;
cin >> temp;
v.push_back(temp);
}
for (int i = 0; i < n; i++) {
total += v[i];
}
sort... | [["-", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13], ["+", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13]] | 1 | 163 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
int a, m;
cin >> a >> m;
std::vector<double> v(a);
double y = 0;
for (int i = 0; i < a; ++i) {
cin >> v[i];
y += v[i];
}
float c = (0.25 / m) * y;
sort(v.begin(), v.end());
if (lower_bound(v.begin(), v.end(),... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
int a, m;
cin >> a >> m;
std::vector<double> v(a);
double y = 0;
for (int i = 0; i < a; ++i) {
cin >> v[i];
y += v[i];
}
float c = (0.25 / m) * y;
sort(v.begin(), v.end());
if (lower_bound(v.begin(), v.end(),... | [["-", 0, 57, 64, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 57, 64, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 57, 64, 9, 0, 1, 0, 16, 12, 22], ["-", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]] | 1 | 189 |
#!/usr/bin/env python3
import pandas as pd
n ,m = map(int, input().split())
a = pd.Series(list(map(int, input().split())))
t = a >= a.sum() * 1/(4*m)
if t.sum() >= m:
print('Yes')
else:
print('No') | #!/usr/bin/env python3
import numpy as np
n ,m = map(int, input().split())
a = np.array(list(map(int, input().split())))
t = a >= a.sum() * 1/(4*m)
if t.sum() >= m:
print('Yes')
else:
print('No')
| [["-", 0, 656, 0, 596, 141, 704, 141, 673, 0, 22], ["+", 0, 656, 0, 596, 141, 704, 141, 673, 0, 22], ["-", 36, 36, 0, 656, 0, 596, 141, 704, 705, 22], ["+", 36, 36, 0, 656, 0, 596, 141, 704, 705, 22], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 500, 22], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 500, 22], ["-", 0, 1, 0, 662, 12,... | 5 | 83 |
N,M=map(int,input().split())
A=list(map(int,input().split()))
A.sort(reverse=True)
c=0
for i in range(M):
if A[i]<sum(A)*(1/4*M):c+=0
else:c+=1
if c==0:print('Yes')
else:print('No')
| N,M=map(int,input().split())
A=list(map(int,input().split()))
A.sort(reverse=True)
c=0
for i in range(M):
if A[i]<sum(A)/(4*M):c+=1
else:c+=0
if c==0:print('Yes')
else:print('No')
| [["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 48], ["-", 0, 57, 15, 666, 0, 657, 12, 23, 0, 24], ["-", 0, 657, 12, 23, 0, 657, 31, 657, 31, 612], ["+", 0, 57, 15, 666, 0, 657, 12, 23, 0, 24], ["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["-", 75, 76, 8, 196, 0, 1, 0, 677, 12,... | 5 | 98 |
package main
import (
"bufio"
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"strconv"
)
// B - Popular Vote
// https://atcoder.jp/contests/abc161/tasks/abc161_b
func main() {
scanner := NewBufScanner(os.Stdin)
N, M := scanner.Int(), scanner.Float64()
var con float64
var as []float64
var sum float64
for i := 0; i ... | package main
import (
"bufio"
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"strconv"
)
// B - Popular Vote
// https://atcoder.jp/contests/abc161/tasks/abc161_b
func main() {
scanner := NewBufScanner(os.Stdin)
N, M := scanner.Int(), scanner.Float64()
var con float64
var as []float64
var sum float64
for i := 0; i ... | [["-", 0, 7, 8, 196, 0, 57, 15, 16, 17, 19], ["+", 0, 7, 8, 196, 0, 57, 15, 16, 17, 47]] | 7 | 1,204 |
#include <stdio.h>
int main(void) {
int N, M;
scanf("%d %d", &N, &M);
int A[1000];
int count = 0;
for (int i = 0; i < N; i++) {
scanf("%d", &A[i]);
count += A[i];
}
double limit = count / (4 * M);
int num = 0;
for (int i = 0; i < N; i++) {
if (A[i] >= limit)
num++;
}
if (num >=... | #include <stdio.h>
int main(void) {
int N, M;
scanf("%d %d", &N, &M);
int A[1000];
int count = 0;
for (int i = 0; i < N; i++) {
scanf("%d", &A[i]);
count += A[i];
}
double limit = (double)count / (double)(4 * M);
int num = 0;
for (int i = 0; i < N; i++) {
if (A[i] >= limit)
num++;
... | [["+", 0, 43, 49, 50, 51, 16, 31, 74, 0, 24], ["+", 49, 50, 51, 16, 31, 74, 39, 77, 39, 40], ["+", 0, 43, 49, 50, 51, 16, 31, 74, 0, 25], ["+", 0, 43, 49, 50, 51, 16, 12, 74, 0, 24], ["+", 49, 50, 51, 16, 12, 74, 39, 77, 39, 40], ["+", 0, 43, 49, 50, 51, 16, 12, 74, 0, 25]] | 0 | 139 |
nm = input().split(" ")
n = int(nm[0])
m = int(nm[1])
a = input().split(" ")
total = 0
for v in a:
total += int(a)
mv = total / (4 * m)
q = 0
for e in a:
e = int(e)
if e >= mv:
q += 1
if q >= m:
print("Yes")
else:
print("No")
| nm = input().split(" ")
n = int(nm[0])
m = int(nm[1])
a = input().split(" ")
total = 0
for v in a:
total += int(v)
mv = total / (4 * m)
q = 0
for e in a:
e = int(e)
if e >= mv:
q += 1
if q >= m:
print("Yes")
else:
print("No")
| [["-", 0, 1, 0, 677, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 22]] | 5 | 106 |
N, M = map(int, input().split())
A = sorted(map(int, input().split()), reverse=True)
t = sum(A)
if t/(4*M) <= A[M-1]:
print("YES")
else:
print("NO")
| N, M = map(int, input().split())
A = sorted(map(int, input().split()), reverse=True)
t = sum(A)
if t/(4*M) <= A[M-1]:
print("Yes")
else:
print("No")
| [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 73 |
#include <bits/stdc++.h>
#include <unordered_set>
#define rep(i, a, b) for (ll i = a; i < b; i += 1)
#define dep(i, a, b) for (int i = a; i > b; i--)
#define makeUnique(vec) \
sort(all(vec)); \
vec.re... | #include <bits/stdc++.h>
#include <unordered_set>
#define rep(i, a, b) for (ll i = a; i < b; i += 1)
#define dep(i, a, b) for (int i = a; i > b; i--)
#define makeUnique(vec) \
sort(all(vec)); \
vec.re... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78], ["+", 8, 9, 0, 43, 39, 344, 3, 347, 0, 18], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 8, 9, 0, 43, 39, 344, 3, 347, 0, 47], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 14, 8... | 1 | 230 |
#include <bits/stdc++.h>
using namespace std;
//#define DEBUG
#ifdef DEBUG
#define PRINT(A) std::cout << (#A) << ":" << (A) << std::endl;
#else
#define PRINT(A)
#endif
int main() {
int N, M;
cin >> N >> M;
int A[100];
int sumA = 0;
for (int i = 0; i < N; i++) {
cin >> A[i];
sumA += A[i];
}
i... | #include <bits/stdc++.h>
using namespace std;
//#define DEBUG
#ifdef DEBUG
#define PRINT(A) std::cout << (#A) << ":" << (A) << std::endl;
#else
#define PRINT(A)
#endif
int main() {
int N, M;
cin >> N >> M;
int A[100];
double sumA = 0;
for (int i = 0; i < N; i++) {
cin >> A[i];
sumA += A[i];
}
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 24], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 85], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 17, 48], ["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 25]] | 1 | 170 |
n, m = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
total_vote = sum(a)
popular = [p for p in a if p >= total_vote/4]
if len(popular) >= m:
print("Yes")
else:
print("No")
| n, m = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
total_vote = sum(a)
popular = [p for p in a if p >= total_vote/4/m]
if len(popular) >= m:
print("Yes")
else:
print("No")
| [["+", 12, 658, 0, 678, 0, 666, 0, 657, 17, 85], ["+", 12, 658, 0, 678, 0, 666, 0, 657, 12, 22]] | 5 | 81 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int A[N];
int vote = 0;
for (int i = 0; i < N; i++) {
cin >> A[i];
vote += A[i];
}
int counter = 0;
int border = vote / (4 * M) + 1;
if (vote % (4 * M) > 0)
border++;
for (int i = 0; i < N; i++) {
i... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int A[N];
int vote = 0;
for (int i = 0; i < N; i++) {
cin >> A[i];
vote += A[i];
}
int counter = 0;
int border = vote / (4 * M);
if (vote % (4 * M) > 0)
border++;
for (int i = 0; i < N; i++) {
if (A... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 153 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int M, N;
cin >> M >> N;
vector<int> data(N);
for (int i = 0; i < N; i++) {
cin >> data.at(i);
}
sort(data.begin(), data.end());
reverse(data.begin(), data.end());
int sum = 0;
for (int i = 0; i < N; i++) {
sum += data.at(i);
}
i... | #include <bits/stdc++.h>
using namespace std;
int main() {
int M, N;
cin >> N >> M;
vector<int> data(N);
for (int i = 0; i < N; i++) {
cin >> data.at(i);
}
sort(data.begin(), data.end());
reverse(data.begin(), data.end());
int sum = 0;
for (int i = 0; i < N; i++) {
sum += data.at(i);
}
i... | [["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 155 |
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int total_n = sc.nextInt();
int select_m = sc.nextInt();
int a[] = new int[total_n];
double vote_count = 0;
for (int i = 0; i < a.length; i++) {
a[i] = sc.nextInt();
vo... | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int total_n = sc.nextInt();
int select_m = sc.nextInt();
int a[] = new int[total_n];
double vote_count = 0;
for (int i = 0; i < a.length; i++) {
a[i] = sc.nextInt();
vo... | [["+", 12, 16, 12, 23, 0, 16, 12, 23, 0, 24], ["+", 0, 16, 12, 23, 0, 16, 12, 23, 0, 25]] | 3 | 187 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c = 0;
double s = 0;
cin >> n >> m;
int x[n];
for (int i = 0; i < n; i++) {
cin >> x[i];
s += x[i];
}
sort(x, x + n);
s = s / (4 * m);
for (int i = n - 1; i >= 0; i--) {
if (x[i] >= (int)s)
c++;
else
brea... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, c = 0;
double s = 0;
cin >> n >> m;
int x[n];
for (int i = 0; i < n; i++) {
cin >> x[i];
s += x[i];
}
sort(x, x + n);
s = s / (4 * m);
for (int i = n - 1; i >= 0; i--) {
if (x[i] >= s)
c++;
else
break;
... | [["-", 0, 57, 15, 339, 51, 16, 12, 74, 0, 24], ["-", 15, 339, 51, 16, 12, 74, 39, 77, 39, 40], ["-", 0, 57, 15, 339, 51, 16, 12, 74, 0, 25]] | 1 | 147 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
long long M;
cin >> N >> M;
long long A[N];
long long tot = 0;
for (int i = 0; i < N; ++i) {
cin >> A[i];
tot += A[i];
}
long long limit = tot / (4 * M);
int possible = 0;
for (int i = 0; i < N; ++i) {
if (A[i] * 4 ... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
long long M;
cin >> N >> M;
long long A[N];
long long tot = 0;
for (int i = 0; i < N; ++i) {
cin >> A[i];
tot += A[i];
}
long long limit = tot / (4 * M);
int possible = 0;
for (int i = 0; i < N; ++i) {
if (A[i] * 4 ... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]] | 1 | 151 |
n, m = list(map(int, input().split(" ")))
a = list(map(int, input().split(" ")))
l = list(x for x in a if x >= (sum(a)/4*m))
print("Yes" if len(l) >= m else "No")
| n, m = list(map(int, input().split(" ")))
a = list(map(int, input().split(" ")))
l = list(x for x in a if x >= (sum(a)/(4*m)))
print("Yes" if len(l) >= m else "No")
| [["+", 0, 666, 0, 23, 0, 657, 12, 23, 0, 24], ["+", 0, 666, 0, 23, 0, 657, 12, 23, 0, 25]] | 5 | 82 |
#include <bits/stdc++.h>
#define N 100005
using namespace std;
int a[N];
int cmp(int a, int b) { return a > b; }
int main() {
int n, m;
cin >> n >> m;
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
sort(a, a + n, cmp);
sum = sum / (4 * m);
for (int i = 0; i < n; i++) {
... | #include <bits/stdc++.h>
#define N 100005
using namespace std;
int a[N];
int cmp(int a, int b) { return a > b; }
int main() {
int n, m;
cin >> n >> m;
double sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
sort(a, a + n, cmp);
sum = sum / (4 * m);
for (int i = 0; i < n; i++) ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 157 |
#include <algorithm>
#include <bits/stdc++.h>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#def... | #include <algorithm>
#include <bits/stdc++.h>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#def... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 662 |
#include <bits/stdc++.h>
using namespace std;
long long int sum(long long int arr[], long long int n) {
long long int i, sum = 0;
for (i = 0; i < n; i++) {
sum = sum + arr[i];
}
return sum;
}
int main() {
long long int n, i, m, sum1, count;
cin >> n;
cin >> m;
long long int arr[n];
for (i = 0; i ... | #include <bits/stdc++.h>
using namespace std;
long long int sum(long long int arr[], long long int n) {
long long int i, sum = 0;
for (i = 0; i < n; i++) {
sum = sum + arr[i];
}
return sum;
}
int main() {
long long int n, i, m, sum1, count;
cin >> n;
cin >> m;
long long int arr[n];
for (i = 0; i ... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 186 |
#include <bits/stdc++.h>
using namespace std;
#define MAX 1000000
#define input freopen("input.txt", "r", stdin)
#define output freopen("output.txt", "w", stdout)
int main() {
int n, m;
cin >> n >> m;
vector<int> v(n);
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> v[i];
sum += v[i];
}
i... | #include <bits/stdc++.h>
using namespace std;
#define MAX 1000000
#define input freopen("input.txt", "r", stdin)
#define output freopen("output.txt", "w", stdout)
int main() {
int n, m;
cin >> n >> m;
vector<int> v(n);
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> v[i];
sum += v[i];
}
i... | [["-", 0, 1, 0, 41, 64, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 41, 64, 16, 12, 5, 0, 6]] | 1 | 159 |
N,M = map(int,input().split(" "))
MER = list(map(int,input().split(" ")))
mer_sum = sum(MER)
threshold = mer_sum / (4 * M)
mer_over = [1 if i < threshold else 0 for i in MER]
mer_threshold = sum(mer_over)
if M <= mer_threshold:
print("Yes")
else:
print("No") | N,M = map(int,input().split(" "))
MER = list(map(int,input().split(" ")))
mer_sum = sum(MER)
threshold = mer_sum / (4 * M)
mer_over = [1 if i >= threshold else 0 for i in MER]
mer_threshold = sum(mer_over)
if M <= mer_threshold:
print("Yes")
else:
print("No") | [["-", 0, 662, 12, 658, 8, 41, 0, 666, 667, 18], ["+", 0, 662, 12, 658, 8, 41, 0, 666, 667, 20]] | 5 | 94 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int i;
int count = 0;
std::vector<int> numbers;
int total = 0;
while (cin >> i) {
numbers.push_back(i);
total += i;
}
for (int number : numbers) {
if (number >= total / (4 * M)) {
count+... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int i;
int count = 0;
std::vector<int> numbers;
int total = 0;
while (cin >> i) {
numbers.push_back(i);
total += i;
}
for (int number : numbers) {
if (number >= total / (4.0 * M)) {
coun... | [["-", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13], ["+", 51, 16, 12, 16, 12, 23, 0, 16, 31, 13]] | 1 | 114 |
val1= input()
val2= input()
num1= list(map(int,val1.split()))
num2= list(map(int,val2.split()))
n= num1[0]
m= num1[1]
sumup=0;
for i in range(0,n):
sumup= sumup+ num2[i]
border= sumup/ (4* m)
judge=0
for j in range(0,n):
if num2[j] > border:
judge= judge + 1
if judge >= m:
print("Yes")
else:
pr... | val1= input()
val2= input()
num1= list(map(int,val1.split()))
num2= list(map(int,val2.split()))
n= num1[0]
m= num1[1]
sumup=0;
for i in range(0,n):
sumup= sumup+ num2[i]
border= sumup/ (4* m)
judge=0
for j in range(0,n):
if num2[j] >= border:
judge= judge + 1
if judge >= m:
print("Yes")
else:
p... | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 128 |
#include <bits/stdc++.h>
using namespace std;
//省略形
#define rep(i, n) for (auto i = 0; i < n; ++i)
#define REP(i, a, b) for (auto i = a; i < b; ++i)
#define all(v) (v).begin(), (v).end()
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vc = vector<char>;
using vs = vector<string>;
using vvi =... | #include <bits/stdc++.h>
using namespace std;
//省略形
#define rep(i, n) for (auto i = 0; i < n; ++i)
#define REP(i, a, b) for (auto i = a; i < b; ++i)
#define all(v) (v).begin(), (v).end()
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vc = vector<char>;
using vs = vector<string>;
using vvi =... | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]] | 1 | 741 |
N,M=map(int, input().split())
A=list(map(int, input().split()))
A.sort(reverse=True)
if A[M-1]<sum(A)/4:
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, 85], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 12, 22]] | 5 | 70 |
N ,M = map(int, input().split())
List = list(map(int, input().split()))
stand = 1 / (4 * M) * sum(List)
arr = []
for i in range(List):
if List[i] >= stand:
arr.append(List[i])
if len(arr) >= M:
print("Yes")
else:
print("No")
| N ,M = map(int, input().split())
List = list(map(int, input().split()))
stand = 1 / (4 * M) * sum(List)
arr = []
for i in range(len(List)):
if List[i] >= stand:
arr.append(List[i])
if len(arr) >= M:
print("Yes")
else:
print("No")
| [["+", 0, 7, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 98 |
n, m=map(int, input().split())
a = input().split()
point = [int(s) for s in a]
point.sort(reverse=True)
if sum(point)/(4*m) < point[m-1]:
print("Yes")
else:
print("No") | n, m=map(int, input().split())
a = input().split()
point = [int(s) for s in a]
point.sort(reverse=True)
if sum(point)/(4*m) <= point[m-1]:
print("Yes")
else:
print("No")
| [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19]] | 5 | 78 |
n, m = map(int, input().split())
A = list(map(int,input().split()))
total = sum(A)
A.sort(reverse = True)
print(A)
judge = True
for i in range(m):
if (total / (4*m)) < A[i]:
continue
else:
judge = not judge
break
if judge:
print("Yes")
else:
print("No")
| n, m = map(int, input().split())
A = list(map(int,input().split()))
total = sum(A)
A.sort(reverse = True)
judge = True
for i in range(m):
if (total / (4*m)) <= A[i]:
continue
else:
judge = not judge
break
if judge:
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], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]] | 5 | 103 |
N,M=map(int,input().split())
A=list(map(int,input().split()))
ans=0
inf=sum(A)/4*M
for i in range(N):
if A[i]>=inf:ans+=1
print("Yes" if ans>=M else "No") | N,M=map(int,input().split())
A=list(map(int,input().split()))
ans=0
inf=sum(A)/(4*M)
for i in range(N):
if A[i]>=inf:ans+=1
print("Yes" if ans>=M else "No") | [["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 12, 23, 0, 25]] | 5 | 79 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
for (int &A : a) {
cin >> A;
}
int sum = 0;
for (int &p : a) {
sum += p;
}
int r;
if (sum % (4 * m)) {
r = sum / (4 * m);
} else {
r = sum / (4 * m) + 1;
}
int count = 0;
fo... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
vector<int> a(n);
for (int &A : a) {
cin >> A;
}
int sum = 0;
for (int &p : a) {
sum += p;
};
int r;
if (sum % (4 * m)) {
r = sum / (4 * m) + 1;
} else {
r = sum / (4 * m);
}
int count = 0;
f... | [["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["-", 0, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["-", 0, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 154 |
N,M=map(int,input().split())
hoge=list(map(int,input().split()))
if sorted(hoge)[-M] > sum(hoge)/(4*M):
print('Yes')
else:
print('No')
| N,M=map(int,input().split())
hoge=list(map(int,input().split()))
if sorted(hoge)[-M] >= sum(hoge)/(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 | 68 |
#include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace ... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 505 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int N, M, sum = 0, cnt = 0;
cin >> N >> M;
int A[N];
for (int i = 0; i < N; i++) {
cin >> A[i];
sum += A[i];
}
for (int i = 0; i < N; i++) {
if (A[i] >= sum / (4 * M)) {
cnt++;
}
}
if (cnt >= M)
cout << "Yes" <<... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int N, M, sum = 0, cnt = 0;
cin >> N >> M;
int A[N];
for (int i = 0; i < N; i++) {
cin >> A[i];
sum += A[i];
}
for (int i = 0; i < N; i++) {
if (A[i] >= (float)sum / (float)(4 * M)) {
cnt++;
}
}
if (cnt >= M)
co... | [["+", 15, 339, 51, 16, 12, 16, 31, 74, 0, 24], ["+", 51, 16, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 15, 339, 51, 16, 12, 16, 31, 74, 0, 25], ["+", 15, 339, 51, 16, 12, 16, 12, 74, 0, 24], ["+", 51, 16, 12, 16, 12, 74, 39, 77, 39, 40], ["+", 15, 339, 51, 16, 12, 16, 12, 74, 0, 25]] | 1 | 130 |
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_... | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_... | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 259 |
a = list(map(int, input().split()))
A = list(map(int, input().split()))
N, M = a[0], a[1]
sum = sum(A)
print(sum)
c = 0
for i in range(N):
if A[i] >= sum/4/M:
c = c+1
if c >= M:
print("Yes")
else:
print("No") | a = list(map(int, input().split()))
A = list(map(int, input().split()))
N, M = a[0], a[1]
sum = sum(A)
c = 0
for i in range(N):
if A[i] >= sum/4/M:
c = c+1
if c >= 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 | 104 |
#include "iostream"
#include <string.h>
using namespace std;
int main() {
int N, M;
int A[101] = {0};
int all = 0;
int cnt = 0;
double a;
cin >> N >> M;
for (int i = 1; i <= N; i++) {
cin >> A[i];
all += A[i];
}
a = (all / (4 * M));
for (int i = 1; i <= N; i++) {
if ((double)A[... | #include "iostream"
#include <string.h>
using namespace std;
int main() {
int N;
double M;
int A[101] = {0};
double all = 0.0;
int cnt = 0;
double a;
cin >> N >> M;
for (int i = 1; i <= N; i++) {
cin >> A[i];
all += A[i];
}
a = (all / (4 * M));
for (int i = 1; i <= N; i++) {
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 145 |
#define ll long long
#define INF 99999999
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int sum = 0;
vector<int> a(n);
rep(i, n) {
cin >> a[i];
sum += a[i];
}
sort(a.begin(), a.end(), greater<int>());
if (... | #define ll long long
#define INF 99999999
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int sum = 0;
vector<int> a(n);
rep(i, n) {
cin >> a[i];
sum += a[i];
}
sort(a.begin(), a.end(), greater<int>());
if (... | [["+", 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 | 132 |
#include <iostream>
int main() {
int N, M;
std::cin >> N >> M;
int A[N];
int sum = 0;
int temp = 0;
std::string s = "No";
for (int i = 0; i < N; ++i) {
std::cin >> A[i];
sum += A[i];
}
for (int i = 0; i < N; ++i) {
if (A[i] < sum / (4 * M)) {
} else {
temp++;
}
if (temp... | #include <iostream>
int main() {
int N, M;
std::cin >> N >> M;
float A[N];
float sum = 0;
int temp = 0;
std::string s = "No";
for (int i = 0; i < N; ++i) {
std::cin >> A[i];
sum += A[i];
}
for (int i = 0; i < N; ++i) {
if (A[i] < sum / (4 * M)) {
} else {
temp++;
}
if (... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 146 |
m, n = list(map(int, input().split(" ")))
a_list = sorted(list(map(int, input().split(" "))), reverse=True)
if m == 0:
print('Yes')
else:
if a_list[m-1] >= sum(a_list) / (4 * m):
print('Yes')
else:
print('No')
| n, m = list(map(int, input().split(" ")))
a_list = sorted(list(map(int, input().split(" "))), reverse=True)
if m == 0:
print('Yes')
else:
if a_list[m-1] >= sum(a_list) / (4 * m):
print('Yes')
else:
print('No') | [["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22], ["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 21], ["+", 0, 656, 0, 1, 0, 662, 31, 684, 0, 21], ["+", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22]] | 5 | 95 |
# coding: utf-8
# Your code here!
N, M = list(map(int, input().split()))
a = list(map(int, input().split()))
count = 0
for i in range(N):
if a[i] > sum(a) * 1 / (4 * M):
count += 1
if count >= M:
print('Yes')
else:
print('No') | # coding: utf-8
# Your code here!
N, M = list(map(int, input().split()))
a = list(map(int, input().split()))
count = 0
for i in range(N):
if a[i] >= sum(a) * 1 / (4 * M):
count += 1
if count >= M:
print('Yes')
else:
print('No') | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]] | 5 | 90 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
int count = 0;
int sum = 0;
cin >> N >> M;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A[i];
sum += A[i];
}
sort(A.begin(), A.end(), greater<int>());
double jud = sum / (4 * M);
for (int i = 0; i < N; i++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
int count = 0;
double sum = 0;
cin >> N >> M;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A[i];
sum += A[i];
}
sort(A.begin(), A.end(), greater<int>());
double jud = sum / (4 * M);
for (int i = 0; i < N; i++) {
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 161 |
N,M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
T = (sum(A)//(4*M))
n = 0
for i in range(N):
if A[i] < T:
continue
n += 1
if n >= M:
print('Yes')
else:
print('No') | N,M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
T = (sum(A)/(4*M))
n = 0
for i in range(N):
if A[i] < T:
continue
n += 1
if n >= M:
print('Yes')
else:
print('No') | [["-", 0, 1, 0, 662, 12, 23, 0, 657, 17, 676], ["+", 0, 1, 0, 662, 12, 23, 0, 657, 17, 85]] | 5 | 97 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int N = input.nextInt();
int M = input.nextInt();
int[] votes = new int[N];
int sum = 0;
int cnt = 0;
for (int i = 0; i < N; i++) {
votes[i] = input.nextIn... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int N = input.nextInt();
int M = input.nextInt();
int[] votes = new int[N];
double sum = 0;
int cnt = 0;
for (int i = 0; i < N; i++) {
votes[i] = input.nex... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 511, 0, 512]] | 3 | 174 |
// #pragma comment(linker, "/stack:200000000")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("Ofast")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tr... | // #pragma comment(linker, "/stack:200000000")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("Ofast")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tr... | [["+", 51, 16, 12, 16, 31, 16, 31, 16, 31, 13], ["+", 51, 16, 12, 16, 31, 16, 31, 16, 17, 48]] | 1 | 747 |
#include <bits/stdc++.h>
using namespace std;
#define all(c) c.begin(), c.end()
#define init(c) memset(c, 0, sizeof c)
typedef long long ll;
const int N = 20000005;
int n, k, x, t, a, b, m;
string s;
vector<int> v;
int main() {
cin >> n >> m;
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> x;
v.push_ba... | #include <bits/stdc++.h>
using namespace std;
#define all(c) c.begin(), c.end()
#define init(c) memset(c, 0, sizeof c)
typedef long long ll;
const int N = 20000005;
int n, k, x, t, a, b, m;
string s;
vector<int> v;
int main() {
cin >> n >> m;
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> x;
v.push_ba... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]] | 1 | 170 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.