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
first_input = map(lambda x:int(x), input().split(" ")) #second_input = input() print(str(first_input[2])+" "+str(first_input[0])+" "+str(first_input[1]))
first_input = list(map(lambda x:int(x), input().split(" "))) #second_input = input() print(str(first_input[2])+" "+str(first_input[0])+" "+str(first_input[1]))
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
58
n = gets.chop.split("") n[0], n[1] = n[1], n[0] n[0], n[2] = n[2], n[0] puts n[0] + " " + n[1] + " " + n[2]
n = gets.chomp.split n[0], n[1] = n[1], n[0] n[0], n[2] = n[2], n[0] puts n[0] + " " + n[1] + " " + n[2]
[["-", 0, 493, 0, 662, 12, 652, 486, 652, 735, 22], ["+", 0, 493, 0, 662, 12, 652, 486, 652, 735, 22], ["-", 0, 493, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 0, 662, 12, 652, 3, 4, 0, 557, 0, 62], ["-", 0, 493, 0, 662, 12, 652, 3, 4, 0, 25]]
4
72
/* _ooOoo_ o8888888o 88" . "88 (| -_- |) O\ = /O ____/`---'\____ .' \\| |// `. / \\||| : |||// \ / _||||| -:- |||||- \ | | \\\ - /// | | ...
/* _ooOoo_ o8888888o 88" . "88 (| -_- |) O\ = /O ____/`---'\____ .' \\| |// `. / \\||| : |||// \ / _||||| -:- |||||- \ | | \\\ - /// | | ...
[["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
325
#include <bits/stdc++.h> using namespace std; int main() { int X, Y, Z; cin >> X >> Y >> Z; cout << Z + " " << X + " " << Y + " " << "\n"; }
#include <bits/stdc++.h> using namespace std; int main() { int X, Y, Z; cin >> X >> Y >> Z; cout << Z << " " << X << " " << Y << " " << "\n"; }
[["-", 31, 16, 31, 16, 31, 16, 12, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 16, 31, 16, 17, 151], ["-", 0, 16, 31, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 17, 151], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
51
X, Y, Z = [int(i) for i in input().split()] print("{} {} {}".format(Z, Y, X))
X, Y, Z = [int(i) for i in input().split()] print("{} {} {}".format(Z, X, Y))
[["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22]]
5
37
a=list(map(int,input().split())) b=[] b.append(a[2]) b.append(a[0]) b.append(b[1]) for i in range(len(b)): print(str(b[i])+' ',end='') print()
a=list(map(int,input().split())) b=[] b.append(a[2]) b.append(a[0]) b.append(a[1]) for i in range(len(b)): print(str(b[i])+' ',end='') print()
[["-", 0, 1, 0, 652, 3, 4, 0, 206, 51, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 206, 51, 22]]
5
81
A,B,C=list(map(int,input().split())) A,B,C=B,C,A print(A,B,C)
A,B,C=list(map(int,input().split())) A,B,C=C,A,B print(A,B,C)
[["-", 0, 656, 0, 1, 0, 662, 12, 432, 0, 22], ["-", 0, 656, 0, 1, 0, 662, 12, 432, 0, 21], ["+", 0, 656, 0, 1, 0, 662, 12, 432, 0, 21], ["+", 0, 656, 0, 1, 0, 662, 12, 432, 0, 22]]
5
40
#include <stdio.h> int main(void) { int a[3]; for (int i = 0; i < 3; i++) { scanf("%d", &a[i]); } printf("%d", a[2]); printf("%d", a[0]); printf("%d", a[1]); }
#include <stdio.h> int main(void) { int a[3]; for (int i = 0; i < 3; i++) { scanf("%d", &a[i]); } printf("%d ", a[2]); printf("%d ", a[0]); printf("%d", a[1]); }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
80
#include <bits/stdc++.h> #include <iostream> using namespace std; int main(void) { int x = 0, y = 0, z = 0; scanf("%d%d%d", &x, &y, &z); printf("%d%d%d\n", z, x, y); return 0; }
#include <bits/stdc++.h> #include <iostream> using namespace std; int main(void) { int x = 0, y = 0, z = 0; scanf("%d%d%d", &x, &y, &z); printf("%d %d %d\n", z, x, y); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
61
#include <bits/stdc++.h> // Include every standard library using namespace std; void fst() { ios::sync_with_stdio(0); cin.tie(0); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); #endif } typedef long long LL; typedef vector<int> vi; typedef vector<vi> vvi; #define fi first #define se second #define mp m...
#include <bits/stdc++.h> // Include every standard library using namespace std; void fst() { ios::sync_with_stdio(0); cin.tie(0); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); #endif } typedef long long LL; typedef vector<int> vi; typedef vector<vi> vvi; #define fi first #define se second #define mp m...
[["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
141
#include <bits/stdc++.h> using namespace std; int main() { int x, y, z; cin >> x >> y >> z; printf("%d %d %d\n", y, z, x); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y, z; cin >> x >> y >> z; printf("%d %d %d\n", z, x, y); return 0; }
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]]
1
44
import sys sys.setrecursionlimit(700000) def s_in(): return input() def n_in(): return int(input()) def l_in(): return list(map(int, input().split())) def print_l(l): print(' '.join(map(str, l))) class Interval(): def __init__(self, li): self.li = li self.n = len(li) sel...
import sys sys.setrecursionlimit(700000) def s_in(): return input() def n_in(): return int(input()) def l_in(): return list(map(int, input().split())) def print_l(l): print(' '.join(map(str, l))) class Interval(): def __init__(self, li): self.li = li self.n = len(li) sel...
[["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]]
5
219
# A A, B, C = map(int,input().split()) print(C, B, A)
# A A, B, C = map(int,input().split()) print(C, A, B)
[["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]]
5
27
x,y,z = map(int(input())) print(str(z)+" " +str(x)+" "+str(y) )
x,y,z = map(int,input().split()) print(str(z)+" " +str(x)+" "+str(y) )
[["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24]]
5
40
#include "bits/stdc++.h" #define fio \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define all(V) (V).begin(), (V).end() ...
#include "bits/stdc++.h" #define fio \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define all(V) (V).begin(), (V).end() ...
[["-", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
65
#include <bits/stdc++.h> using namespace std; #define int long long #define double long double #define fo(a, b) for (int a = 0; a < b; a++) #define Sort(a) sort(a.begin(), a.end()) #define rev(a) reverse(a.begin(), a.end()) #define fi first #define se second #define sz size() #define bgn begin() #define en end() #defin...
#include <bits/stdc++.h> using namespace std; #define int long long #define double long double #define fo(a, b) for (int a = 0; a < b; a++) #define Sort(a) sort(a.begin(), a.end()) #define rev(a) reverse(a.begin(), a.end()) #define fi first #define se second #define sz size() #define bgn begin() #define en end() #defin...
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
1,837
#include <math.h> #include <stdio.h> #include <stdlib.h> int main() { int a, b, c; scanf("%d %d %d", a, b, c); int tmp; tmp = a; a = b; b = tmp; tmp = a; a = c; c = tmp; printf("%d %d %d", a, b, c); return 0; }
#include <math.h> #include <stdio.h> #include <stdlib.h> int main() { int a, b, c; scanf("%d %d %d", &a, &b, &c); int tmp; tmp = a; a = b; b = tmp; tmp = a; a = c; c = tmp; printf("%d %d %d", a, b, c); return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]]
0
75
def resolve(): a, b, c = map(int, input().split()) a, b = b, a a, c = c, a return print(a, b, c) if __name__ == "__main__": resolve
def resolve(): a, b, c = map(int, input().split()) a, b = b, a a, c = c, a return print(a, b, c) if __name__ == "__main__": resolve()
[["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
54
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); int a = in.nextInt(); ...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); int a = in.nextInt(); ...
[["-", 3, 4, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 3, 4, 0, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 1, 0, 492, 3, 4, 0, 16, 12, 22], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 12, 22]]
3
114
x, y, z = [int(i) for i in input().split()] print(y, z, x)
x, y, z = [int(i) for i in input().split()] print(z, x, y)
[["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]]
5
30
x,y,z = (int(x) for x in input().split()) print(" ".join([z,x,y]))
x,y,z = (str(x) for x in input().split()) print(" ".join([z,x,y]))
[["-", 0, 1, 0, 662, 12, 668, 8, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 668, 8, 652, 63, 22]]
5
39
#include <bits/stdc++.h> using namespace std; #define ll long long int ll const mod = 1e9 + 7; ll power(ll x, ll y, ll p) { // x^y % p ll res = 1; // Initialize result x = x % p; // Update x if it is more than or equal to p while (y > 0) { if (y & 1) // If y is odd, multiply x...
#include <bits/stdc++.h> using namespace std; #define ll long long int ll const mod = 1e9 + 7; ll power(ll x, ll y, ll p) { // x^y % p ll res = 1; // Initialize result x = x % p; // Update x if it is more than or equal to p while (y > 0) { if (y & 1) // If y is odd, multiply x...
[["-", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
146
#include <bits/stdc++.h> using namespace std; int a, b, c; int main() { scanf("%d %d %d", &a, &b, &c); printf("%d %d %d", &c, &a, &b); return 0; }
#include <bits/stdc++.h> using namespace std; int a, b, c; int main() { scanf("%d %d %d", &a, &b, &c); printf("%d %d %d", c, a, b); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]]
1
54
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a, b, c; cout << c << " " << a << " " << b << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << c << " " << a << " " << b << endl; }
[["-", 0, 14, 8, 9, 0, 1, 0, 34, 0, 21], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["-", 8, 9, 0, 1, 0, 34, 12, 34, 0, 21], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152]]
1
45
#include <bits/stdc++.h> using namespace std; #define f(i, x, y) for (int i = x, i##end = y; i <= i##end; ++i) #define d(i, x, y) for (int i = x, i##end = y; i >= i##end; --i) #define ri register int #define ll long long #define il inline int max(int x, int y) { return x > y ? x : y; } int min(int x, int y) { return x ...
#include <bits/stdc++.h> using namespace std; #define f(i, x, y) for (int i = x, i##end = y; i <= i##end; ++i) #define d(i, x, y) for (int i = x, i##end = y; i >= i##end; --i) #define ri register int #define ll long long #define il inline int max(int x, int y) { return x > y ? x : y; } int min(int x, int y) { return x ...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
122
X,Y,Z=map(int,input().split(" ")) print(Z,Y,X)
X,Y,Z=map(int,input().split(" ")) print(Z,X,Y)
[["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]]
5
29
#include <algorithm> #include <iostream> using namespace std; int main() { int X, Y, Z; cin >> X >> Y >> Z; swap(X, Y), swap(X, Z); cout << X << ' ' << Y << ' ' << endl; return 0; }
#include <algorithm> #include <iostream> using namespace std; int main() { int X, Y, Z; cin >> X >> Y >> Z; swap(X, Y), swap(X, Z); cout << X << ' ' << Y << ' ' << Z << endl; return 0; }
[["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151]]
1
62
#include <bits/stdc++.h> //#define cin (type == 0?cin:fin) //#define cout (type == 0?cout:fout) #define tcn cin.tie(0); #define tct cout.tie(0); #define r_0 return 0 #define ll long long #define TIME ios_base::sync_with_stdio(0); using namespace std; const long long N = 1e3 + 7; const long long MrBeast = 1e9; ll T = ...
#include <bits/stdc++.h> //#define cin (type == 0?cin:fin) //#define cout (type == 0?cout:fout) #define tcn cin.tie(0); #define tct cout.tie(0); #define r_0 return 0 #define ll long long #define TIME ios_base::sync_with_stdio(0); using namespace std; const long long N = 1e3 + 7; const long long MrBeast = 1e9; ll T = ...
[["-", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
123
#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 >= ...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]]
1
128
from sys import * a,b,c = map(int,input.split()) print(c, a, b)
from sys import * a,b,c = map(int,input().split()) print(c, a, b)
[["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 24], ["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 25]]
5
28
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); System.out.println(c + "" + a + "" + b); } }
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); System.out.println(c + " " + a + " " + b); } }
[["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 491], ["+", 3, 4, 0, 16, 31, 16, 12, 5, 0, 491]]
3
81
#include <bits/stdc++.h> #define TASK "task" using namespace std; void rwFile() { freopen(TASK ".in", "r", stdin); freopen(TASK ".out", "w", stdout); } void solveA() { int x, y, z; cin >> x >> y >> z; cout << z << ' ' << x << ' ' << y; } int main() { ios_base::sync_with_stdio(0); cin.tie(nullptr); c...
#include <bits/stdc++.h> #define TASK "task" using namespace std; void rwFile() { freopen(TASK ".in", "r", stdin); freopen(TASK ".out", "w", stdout); } void solveA() { int x, y, z; cin >> x >> y >> z; cout << z << ' ' << x << ' ' << y; } int main() { ios_base::sync_with_stdio(0); cin.tie(nullptr); c...
[["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
115
#include <iostream> using namespace std; int main(int argc, char *argv[]) { int a, b, c; cin >> a >> b >> c; cout << c << ' ' << b << ' ' << a << endl; }
#include <iostream> using namespace std; int main(int argc, char *argv[]) { int a, b, c; cin >> a >> b >> c; cout << c << ' ' << a << ' ' << b << endl; return 0; }
[["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13]]
1
53
package main import "fmt" func main() { var X, Y, Z int fmt.Scanf("%d %d %d", &X, &Y, Z) fmt.Println(Z, X, Y) }
package main import "fmt" func main() { var X, Y, Z int fmt.Scanf("%d %d %d", &X, &Y, &Z) fmt.Println(Z, X, Y) }
[["+", 0, 1, 0, 2, 3, 4, 0, 91, 17, 67], ["+", 36, 36, 36, 36, 36, 36, 0, 434, 0, 165]]
7
50
//////////////////////////// ⛎🎱💲♏☢🤘(NOOB 383) //////////////////////////// 🇨🇸🇪 48 //////////////////////////// 🇯🇦🇭🇦🇳🇬🇮🇷🇳🇦🇬🇦🇷 🇺🇳🇮🇻🇪🇷🇸🇮🇹🇾((JU)) #include <bits/stdc++.h> using namespace std; #define LL long long int #define DL double #define MLL map<LL, LL>::iterator #define MSL map<string, L...
//////////////////////////// ⛎🎱💲♏☢🤘(NOOB 383) //////////////////////////// 🇨🇸🇪 48 //////////////////////////// 🇯🇦🇭🇦🇳🇬🇮🇷🇳🇦🇬🇦🇷 🇺🇳🇮🇻🇪🇷🇸🇮🇹🇾((JU)) #include <bits/stdc++.h> using namespace std; #define LL long long int #define DL double #define MLL map<LL, LL>::iterator #define MSL map<string, L...
[["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
208
x,y,z=map(int, input().split) print("{} {} {}".format(z,x,y))
x,y,z=map(int, input().split()) print("{} {} {}".format(z,x,y))
[["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
31
// Apna Time Aayega :) #include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define vpi vector<pair<int, int>> #define ll long long int #define MAX 1000000 #define inf 1000000000 int solve(string x, int n, int k) { double kd = k; int arrayLength = ceil(kd / 2); int grid[arrayLength][26]; for (i...
// Apna Time Aayega :) #include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define vpi vector<pair<int, int>> #define ll long long int #define MAX 1000000 #define inf 1000000000 int solve(string x, int n, int k) { double kd = k; int arrayLength = ceil(kd / 2); int grid[arrayLength][26]; for (i...
[["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
673
#include <bits/stdc++.h> using namespace std; #define ll long long #define int ll #define pii pair<int, int> #define fi first #define se second #define mp(x, y) make_pair(x, y) #define pb(x) pupsh_back(x) int32_t main() { int t; cin >> t; while (t--) { int A, B, C; cin >> A >> B >> C; cout << C << " "...
#include <bits/stdc++.h> using namespace std; #define ll long long #define int ll #define pii pair<int, int> #define fi first #define se second #define mp(x, y) make_pair(x, y) #define pb(x) pupsh_back(x) int32_t main() { int t = 1; while (t--) { int A, B, C; cin >> A >> B >> C; cout << C << " " << A <...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
91
/////////////////////////////////// // ___ // // _..--"\ `|`""--.._ // // .-' \ | `'-. // // / \_|___...----'`\ // // |__,,..--""``(_)--..__ | // // '\ _.--'`.I._ ''--..' // // `''"`,#JGS/_|_\###,---'` // // ,#' _.:`___`:-._ '#, // // #' ...
/////////////////////////////////// // ___ // // _..--"\ `|`""--.._ // // .-' \ | `'-. // // / \_|___...----'`\ // // |__,,..--""``(_)--..__ | // // '\ _.--'`.I._ ''--..' // // `''"`,#JGS/_|_\###,---'` // // ,#' _.:`___`:-._ '#, // // #' ...
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
321
#include <bits/stdc++.h> using namespace std; #define ll long long #define vi vector<int> #define pi pair<int, int> #define pb push_back #define fr first #define sc second #define endl '\n' const int mxn = 1e6 + 5; int arr[mxn]; int n, m, k; void solve() { swap(n, m); swap(n, k); cout << n << " " << m << " " ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define vi vector<int> #define pi pair<int, int> #define pb push_back #define fr first #define sc second #define endl '\n' const int mxn = 1e6 + 5; int arr[mxn]; int n, m, k; void solve() { swap(n, m); swap(n, k); cout << n << " " << m << " " ...
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
156
#include <cstdio> int main() { int a, b, c; scanf("%d%d%d", &a, &b, &c); printf("%d%d%d", c, a, b); return 0; }
#include <cstdio> int main() { int a, b, c; scanf("%d%d%d", &a, &b, &c); printf("%d %d %d", c, a, b); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
47
x,y,z = map(int,inout().split()) print(str(z)+' '+str(x) + ' ' + str(y))
x,y,z = map(int,input().split()) print(str(z)+' '+str(x) + ' ' + str(y))
[["-", 3, 4, 0, 652, 63, 319, 500, 652, 63, 22], ["+", 3, 4, 0, 652, 63, 319, 500, 652, 63, 22]]
5
43
import java.io.*; import java.util.*; /** * Created by Ayushi on 04 Apr 2020. * Problem: * Round: */ public class Main { public static void main(String[] args) throws IOException { StringTokenizer st; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); st = new StringTokenizer(...
import java.io.*; import java.util.*; /** * Created by Ayushi on 04 Apr 2020. * Problem: * Round: */ public class Main { public static void main(String[] args) throws IOException { StringTokenizer st; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); st = new StringTokenizer(...
[["-", 3, 4, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 3, 4, 0, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 1, 0, 492, 3, 4, 0, 16, 12, 22], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 12, 22]]
3
137
a = list(input().split()) print(a[2],a[1],a[0])
a = list(input().split()) print(a[2],a[0],a[1])
[["-", 0, 1, 0, 652, 3, 4, 0, 206, 206, 612], ["+", 0, 1, 0, 652, 3, 4, 0, 206, 206, 612]]
5
29
/** Created by: Humberto Yusta Codeforces User: humbertoyusta Country: Cuba Copyright�� */ #include <bits/stdc++.h> using namespace std; /// Macros: #define int long long #define f first #define s second #define db(x) cerr << #x << ": " << (x) << '\n'; #define pb push_back #define...
/** Created by: Humberto Yusta Codeforces User: humbertoyusta Country: Cuba Copyright�� */ #include <bits/stdc++.h> using namespace std; /// Macros: #define int long long #define f first #define s second #define db(x) cerr << #x << ": " << (x) << '\n'; #define pb push_back #define...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]]
1
326
#include <bits/stdc++.h> using namespace std; #define Speed \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define ll lon...
#include <bits/stdc++.h> using namespace std; #define Speed \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define ll lon...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]]
1
99
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll MOD = 1000000007; int main() { int x, y, z; cin >> x >> y >> x; cout << z << " " << x << " " << y << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll MOD = 1000000007; int main() { int x, y, z; cin >> x >> y >> z; cout << z << " " << x << " " << y << endl; }
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
57
x,y,z=input().split() print(' '.join[z,x,y])
x,y,z=input().split() print(' '.join([z,x,y]))
[["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
28
// </> : towhid1zaman #include "bits/stdc++.h" using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<ll> vll; #define fill(a) memset(a, 0, sizeof(a)) #define all(v) (v).begin(), (v).end() #define sp(k) cout << setprecision(k) << fixed; #define rep(i, a) for ...
// </> : towhid1zaman #include "bits/stdc++.h" using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<ll> vll; #define fill(a) memset(a, 0, sizeof(a)) #define all(v) (v).begin(), (v).end() #define sp(k) cout << setprecision(k) << fixed; #define rep(i, a) for ...
[["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
204
x, y, z =map(int, input().split()) A=[z, x, y] print(' '.join(A))
x, y, z =map(int, input().split()) A=[z, x, y] print(' '.join(map(str, A)))
[["+", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
38
x,y,z=input().split() print(z+" "+x+""+y)
x,y,z=input().split() print(z+" "+x+" "+y)
[["+", 3, 4, 0, 657, 31, 657, 12, 557, 0, 6]]
5
28
#include <stdio.h> int main() { int X, Y, Z; scanf("%d%d%d", &X, &Y, &Z); printf("%d%d%d", Z, X, Y); }
#include <stdio.h> int main() { int X, Y, Z; scanf("%d%d%d", &X, &Y, &Z); printf("%d %d %d", Z, X, Y); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13]]
0
44
#include <stdio.h> int main() { int a, b, c; scanf("%d %d %d", &a, &b, &c); printf("%d %d %d", c, &a, &b); }
#include <stdio.h> int main() { int a, b, c; scanf("%d %d %d", &a, &b, &c); printf("%d %d %d", c, a, b); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13]]
1
46
a,b,c = map(int, input().split()) tmp = a a = b b = tmp tmp = a a = c c = a print("{} {} {}".format(a,b,c))
a,b,c = map(int, input().split()) tmp = a a = b b = tmp tmp = a a = c c = tmp print("{} {} {}".format(a,b,c))
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 22]]
5
51
package main import ( "fmt" ) func main() { var x,y,z,a,b,c int fmt.Scanf("%d%d%d", &x,&y,&z) a=x b=y c=z a=y b=x a=z c=y fmt.Printf("%d%d%d", a,b,c) }
package main import ( "fmt" ) func main() { var x,y,z,a,b,c int fmt.Scanf("%d%d%d", &x,&y,&z) a=x b=y c=z a=y b=x a=z c=y fmt.Printf("%d %d %d", a,b,c) }
[]
7
92
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <forward_list> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> #define rep(i, s, g) for ((i) = (s); (i) < ...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <forward_list> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> #define rep(i, s, g) for ((i) = (s); (i) < ...
[["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]]
1
113
// 2020 0404 161 A #include <algorithm> #include <iostream> #include <queue> #include <vector> #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) using namespace std; typedef long long ll; int main() { int X, Y, Z; cin >> X >> Y >> Z; cout << Z << " " << Y << " " << X << endl; return 0; }
// 2020 0404 161 A #include <algorithm> #include <iostream> #include <queue> #include <vector> #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) using namespace std; typedef long long ll; int main() { int X, Y, Z; cin >> X >> Y >> Z; cout << Z << " " << X << " " << Y << endl; return 0; }
[["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
68
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define ll long long using namespace std; int main() { int x, y, z; cin >> x >> y >> z; int a = x, b = y, c = z; x = c; y = a; z = b; cout << x << " " << y << " " << endl; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define ll long long using namespace std; int main() { int x, y, z; cin >> x >> y >> z; int a = x, b = y, c = z; x = c; y = a; z = b; cout << x << " " << y << " " << z << endl; }
[["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151]]
1
79
def main(): x,y,z = map(int, input().split()) print(z,y,y) if __name__ == '__main__': main()
def main(): x,y,z = map(int, input().split()) print(z,x,y) if __name__ == '__main__': main()
[["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22]]
5
41
s = list(map(int, input().split())) c = s[-1] s.pop(-1) s.insert(0,c) print(s)
s = list(map(int, input().split())) c = s[-1] s.pop(-1) s.insert(0,c) print(*s)
[["+", 0, 1, 0, 652, 3, 4, 0, 661, 0, 48]]
5
43
#include <iostream> #include <vector> using namespace std; int main() { vector<int> box(3); vector<int> swap(3); for (int i = 0; i < 2; i++) { cin >> box[i]; } swap[0] = box[2]; swap[1] = box[0]; swap[2] = box[1]; cout << swap[0] << " " << swap[1] << " " << swap[2] << endl; }
#include <iostream> #include <vector> using namespace std; int main() { vector<int> box(3); vector<int> swap(3); for (int i = 0; i < 3; i++) { cin >> box[i]; } swap[0] = box[2]; swap[1] = box[0]; swap[2] = box[1]; cout << swap[0] << " " << swap[1] << " " << swap[2] << endl; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
112
A = input().split() A[0], A[1] = A[1], A[0] A[1], A[2] = A[2], A[1] print(*A)
A = input().split() A[0], A[1] = A[1], A[0] A[0], A[2] = A[2], A[0] print(*A)
[["-", 0, 1, 0, 662, 31, 684, 0, 206, 206, 612], ["+", 0, 1, 0, 662, 31, 684, 0, 206, 206, 612], ["-", 0, 1, 0, 662, 12, 432, 0, 206, 206, 612], ["+", 0, 1, 0, 662, 12, 432, 0, 206, 206, 612]]
5
52
x, y, z = map(int, input().split()) print(z + " " + x + " " + y)
x, y, z = map(str, input().split()) print(z + " " + x + " " + y)
[["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22]]
5
34
#define _CRT_SECURE_NO_WARNINGS #include <ctype.h> #include <inttypes.h> #include <limits.h> #include <math.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <wchar.h> #define N_MAX (100) #define P_MAX (100) #define DP_ARRAY_SIZE (N_MAX * P_MAX / 32 + 1) ...
#define _CRT_SECURE_NO_WARNINGS #include <ctype.h> #include <inttypes.h> #include <limits.h> #include <math.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <wchar.h> #define N_MAX (100) #define P_MAX (100) #define DP_ARRAY_SIZE (N_MAX * P_MAX / 32 + 1) ...
[["-", 0, 2, 3, 4, 0, 61, 0, 5, 0, 6], ["+", 0, 2, 3, 4, 0, 61, 0, 5, 0, 6]]
0
2,707
X,Y,Z=map(int,input().split()) A=[Z,Y,X] print(*A)
X,Y,Z=map(int,input().split()) A=[Z,X,Y] print(*A)
[["-", 0, 656, 0, 1, 0, 662, 12, 634, 0, 22], ["-", 0, 656, 0, 1, 0, 662, 12, 634, 0, 21], ["+", 0, 656, 0, 1, 0, 662, 12, 634, 0, 21], ["+", 0, 656, 0, 1, 0, 662, 12, 634, 0, 22]]
5
32
#include <stdio.h> #include <stdlib.h> int main() { int box[3]; scanf("%d", &box[1]); scanf("%d", &box[2]); scanf("%d", &box[0]); for (int i = 0; i < 3; i++) { printf("%d", box[i]); } return 0; }
#include <stdio.h> #include <stdlib.h> int main() { int box[3]; scanf("%d", &box[1]); scanf("%d", &box[2]); scanf("%d", &box[0]); for (int i = 0; i < 3; i++) { printf("%d ", box[i]); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
86
#include <stdio.h> #include <stdlib.h> #include <string.h> #define ll long long #define INF 1 << 31 - 1 #define LNF 9223372036854775807 #define PI 3.14159265358979 #define MIN(x, y) ((x) < (y) ? (x) : (y)) #define MAX(x, y) ((x) < (y) ? (y) : (x)) #define FOR(i, a, n) for (i = a; i < n; i++) #define MOD 1000000007 //#...
#include <stdio.h> #include <stdlib.h> #include <string.h> #define ll long long #define INF 1 << 31 - 1 #define LNF 9223372036854775807 #define PI 3.14159265358979 #define MIN(x, y) ((x) < (y) ? (x) : (y)) #define MAX(x, y) ((x) < (y) ? (y) : (x)) #define FOR(i, a, n) for (i = a; i < n; i++) #define MOD 1000000007 //#...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
590
#include <bits/stdc++.h> using namespace std; int main() { int x, y, z; cin >> x >> y >> z; cout << z << ' ' << x << ' ' << z << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y, z; cin >> x >> y >> z; cout << z << ' ' << x << ' ' << y << endl; }
[["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
45
x, y, z = gets.split(' ') p "#{z} #{x} #{y}"
x, y, z = gets.split(' ') print "#{z} #{x} #{y}"
[["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22]]
4
28
n,m = map(int,input().split()) a = list(map(int,input().split())) a.sort(reverse=True) ans = 0 for i in a: if i > sum(a)/(4*m): ans += 1 if ans == m: print("Yes") exit() else: print("No") exit()
n,m = map(int,input().split()) a = list(map(int,input().split())) a.sort(reverse=True) ans = 0 for i in a: if i >= sum(a)/(4*m): ans += 1 if ans == m: print("Yes") exit() else: print("No") exit()
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]]
5
91
n,m = map(int,input().split()) a = list(map(int,input().split())) sum = 0 cnt = 0 for i in a: sum += i for i in a: if(sum < 4*m*i): cnt += 1 if(cnt >= m): print("Yes") else: print("No")
n,m = map(int,input().split()) a = list(map(int,input().split())) sum = 0 cnt = 0 for i in a: sum += i for i in a: if(sum <= 4*m*i): cnt += 1 if(cnt >= m): print("Yes") else: print("No")
[["-", 8, 196, 0, 57, 15, 23, 0, 666, 667, 18], ["+", 8, 196, 0, 57, 15, 23, 0, 666, 667, 19]]
5
87
n,m=map(int,input().split()) a=list(map(int,input().split())) a.sort(reverse=True) total=0 for i in range(m): if a[i]>(sum(a)/(4*m)): total+=1 if total==m: print("Yes") else: print("No")
n,m=map(int,input().split()) a=list(map(int,input().split())) a.sort(reverse=True) total=0 for i in range(m): if a[i]>=(sum(a)/(4*m)): total+=1 if total==m: print("Yes") else: print("No")
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]]
5
93
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; using ll = long long; using ull = unsigned long long; using vl = vector<ll>; using vi = vector<int>; using vchar = vector<char>; using vstr = vector<string>; using pl...
#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; using ll = long long; using ull = unsigned long long; using vl = vector<ll>; using vi = vector<int>; using vchar = vector<char>; using vstr = vector<string>; using pl...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 39, 40]]
1
252
#include <bits/stdc++.h> using namespace std; int main() { int N, M, sum, cond, count; sum = 0; count = 0; cin >> N >> M; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A[i]; sum += A[i]; } cond = sum / (4 * M); for (int i = 0; i < N; i++) { if (A[i] * 4 * M > sum) { count...
#include <bits/stdc++.h> using namespace std; int main() { int N, M, sum, cond, count; sum = 0; count = 0; cin >> N >> M; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A[i]; sum += A[i]; } cond = sum / (4 * M); for (int i = 0; i < N; i++) { if (A[i] * 4 * M >= sum) { coun...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
143
N, M = map(int,input().split()) A = list(map(int,input().split())) B = sorted(A,reverse=True) judge = sum(A) / (4*M) if B[M-1] <= judge: print('No') else: print('Yes')
N, M = map(int,input().split()) A = list(map(int,input().split())) B = sorted(A,reverse=True) judge = sum(A) / (4*M) if B[M-1] < judge: print('No') else: print('Yes')
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18]]
5
79
n,m = map(int,input().split()) l = list(map(int,input().split())) l.sort(reverse=True) for i in range(m) : if l[i] < (sum(l))/4*m : print('No') exit() else : continue print('Yes')
n,m = map(int,input().split()) l = list(map(int,input().split())) l.sort(reverse=True) for i in range(m) : if l[i] < sum(l)/(4*m) : print('No') exit() else : continue print('Yes')
[["-", 15, 666, 0, 657, 31, 657, 31, 23, 0, 24], ["-", 31, 657, 31, 23, 0, 652, 3, 4, 0, 25], ["+", 0, 57, 15, 666, 0, 657, 12, 23, 0, 24], ["+", 0, 57, 15, 666, 0, 657, 12, 23, 0, 25]]
5
84
#include <stdio.h> int main(void) { int n, m; scanf("%d %d", &n, &m); int a[n], c = 0, d = 0; for (int i = 0; i < n; i++) { scanf("%d", &a[i]); c += a[i]; } for (int i = 0; i < n; i++) { if (c / (4 * m) <= a[i]) { d++; } } if (d >= m) { printf("Yes\n"); } else { printf("...
#include <stdio.h> int main(void) { int n, m; scanf("%d %d", &n, &m); int a[n], c = 0, d = 0; for (int i = 0; i < n; i++) { scanf("%d", &a[i]); c += a[i]; } for (int i = 0; i < n; i++) { if ((double)c / (4 * m) <= a[i]) { d++; } } if (d >= m) { printf("Yes\n"); } else { ...
[["+", 15, 23, 0, 16, 31, 16, 31, 74, 0, 24], ["+", 0, 16, 31, 16, 31, 74, 39, 77, 39, 40], ["+", 15, 23, 0, 16, 31, 16, 31, 74, 0, 25]]
0
143
#include <bits/stdc++.h> #define int long long #define ci(m) for (int i = 0; i < m; i++) #define cj(m) for (int j = 0; j < m; j++) #define ck(m) for (int k = 0; k < m; k++) #define gcd __gcd #define endl "\n" #define pb emplace_back #define setbits(x) __builtin_popcountll(x) #define zrobits(x) __builtin_ctzll(x) #defi...
#include <bits/stdc++.h> #define int long long #define ci(m) for (int i = 0; i < m; i++) #define cj(m) for (int j = 0; j < m; j++) #define ck(m) for (int k = 0; k < m; k++) #define gcd __gcd #define endl "\n" #define pb emplace_back #define setbits(x) __builtin_popcountll(x) #define zrobits(x) __builtin_ctzll(x) #defi...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 49, 22], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 49, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["-", 51, 16, 12, 69, 341, 342, 0, 16, 31, 22], ["+", 51, 16, 12,...
1
216
#include <algorithm> #include <iomanip> #include <iostream> #include <string> #include <vector> using namespace std; int main() { int n, m; cin >> n >> m; int a[n], sum = 0; for (int i = 0; i < n; i++) { cin >> a[i]; sum += a[i]; } sort(a, a + n); int cnt = 0; for (int i = n - 1; i >= 0; i--) {...
#include <algorithm> #include <iomanip> #include <iostream> #include <string> #include <vector> using namespace std; int main() { int n, m; cin >> n >> m; int a[n], sum = 0; for (int i = 0; i < n; i++) { cin >> a[i]; sum += a[i]; } sort(a, a + n); int cnt = 0; for (int i = n - 1; i >= 0; i--) {...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
145
#include <stdio.h> int main() { int m, n, i, score, check; int a[1001]; scanf("%d %d", &n, &m); score = 0; for (i = 1; i <= n; i++) { scanf("%d", &a[i]); score += a[i]; } check = 0; for (i = 1; i <= n; i++) { if (a[i] >= score / (4 * m)) { check += 1; } } if (check >= m) ...
#include <stdio.h> int main() { int m, n, i, score, check; int a[1001]; scanf("%d %d", &n, &m); score = 0; for (i = 1; i <= n; i++) { scanf("%d", &a[i]); score += a[i]; } check = 0; for (i = 1; i <= n; i++) { // printf("%f\n",(double) score / (4*m)); if (a[i] >= (double)score / (4 *...
[["+", 15, 23, 0, 16, 12, 16, 31, 74, 0, 24], ["+", 0, 16, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 15, 23, 0, 16, 12, 16, 31, 74, 0, 25]]
0
145
n,m = map(int,input().split()) A = list(map(int,input().split())) sum = 0 for i in A: sum += i A.sort() if A[m-1] > sum/(4*m): print("Yes") else: print("No")
n,m = map(int,input().split()) A = list(map(int,input().split())) sum = 0 for i in A: sum += i A.sort(reverse=True) if A[m-1] >= sum/(4*m): print("Yes") else: print("No")
[["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 51, 146], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20]]
5
79
#include <algorithm> #include <cctype> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <math.h> #include <stdio.h> #include <string> #include <vector> using namespace std; const int mod = 1000000007; #define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0])) #define ll long long ...
#include <algorithm> #include <cctype> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <math.h> #include <stdio.h> #include <string> #include <vector> using namespace std; const int mod = 1000000007; #define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0])) #define ll long long ...
[["+", 51, 16, 31, 16, 12, 74, 39, 77, 39, 40], ["+", 15, 339, 51, 16, 31, 16, 12, 74, 0, 25], ["+", 51, 16, 31, 16, 12, 74, 51, 23, 0, 24], ["+", 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
164
n,m = map(int,input().split()) a = list(map(int,input().split())) a.sort(reverse=True) if a[m] < sum(a) / (4*m): print('No') else: print('Yes')
n,m = map(int,input().split()) a = list(map(int,input().split())) a.sort(reverse=True) if a[m-1] < (sum(a) / (4*m)): print('No') else: print('Yes')
[["+", 0, 57, 15, 666, 0, 206, 206, 657, 17, 33], ["+", 0, 57, 15, 666, 0, 206, 206, 657, 12, 612], ["+", 0, 656, 0, 57, 15, 666, 0, 23, 0, 24], ["+", 15, 666, 0, 23, 0, 657, 12, 23, 0, 25]]
5
72
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; int total = 0; vector<int> vec(n); for (int i = 0; i < n; i++) { cin >> vec.at(i); total += vec.at(i); } sort(vec.begin(), vec.end()); reverse(vec.begin(), vec.end()); if (vec.at(m - 1) >= total / (4 * m)) { ...
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; int total = 0; vector<int> vec(n); for (int i = 0; i < n; i++) { cin >> vec.at(i); total += vec.at(i); } sort(vec.begin(), vec.end()); reverse(vec.begin(), vec.end()); if (vec.at(m - 1) >= (double)total / (4 * ...
[["+", 15, 339, 51, 16, 12, 16, 31, 74, 0, 24], ["+", 51, 16, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 15, 339, 51, 16, 12, 16, 31, 74, 0, 25]]
1
141
N,M = map(int,input().split()) array = list(map(int,input().split())) total = sum(array) count = 0 for i in range(N): if array[i] > total / (4*M) : count += 1 print( 'Yes' if count >= M else 'No')
N,M = map(int,input().split()) array = list(map(int,input().split())) total = sum(array) count = 0 for i in range(N): if array[i] < total / (4*M) : continue else: count += 1 print('Yes' if count >= M else 'No')
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 656, 0, 7, 8, 196, 0, 57, 0, 102], ["+", 8, 196, 0, 57, 64, 196, 0, 116, 0, 117], ["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95]]
5
81
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*(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())) s=sum(a) cnt=0 for i in range(n): if a[i] >= s/(4*m): cnt += 1 if cnt>=m: 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]]
5
88
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; using ll = long long; int main() { int N, M; cin >> N >> M; int sum = 0; vector<int> A(N); rep(i, N) { cin >> A[i]; sum += A[i]; } int cnt = 0; rep(i, N) { if (A[i] >= (double)(sum / (4 * M))) ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; using ll = long long; int main() { int N, M; cin >> N >> M; double sum = 0; vector<int> A(N); rep(i, N) { cin >> A[i]; sum += A[i]; } int cnt = 0; rep(i, N) { if (A[i] >= (double)(sum / (4 * M))) ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
135
N, M = map(int, input().split()) A = sorted([int(x) for x in input().split()], reverse=True) sumA = sum(A) if A[M - 1] > sumA / (4 * M): print("Yes") else: print('No')
N, M = map(int, input().split()) A = sorted([int(x) for x in input().split()], reverse=True) sumA = sum(A) if A[M - 1] >= sumA / (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
77
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ll long long #define BIT_FLAG_0 (1 << 0) // 0000 0000 0000 0001 int gcd(int a, int b) { if (a % b == 0) { return b; } else { return gcd(b, a % b); } } int main() { int n, m; ll sum = 0; cin >>...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ll long long #define BIT_FLAG_0 (1 << 0) // 0000 0000 0000 0001 int gcd(int a, int b) { if (a % b == 0) { return b; } else { return gcd(b, a % b); } } int main() { int n, m; ll sum = 0; cin >>...
[["+", 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
184
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; vector<int> a(n); int sum = 0; for (int i = 0; i < n; i++) { cin >> a.at(i); sum += a.at(i); } int min = sum / (4 * m); sort(a.begin(), a.end()); reverse(a.begin(), a.end()); bool e = true; for (int i = 0;...
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; vector<int> a(n); double sum = 0; for (int i = 0; i < n; i++) { cin >> a.at(i); sum += a.at(i); } double min = sum / (4 * m); sort(a.begin(), a.end()); reverse(a.begin(), a.end()); bool e = true; for (int ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
175
n,m,*a=gets.split.map &:to_i s=a.sum puts a.count{4*m*_1>=s}>=m ? :Yes: :No
n,m,*a=`dd`.split.map &:to_i s=a.sum puts a.count{4*m*_1>=s}>=m ? :Yes: :No
[["-", 0, 493, 0, 662, 12, 652, 486, 652, 486, 22], ["+", 0, 662, 12, 652, 486, 652, 486, 786, 0, 585], ["+", 0, 662, 12, 652, 486, 652, 486, 786, 0, 6]]
4
38
n, m = map(int, input().split()) A = list(map(int, input().split())) sorted_A = list(reversed(sorted(A))) print("No" if sorted_A[m] < sum(A)/(4*m) else "Yes")
n, m = map(int, input().split()) A = list(map(int, input().split())) sorted_A = list(reversed(sorted(A))) print("No" if sorted_A[m-1] < sum(A)/(4*m) else "Yes")
[["+", 0, 41, 0, 666, 0, 206, 206, 657, 17, 33], ["+", 0, 41, 0, 666, 0, 206, 206, 657, 12, 612]]
5
71
N, M = list(map(int, input().split())) A = list(map(int, input().split())) A = sorted(A, reverse=True) S = sum(A) ans = "No" for i in range(M): if A[i] >= S // (4 * M): ans = "Yes" else: ans = "No" break print(ans)
N, M = list(map(int, input().split())) A = list(map(int, input().split())) A = sorted(A, reverse=True) S = sum(A) ans = "No" for i in range(M): if A[i] >= S / (4 * M): ans = "Yes" else: 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
96
#define _USE_MATH_DEFINES #include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string> #include <time.h> #include <vector> typed...
#define _USE_MATH_DEFINES #include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string> #include <time.h> #include <vector> typed...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
210
#include <algorithm> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <queue> #include <string> #include <vector> using namespace std; using ll = long long; using pint = pair<int, int>; int main() { int N, M; cin >> N >> M; int total = 0; vector<int> A(N); for (int i = 0;...
#include <algorithm> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <queue> #include <string> #include <vector> using namespace std; using ll = long long; using pint = pair<int, int>; int main() { int N, M; cin >> N >> M; double total = 0; vector<double> A(N); for (int ...
[["-", 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], ["+", 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
161
#include <bits/stdc++.h> const int INF = 1e9; const int MOD = 1e9 + 7; using namespace std; typedef long long ll; #define REP(i, n) for (int i = 0; i < int(n); i++) #define REPD(i, n) for (int i = n - 1; i >= 0; i--) #define FOR(i, a, b) for (int i = a; i < int(b); i++) #define FORD(i, a, b) for (int i = b - 1; i >...
#include <bits/stdc++.h> const int INF = 1e9; const int MOD = 1e9 + 7; using namespace std; typedef long long ll; #define REP(i, n) for (int i = 0; i < int(n); i++) #define REPD(i, n) for (int i = n - 1; i >= 0; i--) #define FOR(i, a, b) for (int i = a; i < int(b); i++) #define FORD(i, a, b) for (int i = b - 1; 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
214
#include <bits/stdc++.h> using namespace std; int main() { int N, M, count = 0, sum = 0; cin >> N >> M; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A.at(i); sum += A.at(i); } double K = sum / (4 * M); for (int i = 0; i < N; i++) { if (A.at(i) >= K) { count++; } } if (...
#include <bits/stdc++.h> using namespace std; int main() { int N, M, count = 0, sum = 0; cin >> N >> M; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A.at(i); sum += A.at(i); } double K = sum / (4.0 * M); for (int i = 0; i < N; i++) { if (A.at(i) >= (double)K) { count++; } ...
[["-", 49, 50, 51, 16, 12, 23, 0, 16, 31, 13], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 31, 13], ["+", 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
144
#include <bits/stdc++.h> using namespace std; int main() { int N, M, count = 0, sum = 0; cin >> N >> M; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A.at(i); sum += A.at(i); } for (int i = 0; i < N; i++) { if (A.at(i) >= sum / (4 * M)) { count++; } } if (count >= M) { ...
#include <bits/stdc++.h> using namespace std; int main() { int N, M, count = 0, sum = 0; cin >> N >> M; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A.at(i); sum += A.at(i); } for (int i = 0; i < N; i++) { if (A.at(i) >= (double)sum / (4 * M)) { count++; } } if (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
139
N, M = map(int, input().split()) A = list(map(int, input().split())) A.sort(reverse=True) sum_A = sum(A) for i in range(M): if A[i] < sum_A / (4.0): print('No') exit() print('Yes')
N, M = map(int, input().split()) A = list(map(int, input().split())) A.sort(reverse=True) sum_A = sum(A) for i in range(M): if A[i] < sum_A / (4.0 * M): print('No') exit() print('Yes')
[["+", 15, 666, 0, 657, 12, 23, 0, 657, 17, 48], ["+", 15, 666, 0, 657, 12, 23, 0, 657, 12, 22]]
5
82
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define EFOR(i, a, b) for (int i = (a); i <= (b); ++i) #define REP(i, n) FOR(i, 0, n) int main(void) { int M, N, MVote = 0, tmpm = 0; cin >> N >> M; tmpm = M; vector<int> A(1010, 0); REP(i...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define EFOR(i, a, b) for (int i = (a); i <= (b); ++i) #define REP(i, n) FOR(i, 0, n) int main(void) { double M, N, MVote = 0, tmpm = 0; cin >> N >> M; tmpm = M; vector<int> A(1010, 0); RE...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 72], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
163