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
| change_count
int64 0
100
|
|---|---|---|---|---|---|
for a in range(1,10):
for b in range(1,10):
i = a * b
print((a,"x",b,"=",i))
|
for a in range(1,10):
for b in range(1,10):
i = a * b
print(a,"x",b,"=",i,sep="")
|
[["-", 0, 1, 0, 652, 3, 4, 0, 660, 0, 24], ["-", 0, 1, 0, 652, 3, 4, 0, 660, 0, 25], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 654], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 655]]
| 5
| 43
| 7
|
for i in range(1,10):
for j in range(1,10):
print(str(i),"x", str(j),"=", str(i*j))
|
for i in range(1,10):
for j in range(1,10):
print(str(i)+"x"+str(j)+"="+str(i*j))
|
[["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 657, 31, 657, 31, 657, 31, 657, 17, 72], ["+", 3, 4, 0, 657, 31, 657, 31, 657, 17, 72], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72]]
| 5
| 47
| 8
|
for i in range(1, 10):
for j in range(1, 10):
print(str(i)+'×'+str(j)+'='+str(i*j))
exit()
|
for i in range(1, 10):
for j in range(1, 10):
print(str(i)+'x'+str(j)+'='+str(i*j))
exit()
|
[["-", 31, 657, 31, 657, 31, 657, 12, 557, 0, 6], ["+", 31, 657, 31, 657, 31, 657, 12, 557, 0, 6]]
| 5
| 50
| 2
|
# Vol0000.
import sys
def main():
for i in range(9):
for k in range(9):
print(str(i) + "x" + str(k) + "=" + str(i * k))
if __name__ == "__main__":
main()
|
# Vol0000.
import sys
def main():
for i in range(1, 10):
for k in range(1, 10):
print(str(i) + "x" + str(k) + "=" + str(i * k))
if __name__ == "__main__":
main()
|
[["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 21]]
| 5
| 61
| 8
|
for i in range(1,10):
for j in range(1,10):
print(i,"x",j,"=",i*j,)
|
for i in range(1,10):
for j in range(1,10):
print(i,"x",j,"=",i*j,sep="")
|
[["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 654], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 655]]
| 5
| 39
| 4
|
print(*[''.join(str(i)+'x'+str(j)+'='+str(i*j)) for j in range(1,10) for i in range(1,10)], sep='\n')
|
print(*[''.join(str(i)+'x'+str(j)+'='+str(i*j)) for i in range(1,10) for j in range(1,10)], sep='\n')
|
[["-", 3, 4, 0, 661, 0, 658, 0, 659, 31, 22], ["+", 3, 4, 0, 661, 0, 658, 0, 659, 31, 22]]
| 5
| 60
| 10
|
x = 0
y = 0
for i in range(1,10):
x += 1
y = 0
for j in range(1,10):
y += 1
print("{}×{}={}".format(x,y,x*y))
|
x = 0
y = 0
for i in range(1,10):
x += 1
y = 0
for j in range(1,10):
y += 1
print("{}x{}={}".format(x,y,x*y))
|
[["-", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6], ["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6]]
| 5
| 52
| 2
|
[[print("{}+{}={}".format(i,j,i*j))for j in range(1,10)]for i in range(1,10)]
|
[[print("{}x{}={}".format(i,j,i*j))for j in range(1,10)]for i in range(1,10)]
|
[["-", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6], ["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6]]
| 5
| 39
| 2
|
def kuku():
for x in range(1,10):
for y in range(1,10):
print((str(x) + '*' + str(y) + '=' + str(x*y)))
if __name__ == '__main__':
kuku()
|
#-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: sato
#
# Created: 19/10/2013
# Copyright: (c) sato 2013
# Licence: <your licence>
#-------------------------------------------------------------------------------
def kuku():
for x in range(1,10):
for y in range(1,10):
print((str(x) + 'x' + str(y) + '=' + str(x*y)))
if __name__ == '__main__':
kuku()
|
[["-", 31, 657, 31, 657, 31, 657, 12, 557, 0, 6], ["+", 31, 657, 31, 657, 31, 657, 12, 557, 0, 6]]
| 5
| 64
| 2
|
for x in range(9):
for y in range(9):
print(str(x + 1) + "*" + str(y + 1) + "=" + str((x + 1) * (y + 1)))
|
for x in range(9):
for y in range(9):
print(str(x + 1) + "x" + str(y + 1) + "=" + str((x + 1) * (y + 1)))
|
[["-", 31, 657, 31, 657, 31, 657, 12, 557, 0, 6], ["+", 31, 657, 31, 657, 31, 657, 12, 557, 0, 6]]
| 5
| 55
| 2
|
for i in range(10):
for j in range(10):
print("%dx%d=%d" % (i, j, i*j))
|
#coding: UTF-8
for i in range(1, 10):
for j in range(1, 10):
print("%dx%d=%d" % (i, j, i*j))
|
[["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 21]]
| 5
| 32
| 4
|
x = list(range(1,10))
for i in x:
for j in x:
print("%d+%d=%d"%(i, j, i*j))
|
x = list(range(1,10))
for i in x:
for j in x:
print("%dx%d=%d"%(i, j, i*j))
|
[["-", 0, 652, 3, 4, 0, 657, 31, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 657, 31, 557, 0, 6]]
| 5
| 37
| 2
|
#include <stdio.h>
int main(void) {
int a;
int fir = 0, sec = 0, thi = 0;
int i;
for (i = 0; i < 10; i++) {
scanf("%d", &a);
if (a >= fir) {
thi = sec;
sec = thi;
fir = a;
} else if (a >= sec) {
thi = sec;
sec = a;
} else if (a >= thi) {
thi = a;
}
}
printf("%d\n%d\n%d\n", fir, sec, thi);
return 0;
}
|
#include <stdio.h>
int main(void) {
int a;
int fir = 0, sec = 0, thi = 0;
int i;
for (i = 0; i < 10; i++) {
scanf("%d", &a);
if (a >= fir) {
thi = sec;
sec = fir;
fir = a;
} else if (a >= sec) {
thi = sec;
sec = a;
} else if (a >= thi) {
thi = a;
}
}
printf("%d\n%d\n%d\n", fir, sec, thi);
return 0;
}
|
[["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 22]]
| 0
| 124
| 2
|
#include <stdio.h>
int main(void) {
int tall[10];
int a, b, c, i;
a = 0;
b = 0;
c = 0;
for (i = 0; i <= 954; i++) {
scanf("%d", &tall[i]);
if (a <= tall[i]) {
c = b;
b = a;
a = tall[i];
} else if (b <= tall[i]) {
c = b;
b = tall[i];
} else if (c <= tall[i]) {
c = tall[i];
}
}
printf("%d\n%d\n%d\n", a, b, c);
return 0;
}
|
#include <stdio.h>
int main(void) {
int tall[10];
int a, b, c, i;
a = 0;
b = 0;
c = 0;
for (i = 0; i <= 9; i++) {
scanf("%d", &tall[i]);
if (a <= tall[i]) {
c = b;
b = a;
a = tall[i];
} else if (b <= tall[i]) {
c = b;
b = tall[i];
} else if (c <= tall[i]) {
c = tall[i];
}
}
printf("%d\n%d\n%d\n", a, b, c);
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
| 0
| 153
| 2
|
#include <stdio.h>
int main(void) {
int a[10], i, top1 = 0, top2 = 0, top3 = 0;
for (i = 0; i < 10; i++) {
scanf("%d", &a[i]);
if (a[i] > top1) {
top3 = top2;
top2 = top1;
top1 = a[i];
} else if (top1 > a[i] && a[i] > top2) {
top3 = top2;
top2 = a[i];
} else if (top2 > a[i] && a[i] > top3) {
top3 = a[i];
}
}
printf("%d\n%d\n%d\n", top1, top2, top3);
return (0);
}
|
#include <stdio.h>
int main(void) {
int a[10], i, top1 = 0, top2 = 0, top3 = 0;
for (i = 0; i < 10; i++) {
scanf("%d", &a[i]);
if (a[i] > top1) {
top3 = top2;
top2 = top1;
top1 = a[i];
} else if (top1 >= a[i] && a[i] >= top2) {
top3 = top2;
top2 = a[i];
} else if (top2 > a[i] && a[i] >= top3) {
top3 = a[i];
}
}
printf("%d\n%d\n%d\n", top1, top2, top3);
return (0);
}
|
[["-", 0, 57, 15, 23, 0, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 20], ["-", 0, 57, 15, 23, 0, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 17, 20]]
| 0
| 162
| 6
|
#include <stdio.h>
int main(void) {
int a[10], i, j, tmp;
for (i = 0; i < 10; i++) {
scanf("%d", &a[i]);
}
for (i = 0; i < 9; i++) {
for (j = 9; j > i; j--) {
if (a[j - 1] < a[j]) {
tmp = a[j];
a[j] = a[j - 1];
a[j - 1] = tmp;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d", a[i]);
}
}
|
#include <stdio.h>
int main(void) {
int a[10], i, j, tmp;
for (i = 0; i < 10; i++) {
scanf("%d", &a[i]);
}
for (i = 0; i < 9; i++) {
for (j = 9; j > i; j--) {
if (a[j - 1] < a[j]) {
tmp = a[j];
a[j] = a[j - 1];
a[j - 1] = tmp;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", a[i]);
}
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 150
| 1
|
#include <stdio.h>
typedef unsigned char U1;
typedef int S4;
#define NUM_MOUNTAINS (10)
#define INVALID_DATA (-1)
#define NUM_OUTPUTS (3)
S4 main() {
S4 s4_t_i; /* loop counter */
S4 s4_t_j; /* loop counter */
S4 s4_tp_height[NUM_MOUNTAINS];
U1 u1_t_delimiter;
S4 s4_t_tmp; /* temp variable for sort */
/* Initialize array */
for (s4_t_i = (S4)0; s4_t_i < (S4)NUM_MOUNTAINS; s4_t_i++) {
s4_tp_height[s4_t_i] = (S4)INVALID_DATA;
}
/* Input height of mountains */
for (s4_t_i = (S4)0; s4_t_i < (S4)NUM_MOUNTAINS; s4_t_i++) {
(void)scanf("%d%c", &s4_tp_height[s4_t_i], &u1_t_delimiter);
}
/* Sort height of mountains */
for (s4_t_i = (S4)0; s4_t_i < (S4)NUM_MOUNTAINS; s4_t_i++) {
for (s4_t_j = (S4)0; s4_t_j < (S4)NUM_MOUNTAINS - (S4)s4_t_i; s4_t_j++) {
if (s4_tp_height[s4_t_j] < s4_tp_height[s4_t_j + 1]) {
s4_t_tmp = s4_tp_height[s4_t_j];
s4_tp_height[s4_t_j] = s4_tp_height[s4_t_j + 1];
s4_tp_height[s4_t_j + 1] = s4_t_tmp;
}
}
}
for (s4_t_i = (S4)0; s4_t_i < (S4)NUM_OUTPUTS; s4_t_i++) {
printf("%d\n", s4_tp_height[s4_t_i]);
}
return ((S4)0);
}
|
#include <stdio.h>
typedef unsigned char U1;
typedef int S4;
#define NUM_MOUNTAINS (10)
#define INVALID_DATA (-1)
#define NUM_OUTPUTS (3)
S4 main() {
S4 s4_t_i; /* loop counter */
S4 s4_t_j; /* loop counter */
S4 s4_tp_height[NUM_MOUNTAINS];
U1 u1_t_delimiter;
S4 s4_t_tmp; /* temp variable for sort */
/* Initialize array */
for (s4_t_i = (S4)0; s4_t_i < (S4)NUM_MOUNTAINS; s4_t_i++) {
s4_tp_height[s4_t_i] = (S4)INVALID_DATA;
}
/* Input height of mountains */
for (s4_t_i = (S4)0; s4_t_i < (S4)NUM_MOUNTAINS; s4_t_i++) {
(void)scanf("%d%c", &s4_tp_height[s4_t_i], &u1_t_delimiter);
}
/* Sort height of mountains */
for (s4_t_i = (S4)0; s4_t_i < (S4)NUM_MOUNTAINS; s4_t_i++) {
for (s4_t_j = (S4)0; s4_t_j < (S4)NUM_MOUNTAINS - (S4)s4_t_i - (S4)1;
s4_t_j++) {
if (s4_tp_height[s4_t_j] < s4_tp_height[s4_t_j + 1]) {
s4_t_tmp = s4_tp_height[s4_t_j];
s4_tp_height[s4_t_j] = s4_tp_height[s4_t_j + 1];
s4_tp_height[s4_t_j + 1] = s4_t_tmp;
}
}
}
for (s4_t_i = (S4)0; s4_t_i < (S4)NUM_OUTPUTS; s4_t_i++) {
printf("%d\n", s4_tp_height[s4_t_i]);
}
return ((S4)0);
}
|
[["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 0, 7, 15, 16, 12, 16, 12, 74, 0, 24], ["+", 15, 16, 12, 16, 12, 74, 39, 77, 39, 78], ["+", 0, 7, 15, 16, 12, 16, 12, 74, 0, 25], ["+", 0, 7, 15, 16, 12, 16, 12, 74, 51, 13]]
| 0
| 254
| 5
|
#include <stdio.h>
void get_f(int top[], int height);
void get_s(int top[], int height);
int main(void) {
int i, height[10];
int top[3] = {0, 0, 0};
for (i = 0; i < 10; i++) {
scanf("%d", &height[i]);
}
for (i = 0; i < 10; i++) {
if (top[0] < height[i])
get_f(top, height[i]);
else if (top[1] < height[i])
get_f(top, height[i]);
else if (top[2] < height[i])
top[2] = height[i];
}
for (i = 0; i < 3; i++)
printf("%d\n", top[i]);
return 0;
}
void get_f(int top[], int height) {
top[2] = top[1];
top[1] = top[0];
top[0] = height;
}
void get_s(int top[], int height) {
top[2] = top[1];
top[1] = height;
}
|
#include <stdio.h>
void get_f(int top[], int height);
void get_s(int top[], int height);
int main(void) {
int i, height[10];
int top[3] = {0, 0, 0};
for (i = 0; i < 10; i++) {
scanf("%d", &height[i]);
}
for (i = 0; i < 10; i++) {
if (top[0] < height[i])
get_f(top, height[i]);
else if (top[1] < height[i])
get_s(top, height[i]);
else if (top[2] < height[i])
top[2] = height[i];
}
for (i = 0; i < 3; i++)
printf("%d\n", top[i]);
return 0;
}
void get_f(int top[], int height) {
top[2] = top[1];
top[1] = top[0];
top[0] = height;
}
void get_s(int top[], int height) {
top[2] = top[1];
top[1] = height;
}
|
[["-", 75, 76, 0, 57, 64, 1, 0, 2, 63, 22], ["+", 75, 76, 0, 57, 64, 1, 0, 2, 63, 22]]
| 0
| 265
| 2
|
#include <stdio.h>
void noone(int[10]);
int main(void) {
int mt[10];
int i = 0;
for (i = 0; i < 10; i++) {
scanf("%d", &mt[i]); // 10個の配列に数値を入れる
}
noone(mt); //一番大きい値を決める
}
void noone(int hai[10]) {
int i = 0;
int max = 0;
int max2 = 0;
int max3 = 0;
hai[0] = max;
for (i = 0; i < 10; i++) {
if (max < hai[i]) {
max3 = max2;
max2 = max;
max = hai[i];
} else if (max2 < hai[i]) {
max3 = max2;
max2 = hai[i];
} else if (max3 < hai[i]) {
max3 = hai[i];
}
}
printf("%d\n%d\n%d\n", max, max2, max3);
}
|
#include <stdio.h>
void noone(int[10]);
int main(void) {
int mt[10];
int i = 0;
for (i = 0; i < 10; i++) {
scanf("%d", &mt[i]); // 10個の配列に数値を入れる
}
noone(mt); //一番大きい値を決める
}
void noone(int hai[10]) {
int i = 0;
int max = 0;
int max2 = 0;
int max3 = 0;
max = hai[0];
for (i = 1; i < 10; i++) {
if (max < hai[i]) {
max3 = max2;
max2 = max;
max = hai[i];
} else if (max2 < hai[i]) {
max3 = max2;
max2 = hai[i];
} else if (max3 < hai[i]) {
max3 = hai[i];
}
}
printf("%d\n%d\n%d\n", max, max2, max3);
}
|
[["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]]
| 0
| 203
| 6
|
#include <stdio.h>
int main(void) {
int a[11], i, j, tmp;
for (i = 0; i < 10; i++) {
scanf("%d", &a[i]);
}
for (i = 0; i < 10; i++) {
for (j = 1; j < 10; j++) {
if (a[i] > a[j]) {
tmp = a[i];
a[i] = a[j];
a[j] = tmp;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", a[i]);
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int a[11], i, j, tmp;
for (i = 0; i < 10; i++) {
scanf("%d", &a[i]);
}
for (i = 0; i < 10; i++) {
for (j = i + 1; j < 10; j++) {
if (a[i] > a[j]) {
tmp = a[i];
a[i] = a[j];
a[j] = tmp;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", a[9 - i]);
}
return 0;
}
|
[["+", 8, 9, 0, 7, 10, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 7, 10, 11, 12, 16, 17, 72], ["+", 0, 2, 3, 4, 0, 69, 71, 16, 31, 13], ["+", 0, 2, 3, 4, 0, 69, 71, 16, 17, 33]]
| 0
| 148
| 4
|
#include <stdio.h>
int main() {
int mount[10], i, j, l;
for (i = 0; i < 10; i++) {
scanf("%d", &mount[i]);
}
for (i = 0; i < 3; i++) {
for (j = i + 1; j < 10; j++) {
if (mount[i] < mount[j]) {
l = mount[i];
mount[i] = mount[j];
mount[j] = mount[i];
}
}
}
for (i = 0; i < 3; i++)
printf("%d\n", mount[i]);
return 0;
}
|
#include <stdio.h>
int main() {
int mount[10], i, j, l;
for (i = 0; i < 10; i++) {
scanf("%d", &mount[i]);
}
for (i = 0; i < 3; i++) {
for (j = i + 1; j < 10; j++) {
if (mount[i] < mount[j]) {
l = mount[i];
mount[i] = mount[j];
mount[j] = l;
}
}
}
for (i = 0; i < 3; i++)
printf("%d\n", mount[i]);
return 0;
}
|
[["-", 64, 9, 0, 1, 0, 11, 12, 69, 28, 22], ["-", 64, 9, 0, 1, 0, 11, 12, 69, 0, 70], ["-", 64, 9, 0, 1, 0, 11, 12, 69, 71, 22], ["-", 64, 9, 0, 1, 0, 11, 12, 69, 0, 73], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 22]]
| 0
| 150
| 5
|
a[10];
f(int *a, int *b) { return *b - *a; }
main(i) {
for (; ~scanf("%d", &a[i++]);)
;
qsort(a, 10, 4, f);
printf("%d\n%d\n%d\n", *a, a[1], a[2]);
return 0;
}
|
a[10];
f(int *a, int *b) { return *b - *a; }
main(i) {
for (; ~scanf("%d", &a[i++]); qsort(a, 11, 4, f))
;
printf("%d\n%d\n%d\n", *a, a[1], a[2]);
return 0;
}
|
[["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 25], ["-", 0, 14, 8, 9, 0, 7, 8, 1, 0, 35], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 7, 26, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 7, 26, 2, 3, 4, 0, 25]]
| 0
| 90
| 5
|
#include <stdio.h>
int main(void) {
int height[10];
int i, j;
int tmp;
for (i = 0; i < 10; i++) {
scanf("%d", &height[i]);
}
for (i = 0; i < 9; i++) {
for (j = i; j < 9; j++) {
if (height[i] <= height[j]) {
tmp = height[i];
height[i] = height[j];
height[j] = tmp;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", height[i]);
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int height[10];
int i, j;
int tmp;
for (i = 0; i < 10; i++) {
scanf("%d", &height[i]);
}
for (i = 0; i < 9; i++) {
for (j = i; j <= 9; j++) {
if (height[i] <= height[j]) {
tmp = height[i];
height[i] = height[j];
height[j] = tmp;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", height[i]);
}
return 0;
}
|
[["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19]]
| 0
| 150
| 2
|
#include <stdio.h>
int main(void) {
int f, j, a[10], i;
f = 0;
j = 0;
a[10] = 0;
i = 0;
for (f = 0; f < 10; f++) {
scanf("%d", &a[f]);
}
for (f = 0; f < 9; f++) {
for (j = f + 1; j < 10; j++) {
if (a[f] < a[j]) {
i = a[f];
a[f] = a[j];
a[j] = i;
}
}
}
printf("%d\n%d\n%d\n", a[0], a[1], a[2]);
return 0;
}
|
#include <stdio.h>
int main(void) {
int f, j, a[10], i;
f = 0;
j = 0;
a[9] = 0;
i = 0;
for (f = 0; f < 10; f++) {
scanf("%d", &a[f]);
}
for (f = 0; f < 9; f++) {
for (j = f + 1; j < 10; j++) {
if (a[f] < a[j]) {
i = a[f];
a[f] = a[j];
a[j] = i;
}
}
}
printf("%d\n%d\n%d\n", a[0], a[1], a[2]);
return 0;
}
|
[["-", 8, 9, 0, 1, 0, 11, 31, 69, 71, 13], ["+", 8, 9, 0, 1, 0, 11, 31, 69, 71, 13]]
| 0
| 168
| 2
|
#include <stdio.h>
main() {
int i, h, k;
int height[5] = {0, 0, 0, 0};
for (i = 0; i < 10; i++) {
scanf("%d", &h);
for (k = 0; k < 3; k++) {
if (height[k] <= h) {
height[k + 2] = height[k + 1];
height[k + 1] = height[k];
height[k] = h;
break;
}
}
}
printf("%d%d%d", height[0], height[1], height[2]);
return 0;
}
|
#include <stdio.h>
main() {
int i, h, k;
int height[5] = {0, 0, 0, 0};
for (i = 0; i < 10; i++) {
scanf("%d", &h);
for (k = 0; k < 3; k++) {
if (height[k] <= h) {
height[k + 2] = height[k + 1];
height[k + 1] = height[k];
height[k] = h;
break;
}
}
}
printf("%d\n%d\n%d\n", height[0], height[1], height[2]);
return 0;
}
|
[["-", 0, 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, 44]]
| 0
| 142
| 7
|
#include <stdio.h>
int main(void) {
int i;
int h[10];
int pri, swapC;
for (i = 0; i < 10; i++)
scanf("%d", &h[i]);
while (swapC > 0) {
swapC = 0;
for (i = 0; i < 9; i++)
if (h[i] < h[i + 1]) {
swapC++;
pri = h[i];
h[i] = h[i + 1];
h[i + 1] = pri;
}
}
for (i = 0; i < 3; i++)
printf("%d\n", h[i]);
return 0;
}
|
#include <stdio.h>
int main(void) {
int i;
int h[10];
int pri, swapC = 1;
for (i = 0; i < 10; i++)
scanf("%d", &h[i]);
while (swapC != 0) {
swapC = 0;
for (i = 0; i < 9; i++)
if (h[i] < h[i + 1]) {
swapC++;
pri = h[i];
h[i] = h[i + 1];
h[i + 1] = pri;
}
}
for (i = 0; i < 3; i++)
printf("%d\n", h[i]);
return 0;
}
|
[["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 52, 15, 23, 0, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 23, 0, 16, 17, 79]]
| 0
| 150
| 4
|
#include <stdio.h>
int main(void) {
int data[9];
int i, m, temp;
for (i = 0; i <= 9; i++) {
scanf("%d", &data[i]);
}
for (i = 0; i <= 9 - 1; i++) {
for (m = 9 - 1; m > i; m--) {
if (data[m - 1] < data[m]) {
temp = data[m - 1];
data[m - 1] = data[m];
data[m] = temp;
}
}
}
for (i = 0; i <= 2; i++) {
printf("%d\n", data[i]);
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int data[10];
int i, m, temp;
for (i = 0; i <= 9; i++) {
scanf("%d", &data[i]);
}
for (i = 0; i <= 10 - 1; i++) {
for (m = 10 - 1; m > i; m--) {
if (data[m - 1] < data[m]) {
temp = data[m - 1];
data[m - 1] = data[m];
data[m] = temp;
}
}
}
for (i = 0; i <= 2; i++) {
printf("%d\n", data[i]);
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 31, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 31, 13], ["-", 8, 9, 0, 7, 10, 11, 12, 16, 31, 13], ["+", 8, 9, 0, 7, 10, 11, 12, 16, 31, 13]]
| 0
| 159
| 6
|
#include <stdio.h>
int main() {
int mount[11];
int i, j, k, key;
for (i = 1; i <= 10; i++) {
scanf("%d", &mount[i]);
}
for (j = 1; j <= 10; j++) {
key = mount[j];
i = j - 1;
while (i >= 0 && mount[i] < key) {
mount[i + 1] = mount[i];
i--;
}
mount[i + 1] = key;
}
/*print*/
for (k = 1; k <= 3; k++) {
printf("%d\n", mount[k]);
}
return 0;
}
|
#include <stdio.h>
int main() {
int mount[11];
int i, j, k, key;
for (i = 1; i <= 10; i++) {
scanf("%d", &mount[i]);
}
for (j = 1; j <= 10; j++) {
key = mount[j];
i = j - 1;
while (i > 0 && mount[i] < key) {
mount[i + 1] = mount[i];
i--;
}
mount[i + 1] = key;
}
/*print*/
for (k = 1; k <= 3; k++) {
printf("%d\n", mount[k]);
}
return 0;
}
|
[["-", 0, 52, 15, 23, 0, 16, 31, 16, 17, 20], ["+", 0, 52, 15, 23, 0, 16, 31, 16, 17, 47]]
| 0
| 150
| 2
|
#include <stdio.h>
int main(int argc, char *argv[]) {
int i, j, temp, height[10];
for (i = 0; i < 10; i++) {
scanf("%d", &height[i]);
}
for (i = 10; 0 < i; i--) {
for (j = 0; j < i; j++) {
if (height[j + 1] < height[j]) {
temp = height[j];
height[j] = height[j + 1];
height[j + 1] = temp;
}
}
}
for (i = 0; i < 10; i++) {
printf("%d\n", height[i]);
}
return 0;
}
|
#include <stdio.h>
int main(int argc, char *argv[]) {
int i, j, temp, height[10];
for (i = 0; i < 10; i++) {
scanf("%d", &height[i]);
}
for (i = 9; 0 < i; i--) {
for (j = 0; j < i; j++) {
if (height[j + 1] < height[j]) {
temp = height[j];
height[j] = height[j + 1];
height[j + 1] = temp;
}
}
}
for (i = 9; 6 < i; i--) {
printf("%d\n", height[i]);
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 17, 68]]
| 0
| 161
| 10
|
#include <stdio.h>
int main(void) {
int a[10];
int z = 0, y = 0, x = 0;
int i;
for (i = 1; i <= 10; i++) {
scanf("%d", &a[i]);
if (x < a[i]) {
z = y;
y = x;
x = a[i];
} else if (y < a[i]) {
z = y;
y = a[i];
} else if (z < a[i]) {
z = a[i];
}
}
printf("%d\n%d\n%d\n", x, y, z);
return 0;
}
|
#include <stdio.h>
int main(void) {
int a[11];
int z = 0, y = 0, x = 0;
int i;
for (i = 1; i <= 10; i++) {
scanf("%d", &a[i]);
if (x < a[i]) {
z = y;
y = x;
x = a[i];
} else if (y < a[i]) {
z = y;
y = a[i];
} else if (z < a[i]) {
z = a[i];
}
}
printf("%d\n%d\n%d\n", x, y, z);
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13]]
| 0
| 148
| 2
|
#include <stdio.h>
int main() {
int x[10], i, j, a;
for (i = 0; i < 10; i++) {
scanf("%d", &x[i]);
}
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
if (x[i] < x[j]) {
a = x[i];
x[i] = x[j];
x[j] = a;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", x[i]);
}
return 0;
}
|
#include <stdio.h>
int main() {
int x[10], i, j, a;
for (i = 0; i < 10; i++) {
scanf("%d", &x[i]);
}
for (i = 0; i < 10; i++) {
for (j = i; j < 10; j++) {
if (x[i] < x[j]) {
a = x[i];
x[i] = x[j];
x[j] = a;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", x[i]);
}
return 0;
}
|
[["-", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 22]]
| 0
| 147
| 2
|
#include <stdio.h>
int main(void) {
int most1 = 0, most2 = 0, most3 = 0, a[10], i;
for (i = 0; i < 10; i++) {
scanf("%d", &a[i]);
if (most1 < a[i]) {
most3 = most2;
most2 = most1;
most1 = a[i];
} else if (most2 < a[i] && most1 > a[i]) {
most3 = most2;
most2 = a[i];
} else if (most3 < a[i] && most2 > a[i] && most1 > a[i]) {
most3 = a[i];
}
}
printf("%d\n%d\n%d\n", most1, most2, most3);
return 0;
}
|
#include <stdio.h>
int main(void) {
int most1 = 0, most2 = 0, most3 = 0, a[10], i;
for (i = 0; i < 10; i++) {
scanf("%d", &a[i]);
if (most1 <= a[i]) {
most3 = most2;
most2 = most1;
most1 = a[i];
} else if (most2 <= a[i] && most1 >= a[i]) {
most3 = most2;
most2 = a[i];
} else if (most3 <= a[i] && most2 >= a[i] && most1 >= a[i]) {
most3 = a[i];
}
}
printf("%d\n%d\n%d\n", most1, most2, most3);
return 0;
}
|
[["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 19], ["-", 0, 57, 15, 23, 0, 16, 31, 16, 17, 18], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 19], ["-", 0, 57, 15, 23, 0, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 17, 20], ["-", 15, 23, 0, 16, 31, 16, 31, 16, 17, 18], ["+", 15, 23, 0, 16, 31, 16, 31, 16, 17, 19], ["-", 15, 23, 0, 16, 31, 16, 12, 16, 17, 47], ["+", 15, 23, 0, 16, 31, 16, 12, 16, 17, 20]]
| 0
| 167
| 12
|
#include <stdio.h>
void swap(int *x, int *y) {
*x = *x ^ *y;
*y = *x ^ *y;
*x = *x ^ *y;
}
void bsort(int list[10]) {
int needAgain = 0;
int i;
do {
needAgain = 0;
for (i = 0; i < 8; i++) {
if (list[i] < list[i + 1]) {
swap(&list[i], &list[i + 1]);
needAgain = 1;
}
}
} while (needAgain);
}
int main() {
int heights[10];
int i;
for (i = 0; i < 10; i++) {
scanf("%d", &heights[i]);
}
bsort(heights);
for (i = 0; i < 3; i++) {
printf("%d\n", heights[i]);
}
return 0;
}
|
#include <stdio.h>
void swap(int *x, int *y) {
*x = *x ^ *y;
*y = *x ^ *y;
*x = *x ^ *y;
}
void bsort(int list[10]) {
int needAgain = 0;
int i;
do {
needAgain = 0;
for (i = 0; i <= 8; i++) {
if (list[i] < list[i + 1]) {
swap(&list[i], &list[i + 1]);
needAgain = 1;
}
}
} while (needAgain);
}
int main() {
int heights[10];
int i;
for (i = 0; i < 10; i++) {
scanf("%d", &heights[i]);
}
bsort(heights);
for (i = 0; i < 3; i++) {
printf("%d\n", heights[i]);
}
return 0;
}
|
[["-", 0, 82, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 82, 8, 9, 0, 7, 15, 16, 17, 19]]
| 0
| 204
| 2
|
#include <stdio.h>
#include <stdlib.h>
int compare_int(const void *a, const void *b) { return *(int *)a - *(int *)b; }
main() {
int data[10];
int i = 10;
while (i--)
scanf("%d", &data[i]);
qsort(data, 10, sizeof(int), compare_int);
for (i = 0; i < 10; i++) {
printf("%d\n", data[i]);
}
return 0;
}
|
#include <stdio.h>
#include <stdlib.h>
int compare_int(const void *a, const void *b) { return *(int *)b - *(int *)a; }
main() {
int data[10];
int i = 10;
while (i--)
scanf("%d", &data[i]);
qsort(data, 10, sizeof(int), compare_int);
for (i = 0; i < 3; i++) {
printf("%d\n", data[i]);
}
return 0;
}
|
[["-", 0, 37, 0, 16, 31, 66, 28, 74, 51, 22], ["+", 0, 37, 0, 16, 31, 66, 28, 74, 51, 22], ["-", 0, 37, 0, 16, 12, 66, 28, 74, 51, 22], ["+", 0, 37, 0, 16, 12, 66, 28, 74, 51, 22], ["-", 0, 30, 0, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 30, 0, 9, 0, 7, 15, 16, 12, 13]]
| 0
| 114
| 6
|
#include <stdio.h>
#define N 10
int main() {
int i, j, n[N], min, temp;
for (i = 0; i < N; i++) {
printf("\n");
scanf("%d", &n[i]);
}
for (i = 0; i < N; i++) {
min = i;
for (j = i + 1; j < N; j++) {
if (n[j] < n[min]) {
min = j;
}
}
temp = n[min];
n[min] = n[i];
n[i] = temp;
}
for (j = N - 1; j >= 7; j--) {
printf("\n%d\n", n[j]);
}
return 0;
}
|
#include <stdio.h>
#define N 10
int main() {
int i, j, n[N], min, temp;
for (i = 0; i < N; i++) {
printf("");
scanf("%d", &n[i]);
}
for (i = 0; i < N; i++) {
min = i;
for (j = i + 1; j < N; j++) {
if (n[j] < n[min]) {
min = j;
}
}
temp = n[min];
n[min] = n[i];
n[i] = temp;
}
for (j = N - 1; j >= 7; j--) {
printf("%d\n", n[j]);
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 172
| 2
|
#include <stdio.h>
int main() {
int yama[10];
int i, j, dumy;
for (i = 0; i < 10; i++) {
scanf("%d", &yama[i]);
}
for (i = 0; i < 5; i++) {
for (j = i + 1; j < 5; j++) {
if (yama[i] < yama[j]) {
dumy = yama[i];
yama[i] = yama[j];
yama[j] = dumy;
}
}
}
printf("%d\n", yama[0]);
printf("%d\n", yama[1]);
printf("%d\n", yama[2]);
return 0;
}
|
#include <stdio.h>
int main() {
int yama[10];
int i, j, dumy;
for (i = 0; i < 10; i++) {
scanf("%d", &yama[i]);
}
for (i = 0; i < 9; i++) {
for (j = i + 1; j < 10; j++) {
if (yama[i] < yama[j]) {
dumy = yama[i];
yama[i] = yama[j];
yama[j] = dumy;
}
}
}
printf("%d\n", yama[0]);
printf("%d\n", yama[1]);
printf("%d\n", yama[2]);
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]]
| 0
| 161
| 4
|
#include <stdio.h>
int main() {
int height[10], i, j, n, temp;
for (i = 0; i < 10; i += 1) {
scanf("%d", &height[i]);
};
for (n = 0; n < i - 1; n += 1) {
for (j = i - 1; j > n; j -= 1) {
if (height[i - 1] < height[i]) {
temp = height[i - 1];
height[i - 1] = height[i];
height[i] = temp;
};
};
};
for (i = 0; i < 3; i += 1) {
printf("%d\n", height[i]);
};
return 0;
}
|
#include <stdio.h>
int main() {
int height[10], i, j, n, temp;
for (i = 0; i < 10; i += 1) {
scanf("%d", &height[i]);
};
for (n = 0; n < i - 1; n += 1) {
for (j = i - 1; j > n; j -= 1) {
if (height[j - 1] < height[j]) {
temp = height[j - 1];
height[j - 1] = height[j];
height[j] = temp;
};
};
};
for (i = 0; i < 3; i += 1) {
printf("%d\n", height[i]);
};
return 0;
}
|
[["-", 15, 23, 0, 16, 31, 69, 71, 16, 31, 22], ["+", 15, 23, 0, 16, 31, 69, 71, 16, 31, 22], ["-", 0, 57, 15, 23, 0, 16, 12, 69, 71, 22], ["+", 0, 57, 15, 23, 0, 16, 12, 69, 71, 22], ["-", 0, 1, 0, 11, 12, 69, 71, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 69, 71, 16, 31, 22], ["-", 0, 1, 0, 11, 31, 69, 71, 16, 31, 22], ["+", 0, 1, 0, 11, 31, 69, 71, 16, 31, 22], ["-", 64, 9, 0, 1, 0, 11, 12, 69, 71, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 69, 71, 22], ["-", 64, 9, 0, 1, 0, 11, 31, 69, 71, 22], ["+", 64, 9, 0, 1, 0, 11, 31, 69, 71, 22]]
| 0
| 168
| 12
|
#include <math.h>
#include <stdio.h>
int main(void) {
int i, j;
int ar[10];
int temp;
for (i = 0; i < 10; i++) {
scanf("%d", &ar[i]);
}
for (i = 9; i < 7; i--) {
for (j = 0; j < i; j++) {
if (ar[j] > ar[j + 1]) {
temp = ar[j];
ar[j] = ar[j + 1];
ar[j + 1] = temp;
}
}
}
for (i = 9; i < 7; i--) {
printf("%d\n", ar[i]);
}
return 0;
}
|
#include <math.h>
#include <stdio.h>
int main(void) {
int i, j;
int ar[10];
int temp;
for (i = 0; i < 10; i++) {
scanf("%d", &ar[i]);
}
// printf("\n%d\n", ar[9]);
for (i = 9; i > 6; i--) {
for (j = 0; j < i; j++) {
if (ar[j] > ar[j + 1]) {
temp = ar[j];
ar[j] = ar[j + 1];
ar[j + 1] = temp;
}
}
}
for (i = 9; i > 6; i--) {
printf("%d\n", ar[i]);
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 47], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
| 0
| 158
| 8
|
#include <stdio.h>
int main() {
int i, j, height[10], tmp;
for (i = 0; i < 10; i++) {
scanf("%d", height[i]);
}
for (i = 0; i < 10; i++) {
for (j = 0; j < 9; j++) {
if (height[j] < height[j + 1]) {
tmp = height[j + 1];
height[j + 1] = height[j];
height[j] = tmp;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d", height[i]);
}
return 0;
}
|
#include <stdio.h>
int main() {
int i, j, height[10], tmp;
for (i = 0; i < 10; i++) {
scanf("%d", &height[i]);
}
for (i = 0; i < 10; i++) {
for (j = 0; j < 9; j++) {
if (height[j] <= height[j + 1]) {
tmp = height[j + 1];
height[j + 1] = height[j];
height[j] = tmp;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", height[i]);
}
return 0;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 19], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 151
| 4
|
#include <stdio.h>
int main(void) {
int a, b, c, i, j;
int array[10];
for (i = 0; i < 10; i++) {
scanf("%d", &array[i]);
}
for (i = 0; i < 9; i++) {
for (j = 0; j + i == 8; j++) {
if (array[j] > array[j + 1]) {
a = array[j];
array[j] = array[j + 1];
array[j + 1] = a;
}
}
}
printf("%d\n", array[9]);
printf("%d\n", array[8]);
printf("%d\n", array[7]);
return 0;
}
|
#include <stdio.h>
int main(void) {
int a, b, c, i, j;
int array[10];
for (i = 0; i < 10; i++) {
scanf("%d", &array[i]);
}
for (i = 0; i < 9; i++) {
for (j = 0; j < 9 - i; j++) {
if (array[j] > array[j + 1]) {
a = array[j];
array[j] = array[j + 1];
array[j + 1] = a;
}
}
}
printf("%d\n", array[9]);
printf("%d\n", array[8]);
printf("%d\n", array[7]);
return 0;
}
|
[["-", 8, 9, 0, 7, 15, 16, 31, 16, 17, 72], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 31, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 60], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]]
| 0
| 172
| 6
|
#include <stdio.h>
int main(void) {
char buf[6];
int mountains[10];
int i, j, tmp;
for (i = 0; i < 10; i++) {
fgets(buf, sizeof(buf), stdin);
sscanf(buf, "%d", &tmp);
mountains[i] = tmp;
}
for (i = 0; i < 10 - 1; i++) {
for (j = i + 1; j < 10; j++) {
if (mountains[i] < mountains[j]) {
tmp = mountains[i];
mountains[i] = mountains[j];
mountains[j] = tmp;
}
}
}
for (i = 0; i < 3; i++)
printf("%d\n", mountains[i]);
return 0;
}
|
#include <stdio.h>
int main(void) {
char buf[6];
int mountains[10];
int i, j, tmp;
for (i = 0; i < 10; i++) {
fgets(buf, sizeof(buf), stdin);
sscanf(buf, "%d", &mountains[i]);
}
for (i = 0; i < 10 - 1; i++) {
for (j = i + 1; j < 10; j++) {
if (mountains[i] < mountains[j]) {
tmp = mountains[i];
mountains[i] = mountains[j];
mountains[j] = tmp;
}
}
}
for (i = 0; i < 3; i++)
printf("%d\n", mountains[i]);
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 66, 28, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35], ["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["-", 0, 7, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25]]
| 0
| 175
| 6
|
#include <stdio.h>
#include <stdlib.h>
int compare(int *a, int *b) { return *a - *b; }
int main(void) {
int Height[10] = {0};
int i;
for (i = 0; i < 10; i++) {
scanf("%d", &Height[i]);
}
qsort(Height, 10, sizeof(int), (void *)compare);
printf("%d\n%d\n%d", Height[7], Height[8], Height[9]);
return 0;
}
|
#include <stdio.h>
#include <stdlib.h>
int compare(int *a, int *b) { return *a - *b; }
int main(void) {
int Height[10] = {0};
int i;
for (i = 0; i < 10; i++) {
scanf("%d", &Height[i]);
}
qsort(Height, 10, sizeof(int), (void *)compare);
printf("%d\n%d\n%d\n", Height[9], Height[8], Height[7]);
return 0;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["-", 0, 1, 0, 2, 3, 4, 0, 69, 71, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 69, 71, 13]]
| 0
| 119
| 5
|
#include <stdio.h>
int main() {
int a[100], i, j, n, t;
for (i = 0; i < 10; i++) {
scanf("%d", &a[i]);
}
for (i = 0; i < n - 1; i++) {
for (j = n - 1; j > i; j--) {
if (a[j] > a[j - 1]) {
t = a[j];
a[j] = a[j - 1];
a[j - 1] = t;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", a[i]);
}
return (0);
}
|
#include <stdio.h>
int main() {
int a[100], i, j, n, t;
for (i = 0; i < 10; i++) {
scanf("%d", &a[i]);
}
for (i = 0; i < 10 - 1; i++) {
for (j = 10 - 1; j > i; j--) {
if (a[j] > a[j - 1]) {
t = a[j];
a[j] = a[j - 1];
a[j - 1] = t;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", a[i]);
}
return (0);
}
|
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 31, 22], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 31, 13], ["-", 8, 9, 0, 7, 10, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 7, 10, 11, 12, 16, 31, 13]]
| 0
| 161
| 4
|
#include <stdio.h>
int main() {
int hills[10];
int i, j;
int temp;
for (i = 0; i < 10; i++) {
scanf("%d", &hills[i]);
}
for (i = 0; i < 9; i++) {
for (j = 0; j < 9 - 1; j++) {
if (hills[j] < hills[j + 1]) {
temp = hills[j];
hills[j] = hills[j + 1];
hills[j + 1] = temp;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", hills[i]);
}
}
|
#include <stdio.h>
int main() {
int hills[10];
int i, j;
int temp;
for (i = 0; i < 10; i++) {
scanf("%d", &hills[i]);
}
for (i = 0; i < 9; i++) {
for (j = 0; j < 9 - i; j++) {
if (hills[j] < hills[j + 1]) {
temp = hills[j];
hills[j] = hills[j + 1];
hills[j + 1] = temp;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", hills[i]);
}
return 0;
}
|
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 35]]
| 0
| 154
| 5
|
#include <stdio.h>
#include <string.h>
int main() {
int n, i, x[10], temp, j;
for (i = 0; i < 10; i++) {
scanf("%d", &x[i]);
}
n = 10;
for (i = 0; i < n - 1; i++) {
for (j = n - 1; j > i; j--) {
if (x[j - 1] > x[j]) {
temp = x[j];
x[j] = x[j - 1];
x[j - 1] = temp;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", x[i]);
}
return 0;
}
|
#include <stdio.h>
#include <string.h>
int main() {
int n, i, x[10], temp, j;
for (i = 0; i < 10; i++) {
scanf("%d", &x[i]);
}
n = 10;
for (i = 0; i < n - 1; i++) {
for (j = n - 1; j > i; j--) {
if (x[j - 1] > x[j]) {
temp = x[j];
x[j] = x[j - 1];
x[j - 1] = temp;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", x[9 - i]);
}
return 0;
}
|
[["+", 0, 2, 3, 4, 0, 69, 71, 16, 31, 13], ["+", 0, 2, 3, 4, 0, 69, 71, 16, 17, 33]]
| 0
| 165
| 2
|
#include <stdio.h>
#define INDEX 10
void sort(int array[], int n) {
int i, j;
for (i = 0; i < n - 1; i++) {
for (j = n - 1; j > i; j--) {
if (array[j - 1] > array[j]) {
int t = array[j - 1];
array[j - 1] = array[j];
array[j] = t;
}
}
}
}
int main() {
int height[10];
int i;
for (i = 0; i < INDEX; i++) {
scanf("%d", &height[i]);
}
sort(height, INDEX);
for (i = 0; i < 3; i++) {
printf("%d\n", height[i]);
}
return 0;
}
|
#include <stdio.h>
#define INDEX 10
void sort(int array[], int n) {
int i, j;
for (i = 0; i < n - 1; i++) {
for (j = n - 1; j > i; j--) {
if (array[j - 1] > array[j]) {
int t = array[j - 1];
array[j - 1] = array[j];
array[j] = t;
}
}
}
}
int main() {
int height[10];
int i;
for (i = 0; i < INDEX; i++) {
scanf("%d", &height[i]);
}
sort(height, INDEX);
for (i = 0; i < 3; i++) {
printf("%d\n", height[INDEX - i - 1]);
}
return 0;
}
|
[["+", 3, 4, 0, 69, 71, 16, 31, 16, 31, 22], ["+", 3, 4, 0, 69, 71, 16, 31, 16, 17, 33], ["+", 0, 2, 3, 4, 0, 69, 71, 16, 17, 33], ["+", 0, 2, 3, 4, 0, 69, 71, 16, 12, 13]]
| 0
| 183
| 4
|
#include <stdio.h>
#include <string.h>
int main(void) {
int i, j, temp, input_int, rank[3] = {0};
char input[5];
char *p;
for (i = 0; i < 10; i++) {
fgets(input, sizeof(input), stdin);
p = strchr(input, '\n');
if (p != NULL)
*p = '\0';
sscanf(input, "%d", &input_int);
for (j = 0; j < 3; j++) {
if (rank[j] < input_int) {
temp = rank[j];
rank[j] = input_int;
input_int = temp;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", rank[i]);
}
return 0;
}
|
#include <stdio.h>
#include <string.h>
int main(void) {
int i, j, temp, input_int, rank[3] = {0};
char input[10];
char *p;
for (i = 0; i < 10; i++) {
fgets(input, sizeof(input), stdin);
p = strchr(input, '\n');
if (p != NULL)
*p = '\0';
sscanf(input, "%d", &input_int);
for (j = 0; j < 3; j++) {
if (rank[j] < input_int) {
temp = rank[j];
rank[j] = input_int;
input_int = temp;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", rank[i]);
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13]]
| 0
| 177
| 2
|
#include <stdio.h>
int main(void) {
int first = 0, second, third;
int i, tmp;
for (i = 0; i < 10; i++) {
scanf("%d", &tmp);
if (tmp >= first) {
second = first;
first = tmp;
} else if (tmp >= second) {
third = second;
second = tmp;
} else if (tmp >= third) {
third = tmp;
}
}
printf("%d\n%d\n%d\n", first, second, third);
return 0;
}
|
#include <stdio.h>
int main(void) {
int first = 0, second, third;
int i, tmp;
for (i = 0; i < 10; i++) {
scanf("%d", &tmp);
if (tmp >= first) {
third = second;
second = first;
first = tmp;
} else if (tmp >= second) {
third = second;
second = tmp;
} else if (tmp >= third) {
third = tmp;
}
}
printf("%d\n%d\n%d\n", first, second, third);
return 0;
}
|
[["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 22], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]]
| 0
| 115
| 4
|
#include <stdio.h>
int main() {
int i, j, height[10], backup;
for (i = 0; i < 10; i++) {
scanf("%d", height[i]);
}
for (j = 0; j < 10; j++) {
for (i = 0; i < 9; i++) {
if (height[i] > height[i + 1]) {
backup = height[i];
height[i] = height[i + 1];
height[i + 1] = backup;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", height[9 - i]);
}
return 0;
}
|
#include <stdio.h>
int main() {
int i, j, height[10], backup;
for (i = 0; i < 10; i++) {
scanf("%d", &height[i]);
}
for (j = 0; j < 10; j++) {
for (i = 0; i < 9; i++) {
if (height[i] > height[i + 1]) {
backup = height[i];
height[i] = height[i + 1];
height[i + 1] = backup;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", height[9 - i]);
}
return 0;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]]
| 0
| 154
| 1
|
#include <stdio.h>
#define MOUNTAINS 10
void swap(int *a, int *b) {
int tmp = *a;
*a = *b;
*b = tmp;
}
int main(void) {
int height[MOUNTAINS], i, j;
for (i = 0; i < MOUNTAINS; i++) {
scanf("%d", &height[i]);
}
for (i = 0; i < MOUNTAINS - 1; i++) {
for (j = 0; j < MOUNTAINS - (i + 1); j++) {
if (height[j] < height[j + 1]) {
swap(&height[j], &height[j + 1]);
}
}
}
for (i = 0; i < MOUNTAINS; i++) {
printf("%d\n", height[i]);
}
return 0;
}
|
#include <stdio.h>
#define MOUNTAINS 10
void swap(int *a, int *b) {
int tmp = *a;
*a = *b;
*b = tmp;
}
int main(void) {
int height[MOUNTAINS], i, j;
for (i = 0; i < MOUNTAINS; i++) {
scanf("%d", &height[i]);
}
for (i = 0; i < MOUNTAINS - 1; i++) {
for (j = 0; j < MOUNTAINS - (i + 1); j++) {
if (height[j] < height[j + 1]) {
swap(&height[j], &height[j + 1]);
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", height[i]);
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
| 0
| 182
| 2
|
#include <stdio.h>
int swap(int *a, int *b);
int main(void) {
int value[10], i, i2, D;
for (i = 0; i < 10; i++) {
scanf("%d", &value[i]);
}
for (i = 0; i < 10; i++) {
for (i2 = 0; i2 < 9; i2++) {
if (value[i2] < value[i2 + 1]) {
swap(&value[i2], &value[i2 + 1]);
}
}
}
for (i = 0; i < 3; i++) {
printf("%d", value[i]);
}
return 0;
}
int swap(int *a, int *b) {
int buf;
buf = *a;
*a = *b;
*b = buf;
return 0;
}
|
#include <stdio.h>
int swap(int *a, int *b);
int main(void) {
int value[10], i, i2, D;
for (i = 0; i < 10; i++) {
scanf("%d", &value[i]);
}
for (i = 0; i < 10; i++) {
for (i2 = 0; i2 < 9; i2++) {
if (value[i2] < value[i2 + 1]) {
swap(&value[i2], &value[i2 + 1]);
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", value[i]);
}
return 0;
}
int swap(int *a, int *b) {
int buf;
buf = *a;
*a = *b;
*b = buf;
return 0;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 189
| 1
|
#include <stdio.h>
int main() {
int hills[10], top[3], i, j;
for (i = 0; i < 10; i++)
scanf("%d", &hills[i]);
for (i = 1; i < 10; i++) {
int tmp = hills[i];
for (j = i; j > 0 && hills[j - 1] > tmp; j--)
hills[j] = hills[j - 1];
hills[j] = tmp;
}
for (i = 0; i < 3; i++)
printf("%d\n", hills[i]);
return 0;
}
|
#include <stdio.h>
int main() {
int hills[10], top[3], i, j, tmp;
for (i = 0; i < 10; i++)
scanf("%d", &hills[i]);
for (i = 1; i < 10; i++) {
tmp = hills[i];
for (j = i; j > 0 && hills[j - 1] < tmp; j--)
hills[j] = hills[j - 1];
hills[j] = tmp;
}
for (i = 0; i < 3; i++)
printf("%d\n", hills[i]);
return 0;
}
|
[["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 47], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 18]]
| 0
| 142
| 5
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = 10;
int[] ary = new int[n];
for (int i = 0; i < n; i++) {
ary[i] = sc.nextInt();
}
for (int i = 1; i < n; i++) {
int value = ary[i];
for (int j = i - 1;; j--) {
if (j < 0) {
break;
}
if (ary[j] <= value) {
ary[j + 1] = value;
break;
}
ary[j + 1] = ary[j];
ary[j] = value;
}
}
for (int i = 0; i < 3; i++) {
System.out.println(ary[i]);
}
}
}
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = 10;
int[] ary = new int[n];
for (int i = 0; i < n; i++) {
ary[i] = sc.nextInt();
}
for (int i = 1; i < n; i++) {
int value = ary[i];
for (int j = i - 1;; j--) {
if (j < 0) {
break;
}
if (ary[j] >= value) {
ary[j + 1] = value;
break;
}
ary[j + 1] = ary[j];
ary[j] = value;
}
}
for (int i = 0; i < 3; i++) {
System.out.println(ary[i]);
}
}
}
|
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 19], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 20]]
| 3
| 198
| 2
|
import java.util.Scanner;
class Main {
public static void main(String[] a) {
Scanner scan = new Scanner(System.in);
int[] m = new int[10];
int[] max = new int[3];
for (int i = 0; i < 10; i++) {
m[i] = scan.nextInt();
if (m[i] >= max[0]) {
max[2] = max[1];
max[1] = max[0];
max[0] = m[i];
} else if (m[i] >= max[1]) {
max[2] = max[1];
max[1] = m[i];
} else if (m[i] >= max[2]) {
max[2] = m[0];
}
}
for (int i = 0; i <= 2; i++) {
System.out.println(max[i]);
}
}
}
|
import java.util.Scanner;
class Main {
public static void main(String[] a) {
Scanner scan = new Scanner(System.in);
int[] m = new int[10];
int[] max = new int[3];
for (int i = 0; i < 10; i++) {
m[i] = scan.nextInt();
if (m[i] >= max[0]) {
max[2] = max[1];
max[1] = max[0];
max[0] = m[i];
} else if (m[i] >= max[1]) {
max[2] = max[1];
max[1] = m[i];
} else if (m[i] >= max[2]) {
max[2] = m[i];
}
}
for (int i = 0; i <= 2; i++) {
System.out.println(max[i]);
}
}
}
|
[["-", 64, 196, 0, 1, 0, 11, 12, 504, 71, 499], ["+", 64, 196, 0, 1, 0, 11, 12, 504, 71, 22]]
| 3
| 215
| 2
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Calc calc = new Calc();
int[] height = {0, 0, 0};
int newh;
;
for (int cnt = 0; cnt < 10; cnt++) {
newh = sc.nextInt();
height = Calc.calc(newh, height);
};
System.out.println(height[0]);
System.out.println(height[1]);
System.out.println(height[2]);
}
}
class Calc {
// private static final int imax = 110;
public static int[] calc(int h, int[] Pastheight) {
int Newheight[] = (int[])Pastheight.clone();
if ((h > Pastheight[2]) && (h < Pastheight[1])) {
Newheight[2] = h;
} else if ((h > Pastheight[1]) && (h < Pastheight[0])) {
Newheight[1] = h;
Newheight[2] = Pastheight[1];
} else if (h > Pastheight[0]) {
Newheight[0] = h;
Newheight[1] = Pastheight[0];
Newheight[2] = Pastheight[1];
}
return Newheight;
}
}
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Calc calc = new Calc();
int[] height = {0, 0, 0};
int newh;
;
for (int cnt = 0; cnt < 10; cnt++) {
newh = sc.nextInt();
height = Calc.calc(newh, height);
};
System.out.println(height[0]);
System.out.println(height[1]);
System.out.println(height[2]);
}
}
class Calc {
// private static final int imax = 110;
public static int[] calc(int h, int[] Pastheight) {
int Newheight[] = (int[])Pastheight.clone();
if ((h > Pastheight[2]) && (h <= Pastheight[1])) {
Newheight[2] = h;
} else if ((h > Pastheight[1]) && (h <= Pastheight[0])) {
Newheight[1] = h;
Newheight[2] = Pastheight[1];
} else if (h > Pastheight[0]) {
Newheight[0] = h;
Newheight[1] = Pastheight[0];
Newheight[2] = Pastheight[1];
}
return Newheight;
}
}
|
[["-", 15, 15, 0, 16, 12, 23, 0, 16, 17, 18], ["+", 15, 15, 0, 16, 12, 23, 0, 16, 17, 19]]
| 3
| 281
| 4
|
import java.io.*;
import java.util.*;
import java.util.stream.*;
class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
br.lines()
.parallel()
.map(Integer::parseInt)
// .boxed()
.sorted(Comparator.reverseOrder())
.limit(3)
.forEach(System.out::println);
}
}
|
import java.io.*;
import java.util.*;
import java.util.stream.*;
class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
br.lines()
.parallel()
.map(Integer::parseInt)
// .boxed()
.sorted(Comparator.reverseOrder())
.sequential()
.limit(3)
.forEach(System.out::println);
}
}
|
[["+", 0, 1, 0, 492, 500, 492, 500, 492, 141, 22], ["+", 0, 492, 500, 492, 500, 492, 3, 4, 0, 24], ["+", 0, 492, 500, 492, 500, 492, 3, 4, 0, 25], ["+", 8, 196, 0, 1, 0, 492, 500, 492, 0, 131]]
| 3
| 95
| 4
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int a[] = new int[10];
int top = 0;
int second = 0;
int thard = 0;
//???????????????
for (int i = 0; i < 10; i++) {
a[i] = s.nextInt();
if (i > 0) {
if (top < a[i]) {
thard = second;
second = top; //?????????
top = a[i];
} else if (second < a[i] && top > a[i]) {
thard = second;
second = a[i];
} else if (thard < a[i] && second > a[i]) {
thard = a[i];
}
} else {
top = a[i];
}
}
System.out.println(top);
System.out.println(second);
System.out.println(thard);
}
}
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int a[] = new int[10];
int top = 0;
int second = 0;
int thard = 0;
//???????????????
for (int i = 0; i < 10; i++) {
a[i] = s.nextInt();
if (i > 0) {
if (top <= a[i]) {
thard = second;
second = top; //?????????
top = a[i];
} else if (second <= a[i] && top >= a[i]) {
thard = second;
second = a[i];
} else if (thard <= a[i] && second >= a[i]) {
thard = a[i];
}
} else {
top = a[i];
}
}
System.out.println(top);
System.out.println(second);
System.out.println(thard);
}
}
|
[["-", 64, 196, 0, 57, 15, 15, 0, 16, 17, 18], ["+", 64, 196, 0, 57, 15, 15, 0, 16, 17, 19], ["-", 75, 57, 15, 15, 0, 16, 31, 16, 17, 18], ["+", 75, 57, 15, 15, 0, 16, 31, 16, 17, 19], ["-", 75, 57, 15, 15, 0, 16, 12, 16, 17, 47], ["+", 75, 57, 15, 15, 0, 16, 12, 16, 17, 20]]
| 3
| 217
| 10
|
import java.util.*;
class Main {
public static void main(String[] a) {
Scanner inp = new Scanner(System.in);
int[] mount = new int[10];
for (int i = 0; i < mount.length; i++) {
mount[i] = inp.nextInt();
}
Arrays.sort(mount);
System.out.print(mount[9]);
System.out.print(mount[8]);
System.out.print(mount[7]);
}
}
|
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner inp = new Scanner(System.in);
int[] mount = new int[10];
for (int i = 0; i < mount.length; i++) {
mount[i] = inp.nextInt();
}
Arrays.sort(mount);
System.out.println(mount[9]);
System.out.println(mount[8]);
System.out.println(mount[7]);
}
}
|
[["+", 36, 36, 0, 493, 0, 235, 0, 494, 0, 259], ["-", 8, 498, 0, 195, 54, 495, 0, 496, 141, 22], ["+", 8, 498, 0, 195, 54, 495, 0, 496, 141, 22], ["-", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22], ["+", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22]]
| 3
| 117
| 9
|
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
int[] num = new int[10];
for (int i = 0; i < 10; i++) {
num[i] = Integer.valueOf(buf.readLine());
}
Arrays.sort(num);
for (int i = 0; i < 3; i++) {
System.out.println(num[i]);
}
}
}
|
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
int[] num = new int[10];
for (int i = 0; i < 10; i++) {
num[i] = Integer.valueOf(buf.readLine());
}
Arrays.sort(num);
for (int i = 0; i < 3; i++) {
System.out.println(num[9 - i]);
}
}
}
|
[["+", 0, 492, 3, 4, 0, 504, 71, 16, 31, 499], ["+", 0, 492, 3, 4, 0, 504, 71, 16, 17, 33]]
| 3
| 126
| 2
|
import java.util.*;
class Main {
public static void main(String[] a) {
int n = 10;
int[] num = new int[n];
Scanner stdin = new Scanner(System.in);
for (int i = 0; i < n; i++) {
num[i] = stdin.nextInt();
}
boolean flag = true;
while (flag) {
flag = false;
for (int j = n - 1; j >= 1; j--) {
if (num[j] < num[j - 1]) {
int tmp = num[j];
num[j] = num[j - 1];
num[j - 1] = tmp;
flag = true;
}
}
}
for (int i = 0; i < 4; i++) {
System.out.println(num[i]);
}
}
}
|
import java.util.*;
class Main {
public static void main(String[] a) {
int n = 10;
int[] num = new int[n];
Scanner stdin = new Scanner(System.in);
for (int i = 0; i < n; i++) {
num[i] = stdin.nextInt();
}
boolean flag = true;
while (flag) {
flag = false;
for (int j = n - 1; j >= 1; j--) {
if (num[j] > num[j - 1]) {
int tmp = num[j];
num[j] = num[j - 1];
num[j - 1] = tmp;
flag = true;
}
}
}
for (int i = 0; i < 3; i++) {
System.out.println(num[i]);
}
}
}
|
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 18], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 47], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 12, 499], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 12, 499]]
| 3
| 187
| 4
|
import java.util.*;
public class Main {
public static void main(String args[]) throws Exception {
Scanner sc = new Scanner(System.in);
Integer[] mount = new Integer[10];
int i = 0;
while (i != 9) {
mount[i] = sc.nextInt();
i++;
}
sort(mount);
sc.close();
}
public static void sort(Integer[] mlist) {
Arrays.sort(mlist);
for (int i = 9; i >= 7; i--) {
System.out.println(mlist[i]);
}
}
}
|
import java.util.*;
public class Main {
public static void main(String args[]) throws Exception {
Scanner sc = new Scanner(System.in);
Integer[] mount = new Integer[10];
int i = 0;
while (i != 10) {
mount[i] = sc.nextInt();
i++;
}
sort(mount);
sc.close();
}
public static void sort(Integer[] mlist) {
Arrays.sort(mlist);
for (int i = 9; i >= 7; i--) {
System.out.println(mlist[i]);
}
}
}
|
[["-", 8, 196, 0, 52, 15, 15, 0, 16, 12, 499], ["+", 8, 196, 0, 52, 15, 15, 0, 16, 12, 499]]
| 3
| 133
| 2
|
import java.io.*;
public class Main {
static int first = 0;
static int second = 0;
static int third = 0;
static int tmp = 0;
public static void main(String[] args) {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
try {
String buf = br.readLine();
for (int i = 0; i < 9; i++) {
tmp = Integer.parseInt(buf);
if (first <= tmp) {
third = second;
second = first;
first = tmp;
} else if (second <= tmp) {
third = second;
second = tmp;
} else if (third <= tmp) {
third = tmp;
}
buf = br.readLine();
}
} catch (Exception e) {
}
System.out.println(first + "\n" + second + "\n" + third);
}
}
|
import java.io.*;
public class Main {
static int first = 0;
static int second = 0;
static int third = 0;
static int tmp = 0;
public static void main(String[] args) {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
try {
String buf = br.readLine();
for (int i = 0; i <= 9; i++) {
tmp = Integer.parseInt(buf);
if (first <= tmp) {
third = second;
second = first;
first = tmp;
} else if (second <= tmp) {
third = second;
second = tmp;
} else if (third <= tmp) {
third = tmp;
}
buf = br.readLine();
}
} catch (Exception e) {
}
System.out.println(first + "\n" + second + "\n" + third);
}
}
|
[["-", 0, 246, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 246, 8, 196, 0, 7, 15, 16, 17, 19]]
| 3
| 191
| 2
|
import java.util.Scanner;
class Main {
public static void main(String[] a) {
Scanner sc = new Scanner(System.in);
int numone = 0;
int numtwo = 0;
int numthree = 0;
int x;
for (int i = 0; i < 9; i++) {
x = sc.nextInt();
if (numone <= x) {
numthree = numtwo;
numtwo = numone;
numone = x;
} else if (numtwo <= x) {
numthree = numtwo;
numtwo = x;
} else if (numthree <= x) {
numthree = x;
}
}
System.out.println(numone + "\n" + numtwo + "\n" + numthree);
}
}
|
import java.util.Scanner;
class Main {
public static void main(String[] a) {
Scanner sc = new Scanner(System.in);
int numone = 0;
int numtwo = 0;
int numthree = 0;
int x;
for (int i = 0; i < 10; i++) {
x = sc.nextInt();
if (numone <= x) {
numthree = numtwo;
numtwo = numone;
numone = x;
} else if (numtwo <= x) {
numthree = numtwo;
numtwo = x;
} else if (numthree <= x) {
numthree = x;
}
}
System.out.println(numone + "\n" + numtwo + "\n" + numthree);
}
}
|
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 12, 499], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 12, 499]]
| 3
| 147
| 2
|
import java.util.*;
class Main {
public static void main(String[] g) {
int i = 0, a[] = new int[10];
for (Scanner S = new Scanner(System.in); i < 9;)
a[i++] = S.nextInt();
Arrays.sort(a);
for (i = 9; i > 6;)
System.out.println(a[i--]);
}
}
|
import java.util.*;
class Main {
public static void main(String[] g) {
int i = 0, a[] = new int[10];
for (Scanner S = new Scanner(System.in); i < 10;)
a[i++] = S.nextInt();
Arrays.sort(a);
for (i = 9; i > 6;)
System.out.println(a[i--]);
}
}
|
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 12, 499], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 12, 499]]
| 3
| 99
| 2
|
import java.io.*;
import java.util.Arrays;
public class Main {
private static int[] mountains = new int[10];
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
for (int i = 0; i < 10; i++) {
mountains[i] = Integer.parseInt(br.readLine());
}
Arrays.sort(mountains);
for (int i = 9; i > 6; i++) {
System.out.println(mountains[i]);
}
}
}
|
import java.io.*;
import java.util.Arrays;
public class Main {
private static int[] mountains = new int[10];
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
for (int i = 0; i < 10; i++) {
mountains[i] = Integer.parseInt(br.readLine());
}
Arrays.sort(mountains);
for (int i = 9; i > 6; i--) {
System.out.println(mountains[i]);
}
}
}
|
[["-", 0, 195, 8, 196, 0, 7, 26, 27, 0, 29], ["+", 0, 195, 8, 196, 0, 7, 26, 27, 0, 68]]
| 3
| 128
| 2
|
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int[] res = new int[3];
for (int i = 0; i < 10; i++) {
int now = sc.nextInt();
if (now >= res[0]) {
int x = res[0];
int y = res[1];
res[0] = now;
res[1] = x;
res[2] = y;
} else {
if (now >= res[1]) {
int x = res[2];
res[1] = now;
res[2] = x;
} else {
if (now >= res[2]) {
res[2] = now;
}
}
}
}
for (int j = 0; j < res.length; j++) {
System.out.println(res[j]);
}
}
}
|
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int[] res = new int[3];
for (int i = 0; i < 10; i++) {
int now = sc.nextInt();
if (now >= res[0]) {
int x = res[0];
int y = res[1];
res[0] = now;
res[1] = x;
res[2] = y;
} else {
if (now >= res[1]) {
int x = res[1];
res[1] = now;
res[2] = x;
} else {
if (now >= res[2]) {
res[2] = now;
}
}
}
}
for (int j = 0; j < res.length; j++) {
System.out.println(res[j]);
}
}
}
|
[["-", 64, 196, 0, 503, 49, 200, 51, 504, 71, 499], ["+", 64, 196, 0, 503, 49, 200, 51, 504, 71, 499]]
| 3
| 208
| 2
|
import java.util.Arrays;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = 10, m = 3;
int alt[] = new int[n];
for (int i = 0; i < n; i++) {
alt[i] = sc.nextInt();
}
Arrays.sort(alt);
for (int i = 0; i < m - 1; i++) {
System.out.println(alt[n - i - 1]);
}
}
}
|
import java.util.Arrays;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = 10, m = 3;
int alt[] = new int[n];
for (int i = 0; i < n; i++) {
alt[i] = sc.nextInt();
}
Arrays.sort(alt);
for (int i = 0; i < m; i++) {
System.out.println(alt[n - i - 1]);
}
}
}
|
[["-", 8, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]]
| 3
| 129
| 2
|
import java.io.*;
import java.util.*;
class Main {
public static void main(String[] a) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int data[] = new int[10];
for (int i = 0; i < 10; i++) {
data[i] = Integer.parseInt(br.readLine());
}
Arrays.sort(data);
for (int i = 9; i >= 7; i--)
System.out.printf("%d", data[i]);
}
}
|
import java.io.*;
import java.util.*;
class Main {
public static void main(String[] a) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int data[] = new int[10];
for (int i = 0; i < 10; i++) {
data[i] = Integer.parseInt(br.readLine());
}
Arrays.sort(data);
for (int i = 9; i >= 7; i--)
System.out.printf("%d\n", data[i]);
}
}
|
[["+", 8, 1, 0, 492, 3, 4, 0, 5, 0, 44]]
| 3
| 127
| 1
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] h = new int[4];
for (int i = 0; i < h.length; i++) {
h[i] = sc.nextInt();
}
for (int i = 0; i < 3; i++) {
for (int j = i; j < h.length; j++) {
if (h[j] > h[i]) {
int max = h[j];
h[j] = h[i];
h[i] = max;
}
}
System.out.println(h[i]);
}
}
}
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] h = new int[10];
for (int i = 0; i < h.length; i++) {
h[i] = sc.nextInt();
}
for (int i = 0; i < 3; i++) {
for (int j = i; j < h.length; j++) {
if (h[j] > h[i]) {
int max = h[j];
h[j] = h[i];
h[i] = max;
}
}
System.out.println(h[i]);
}
}
}
|
[["-", 0, 503, 49, 200, 51, 227, 497, 505, 0, 499], ["+", 0, 503, 49, 200, 51, 227, 497, 505, 0, 499]]
| 3
| 160
| 2
|
import java.util.Arrays;
import java.util.Scanner;
class Main {
static void run() {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int mountain[] = new int[10];
for (int i = 0; i < 10; i++) {
mountain[i] = sc.nextInt();
}
Arrays.sort(mountain);
System.out.println(mountain[9] + " " + mountain[8] + " " + mountain[7]);
}
}
public static void main(String[] args) { run(); }
}
|
import java.util.Arrays;
import java.util.Scanner;
class Main {
static void run() {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int mountain[] = new int[10];
for (int i = 0; i < 10; i++) {
mountain[i] = sc.nextInt();
}
Arrays.sort(mountain);
System.out.println(mountain[9] + "\n" + mountain[8] + "\n" + mountain[7]);
}
}
public static void main(String[] args) { run(); }
}
|
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 491], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 44], ["-", 3, 4, 0, 16, 31, 16, 12, 5, 0, 491], ["+", 3, 4, 0, 16, 31, 16, 12, 5, 0, 44]]
| 3
| 137
| 4
|
import java.util.Arrays;
import java.util.Scanner;
class Main {
public static void main(String[] arg) {
Scanner cin = new Scanner(System.in);
int[] a = new int[10];
int[] c = new int[10];
for (int i = 0; i < 10; i++) {
a[i] = cin.nextInt();
c[i] = a[i];
}
Arrays.sort(a);
for (int i = 1; i < 3; i++) {
System.out.println(a[a.length - i]);
}
}
}
|
import java.util.Arrays;
import java.util.Scanner;
class Main {
public static void main(String[] arg) {
Scanner cin = new Scanner(System.in);
int[] a = new int[10];
int[] c = new int[10];
for (int i = 0; i < 10; i++) {
a[i] = cin.nextInt();
c[i] = a[i];
}
Arrays.sort(a);
for (int i = 1; i <= 3; i++) {
System.out.println(a[a.length - i]);
}
}
}
|
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
| 3
| 139
| 2
|
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int[] h = new int[10];
for (int i = 0; i < 10; i++) {
h[i] = sc.nextInt();
}
Arrays.sort(h);
for (int i = h.length - 1; i >= 0; i--) {
System.out.println(h[i]);
}
}
}
|
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int[] h = new int[10];
for (int i = 0; i < 10; i++) {
h[i] = sc.nextInt();
}
Arrays.sort(h);
for (int i = h.length - 1; i >= 7; i--) {
System.out.println(h[i]);
}
}
}
|
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 12, 499], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 12, 499]]
| 3
| 119
| 2
|
import java.util.*;
class Main {
public static int main(String a) {
Scanner scan = new Scanner(System.in);
int[] top = new int[10];
for (int i = 0; i < 10; i++) {
top[i] = scan.nextInt();
}
for (int i = 0; i < 10; i++) {
for (int j = 9; j > i; j--) {
if (top[j] > top[j - 1]) {
int multi = top[j];
top[j] = top[j - 1];
top[j - 1] = multi;
}
}
}
System.out.println(top[0]);
System.out.println(top[1]);
System.out.println(top[2]);
return 0;
}
}
|
import java.util.*;
class Main {
public static void main(String[] a) {
Scanner scan = new Scanner(System.in);
int[] top = new int[10];
for (int i = 0; i < 10; i++) {
top[i] = scan.nextInt();
}
for (int i = 0; i < 10; i++) {
for (int j = 9; j > i; j--) {
if (top[j] > top[j - 1]) {
int multi = top[j];
top[j] = top[j - 1];
top[j - 1] = multi;
}
}
}
System.out.println(top[0]);
System.out.println(top[1]);
System.out.println(top[2]);
}
}
|
[["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 493, 0, 235, 8, 498, 0, 195, 39, 508], ["+", 54, 495, 0, 496, 39, 224, 497, 497, 0, 70], ["+", 54, 495, 0, 496, 39, 224, 497, 497, 0, 73], ["-", 8, 498, 0, 195, 8, 196, 0, 1, 0, 35], ["-", 8, 498, 0, 195, 8, 196, 0, 37, 0, 38], ["-", 8, 498, 0, 195, 8, 196, 0, 37, 0, 499]]
| 3
| 186
| 7
|
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N = 10;
int array[] = new int[N];
for (int i = 0; i < 10; i++) {
String line = br.readLine();
array[i] = Integer.parseInt(line);
quickSort(0, N - 1, array);
}
for (int j = N - 1; j > 6; j--) {
System.out.println(array[j]);
}
}
private static void quickSort(int bottom, int top, int[] data) {
int lower, upper;
if (bottom >= top)
return;
int div = data[bottom];
for (lower = bottom, upper = top; lower < upper;) {
while (lower <= upper && data[lower] <= div)
lower++;
while (lower <= upper && data[upper] > div)
upper--;
if (lower < upper) {
int temp = data[lower];
data[lower] = data[upper];
data[upper] = temp;
}
}
int temp = data[bottom];
data[bottom] = data[upper];
data[upper] = temp;
quickSort(bottom, upper - 1, data);
quickSort(upper + 1, top, data);
}
}
|
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N = 10;
int array[] = new int[N];
for (int i = 0; i < 10; i++) {
String line = br.readLine();
array[i] = Integer.parseInt(line);
}
quickSort(0, N - 1, array);
for (int j = N - 1; j > 6; j--) {
System.out.println(array[j]);
}
}
private static void quickSort(int bottom, int top, int[] data) {
int lower, upper;
if (bottom >= top)
return;
int div = data[bottom];
for (lower = bottom, upper = top; lower < upper;) {
while (lower <= upper && data[lower] <= div)
lower++;
while (lower <= upper && data[upper] > div)
upper--;
if (lower < upper) {
int temp = data[lower];
data[lower] = data[upper];
data[upper] = temp;
}
}
int temp = data[bottom];
data[bottom] = data[upper];
data[upper] = temp;
quickSort(bottom, upper - 1, data);
quickSort(upper + 1, top, data);
}
}
|
[["+", 0, 195, 8, 196, 0, 7, 8, 196, 0, 46], ["-", 0, 195, 8, 196, 0, 7, 8, 196, 0, 46]]
| 3
| 303
| 2
|
package Package;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int max = Integer.MIN_VALUE;
ArrayList<Integer> arr = new ArrayList<Integer>();
for (int i = 0; i < 10000; i++) {
String input = br.readLine();
if (!input.equals("")) {
int inputAngka = Integer.parseInt(input);
arr.add(inputAngka);
}
}
int[] arrayResult = new int[arr.size()];
for (int i = 0; i < arr.size(); i++) {
arrayResult[i] = arr.get(i);
}
Arrays.sort(arrayResult);
int max1 = arrayResult[arrayResult.length - 1];
int max2 = arrayResult[arrayResult.length - 2];
int max3 = arrayResult[arrayResult.length - 3];
System.out.println(max1);
System.out.println(max2);
System.out.println(max3);
}
}
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int max = Integer.MIN_VALUE;
ArrayList<Integer> arr = new ArrayList<Integer>();
for (int i = 0; i < 10; i++) {
String input = br.readLine();
if (!input.equals("")) {
int inputAngka = Integer.parseInt(input);
arr.add(inputAngka);
}
}
int[] arrayResult = new int[arr.size()];
for (int i = 0; i < arr.size(); i++) {
arrayResult[i] = arr.get(i);
}
Arrays.sort(arrayResult);
int max1 = arrayResult[arrayResult.length - 1];
int max2 = arrayResult[arrayResult.length - 2];
int max3 = arrayResult[arrayResult.length - 3];
System.out.println(max1);
System.out.println(max2);
System.out.println(max3);
}
}
|
[["-", 36, 36, 36, 36, 0, 493, 0, 501, 0, 483], ["-", 36, 36, 36, 36, 0, 493, 0, 501, 0, 22], ["-", 36, 36, 36, 36, 0, 493, 0, 501, 0, 35], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 12, 499], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 12, 499]]
| 3
| 272
| 5
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n[] = new int[10];
int a = 0;
int b = 0;
int c = 0;
for (int i = 0; i < 10; i++) {
n[i] = sc.nextInt();
if (a <= n[i]) {
b = a;
a = n[i];
} else if (b <= n[i]) {
c = b;
b = n[i];
} else if (c <= n[i]) {
c = n[i];
}
}
System.out.println(a);
System.out.println(b);
System.out.println(c);
}
}
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n[] = new int[10];
int a = 0;
int b = 0;
int c = 0;
for (int i = 0; i < 10; i++) {
n[i] = sc.nextInt();
if (a <= n[i]) {
c = b;
b = a;
a = n[i];
} else if (b <= n[i]) {
c = b;
b = n[i];
} else if (c <= n[i]) {
c = n[i];
}
}
System.out.println(a);
System.out.println(b);
System.out.println(c);
}
}
|
[["+", 0, 57, 64, 196, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 12, 22], ["+", 8, 196, 0, 57, 64, 196, 0, 1, 0, 35]]
| 3
| 179
| 4
|
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;
/**
* Created by keisuke on 2014/06/23.
*/
public class Main {
public static void main(String[] args) {
int[] hills = new int[10];
Scanner scanner =
new Scanner(new BufferedReader(new InputStreamReader(System.in)));
for (int i = 0; i < 10; i++) {
hills[i] = scanner.nextInt();
}
Arrays.sort(hills);
printListOfTop3Hills(hills);
}
public static void printListOfTop3Hills(int[] hills) {
for (int i = 9; i > 5; i--) {
System.out.println(hills[i]);
}
}
}
|
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int[] hills = new int[10];
Scanner scanner =
new Scanner(new BufferedReader(new InputStreamReader(System.in)));
for (int i = 0; i < 10; i++) {
hills[i] = scanner.nextInt();
}
Arrays.sort(hills);
printListOfTop3Hills(hills);
}
public static void printListOfTop3Hills(int[] hills) {
for (int i = 9; i > 6; i--) {
System.out.println(hills[i]);
}
}
}
|
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 12, 499], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 12, 499]]
| 3
| 155
| 2
|
#include <stdio.h>
int main(void) {
int one, two, three, num;
int i;
one = two = three = num = 0;
for (i = 0; i < 10; i++) {
scanf("%d", &num);
if (num >= one) {
three = two;
two = one;
one = num;
} else if (num >= one) {
three = two;
two = num;
} else if (num >= three) {
three = num;
}
}
printf("%d\n%d\n%d\n", one, two, three);
return 0;
}
|
#include <stdio.h>
int main(void) {
int one, two, three, num;
int i;
one = two = three = num = 0;
for (i = 0; i < 10; i++) {
scanf("%d", &num);
if (num >= one) {
three = two;
two = one;
one = num;
} else if (num >= two) {
three = two;
two = num;
} else if (num >= three) {
three = num;
}
}
printf("%d\n%d\n%d\n", one, two, three);
return 0;
}
|
[["-", 75, 76, 0, 57, 15, 23, 0, 16, 12, 22], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 12, 22]]
| 0
| 127
| 2
|
#include <stdio.h>
int main(void) {
int i, j, a[10], t;
for (i = 0; i < 10; i++) {
scanf("%d", &a[i]);
}
for (i = 0; i < 10; i++) {
for (j = 0; j < 10 - 1; j++) {
if (a[j] < a[j + 1]) {
t = a[j + 1];
a[j + 1] = a[j];
a[j] = t;
}
}
}
for (i = 0; i < 3; i++) {
printf("%5d", a[i]);
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int i, j, a[10], t;
for (i = 0; i < 10; i++) {
scanf("%d", &a[i]);
}
for (i = 0; i < 10; i++) {
for (j = 0; j < 10 - 1; j++) {
if (a[j] < a[j + 1]) {
t = a[j + 1];
a[j + 1] = a[j];
a[j] = t;
}
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", a[i]);
}
return 0;
}
|
[["-", 0, 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, 44]]
| 0
| 155
| 3
|
#include <iostream>
using namespace std;
int main() {
int a[100] = {0};
for (int i = 0; i < 10; i++) {
cin >> a[i];
}
int big1, big2, big3;
big1 = a[0];
big2 = big3 = 0;
for (int k = 1; k < 10; k++) {
if (a[k] > big1) {
big3 = big2;
big2 = big1;
big1 = a[k];
} else if (a[k] > big2) {
big3 = big2;
big2 = a[k];
} else if (a[k] > big3) {
big3 = a[k];
}
}
cout << big1 << " " << big2 << " " << big3 << endl;
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
int a[100] = {0};
for (int i = 0; i < 10; i++) {
cin >> a[i];
}
int big1, big2, big3;
big1 = a[0];
big2 = big3 = 0;
for (int k = 1; k < 10; k++) {
if (a[k] > big1) {
big3 = big2;
big2 = big1;
big1 = a[k];
} else if (a[k] > big2) {
big3 = big2;
big2 = a[k];
} else if (a[k] > big3) {
big3 = a[k];
}
}
cout << big1 << endl << big2 << endl << big3 << endl;
return 0;
}
|
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22]]
| 1
| 170
| 8
|
// List_of _Top_3_Hills.cpp : ???????????????
// ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#include <stdio.h>
#define sort 10
int main() {
int bab[sort], temp;
for (int n = 0; n < sort; n++) {
scanf("%d", &bab[sort]);
}
for (int i = 0; i < sort - 1; i++) {
for (int j = sort - 1; j > i; j--) {
if (bab[j - 1] < bab[j]) {
temp = bab[j];
bab[j] = bab[j - 1];
bab[j - 1] = temp;
}
}
}
for (int m = 0; m < 3; m++) {
printf("%d\n", bab[m]);
}
return 0;
}
|
// List_of _Top_3_Hills.cpp : ???????????????
// ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#include <stdio.h>
#define sort 10
int main() {
int bab[sort], temp;
for (int n = 0; n < sort; n++) {
scanf("%d", &bab[n]);
}
for (int i = 0; i < sort - 1; i++) {
for (int j = sort - 1; j > i; j--) {
if (bab[j - 1] < bab[j]) {
temp = bab[j];
bab[j] = bab[j - 1];
bab[j - 1] = temp;
}
}
}
for (int m = 0; m < 3; m++) {
printf("%d\n", bab[m]);
}
return 0;
}
|
[["-", 3, 4, 0, 66, 28, 69, 341, 342, 0, 22], ["+", 3, 4, 0, 66, 28, 69, 341, 342, 0, 22]]
| 1
| 163
| 2
|
#include <algorithm>
#include <iostream>
int main() {
int data[10];
for (int i = 0; i < 10; i++) {
std::cin >> data[i];
}
std::sort(data, data + 10, std::greater<int>());
for (int i = 0; i < 10; i++) {
std::cout << data[i] << std::endl;
}
}
|
#include <algorithm>
#include <iostream>
int main() {
int data[10];
for (int i = 0; i < 10; i++) {
std::cin >> data[i];
}
std::sort(data, data + 10, std::greater<int>());
for (int i = 0; i < 3; i++) {
std::cout << data[i] << std::endl;
}
}
|
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
| 1
| 90
| 2
|
#include <algorithm>
#include <cstdio>
using namespace std;
int main(void) {
int i, array[10];
for (i = 0; i < 10; i++)
scanf("%d", &array[i]);
sort(array, array + 10);
for (i = 9; i >= 7; i++)
printf("%d\n", array[i]);
return 0;
}
|
#include <algorithm>
#include <cstdio>
using namespace std;
int main(void) {
int i, array[10];
for (i = 0; i < 10; i++)
scanf("%d", &array[i]);
sort(array, array + 10);
for (i = 9; i >= 7; i--)
printf("%d\n", array[i]);
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 17, 68]]
| 1
| 87
| 2
|
#include <stdio.h>
int main() {
int height[10], rank[3] = {0};
int i;
for (i = 0; i < 10; i++) {
scanf("%d\n", height[i]);
if (rank[0] < height[i]) {
rank[2] = rank[1];
rank[1] = rank[0];
rank[0] = height[i];
} else if (rank[1] < height[i]) {
rank[2] = rank[1];
rank[1] = height[i];
} else if (rank[2] < height[i]) {
rank[2] = height[i];
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", rank[i]);
}
return 0;
}
|
#include <stdio.h>
int main() {
int height[10], rank[3] = {0};
int i;
for (i = 0; i < 10; i++) {
scanf("%d\n", &height[i]);
if (rank[0] < height[i]) {
rank[2] = rank[1];
rank[1] = rank[0];
rank[0] = height[i];
} else if (rank[1] < height[i]) {
rank[2] = rank[1];
rank[1] = height[i];
} else if (rank[2] < height[i]) {
rank[2] = height[i];
}
}
for (i = 0; i < 3; i++) {
printf("%d\n", rank[i]);
}
return 0;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]]
| 1
| 189
| 1
|
#include <iostream>
using namespace std;
int main() {
int m[10], temp;
for (int i = 0; i < 10; i++)
cin >> m[i];
for (int i = 0; i < 4; i++) {
for (int j = i + 1; j < 10; j++) {
if (m[i] < m[j]) {
temp = m[i];
m[i] = m[j];
m[j] = temp;
}
}
cout << m[i] << endl;
}
}
|
#include <iostream>
using namespace std;
int main() {
int m[10], temp;
for (int i = 0; i < 10; i++)
cin >> m[i];
for (int i = 0; i < 3; i++) {
for (int j = i + 1; j < 10; j++) {
if (m[i] < m[j]) {
temp = m[i];
m[i] = m[j];
m[j] = temp;
}
}
cout << m[i] << endl;
}
}
|
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
| 1
| 122
| 2
|
#include <iostream>
using namespace std;
int main() {
int first = 0, second = 0, third = 0;
for (int i = 0; i < 10; i++) {
int n;
cin >> n;
if (n > first) {
third = second;
second = first;
first = n;
} else if (n > second) {
third = second;
second = n;
} else if (n > third) {
third = n;
}
}
cout << first << " " << second << " " << third << endl;
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
int first = 0, second = 0, third = 0;
for (int i = 0; i < 10; i++) {
int n;
cin >> n;
if (n > first) {
third = second;
second = first;
first = n;
} else if (n > second) {
third = second;
second = n;
} else if (n > third) {
third = n;
}
}
cout << first << "\n" << second << "\n" << third << endl;
return 0;
}
|
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 44], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 44]]
| 1
| 119
| 4
|
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int m[10];
for (int i = 0; i < 9; i++)
cin >> m[i];
sort(m, m + 10);
for (int i = 9; i > 6; i++)
cout << m[i] << endl;
return 0;
}
|
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int m[10];
for (int i = 0; i < 10; i++)
cin >> m[i];
sort(m, m + 10);
for (int i = 9; i > 6; i--)
cout << m[i] << endl;
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 17, 68]]
| 1
| 76
| 4
|
#include <iostream>
using namespace std;
int main() {
int x[10], tmp, i, j;
for (i = 0; i < 10; ++i)
cin >> x[i];
for (i = 0; i < 10; ++i) {
for (j = 0; j < 10; ++j) {
if (x[i] < x[j]) {
tmp = x[i];
x[i] = x[j];
x[j] = tmp;
}
}
}
for (i = 0; i < 3; ++i)
cout << x[i] << "\n";
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
int x[10], tmp, i, j;
for (i = 0; i < 10; ++i)
cin >> x[i];
for (i = 0; i < 10; ++i) {
for (j = i + 1; j < 10; ++j) {
if (x[i] < x[j]) {
tmp = x[i];
x[i] = x[j];
x[j] = tmp;
}
}
}
for (i = 0; i < 3; ++i)
cout << x[i] << "\n";
return 0;
}
|
[["-", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 8, 9, 0, 7, 10, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 7, 10, 11, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 10, 11, 12, 16, 12, 13]]
| 1
| 139
| 4
|
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a[10];
for (int i = 0; i < 10; i++) {
cin >> a[i];
}
for (int x = 0; x < 9; x++) {
for (int i = 0; i < 9; i++) {
if (a[i] > a[i + 1]) {
swap(a[i], a[i + 1]);
}
}
}
cout << a[9] << " " << a[8] << " " << a[7] << endl;
return 0;
}
|
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a[10];
for (int i = 0; i < 10; i++) {
cin >> a[i];
}
for (int x = 0; x < 9; x++) {
for (int i = 0; i < 9; i++) {
if (a[i] > a[i + 1]) {
swap(a[i], a[i + 1]);
}
}
}
cout << a[9] << endl;
cout << a[8] << endl;
cout << a[7] << endl;
return 0;
}
|
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
| 1
| 136
| 12
|
#include <algorithm>
#include <iostream>
using namespace std;
;
int main() {
int i, a[10];
for (i = 0; i < 10; i++) {
cin >> a[i];
}
sort(a, a + 10);
cout << a[9] << a[8] << a[7] << endl;
return 0;
}
|
#include <algorithm>
#include <iostream>
using namespace std;
;
int main() {
int i, a[10];
for (i = 0; i < 10; i++) {
cin >> a[i];
}
sort(a, a + 10);
cout << a[9] << endl << a[8] << endl << a[7] << endl;
return 0;
}
|
[["+", 31, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 17, 151], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 17, 151], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22]]
| 1
| 76
| 4
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int i, a[10];
for (i = 0; i < 10; i++)
cin >> a[i];
sort(a, a + 9);
cout << a[9] << endl << a[8] << endl << a[7] << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int i, a[10];
for (i = 0; i < 10; i++)
cin >> a[i];
sort(a, a + 10);
cout << a[9] << endl << a[8] << endl << a[7] << endl;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
| 1
| 72
| 9
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int i, a[10];
for (i = 0; i < 10; i++)
cin >> a[i];
sort(a, a + 9);
cout << a[9] << endl << a[8] << endl << a[7] << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a[10];
for (int i = 0; i <= 9; i++)
cin >> a[i];
sort(a, a + 10);
cout << a[9] << endl << a[8] << endl << a[7] << endl;
}
|
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
| 1
| 72
| 9
|
#include <iostream>
using namespace std;
int main() {
int height;
int top[3] = {0, 0, 0};
for (int i = 0; i < 10; i++) {
cin >> height;
for (int j = 0; j < 3; j++) {
if (top[j] <= height) {
for (int k = 2; k > 2 - j; k--) {
top[k] = top[k - 1];
}
top[j] = height;
break;
}
}
}
for (int i = 0; i < 3; i++) {
cout << top[i] << endl;
}
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
int height;
int top[3] = {0, 0, 0};
for (int i = 0; i < 10; i++) {
cin >> height;
for (int j = 0; j < 3; j++) {
if (top[j] <= height) {
for (int k = 2; k > j; k--) {
top[k] = top[k - 1];
}
top[j] = height;
break;
}
}
}
for (int i = 0; i < 3; i++) {
cout << top[i] << endl;
}
return 0;
}
|
[["-", 64, 9, 0, 7, 15, 16, 12, 16, 31, 13], ["-", 64, 9, 0, 7, 15, 16, 12, 16, 17, 33]]
| 1
| 143
| 2
|
#include <algorithm>
#include <iostream>
using namespace ::std;
int main() {
int array[10];
for (int i = 0; i < 10; i++)
cin >> array[i];
sort(array, array + 10);
for (int i = 9; i > 6; i++)
cout << array[i] << endl;
return 0;
}
|
#include <algorithm>
#include <iostream>
using namespace ::std;
int main() {
int array[10];
for (int i = 0; i < 10; i++)
cin >> array[i];
sort(array, array + 10);
for (int i = 9; i > 6; i--)
cout << array[i] << endl;
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 17, 68]]
| 1
| 77
| 2
|
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> v;
int num;
for (int i = 0; i < 10; i++) {
cin >> num;
v.push_back(num);
}
sort(v.begin(), v.end(), greater<int>());
for (int i = 0; i < 3; i++)
cout << v.at(i);
return 0;
}
|
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> v;
int num;
for (int i = 0; i < 10; i++) {
cin >> num;
v.push_back(num);
}
sort(v.begin(), v.end(), greater<int>());
for (int i = 0; i < 3; i++)
cout << v.at(i) << endl;
return 0;
}
|
[["+", 8, 9, 0, 7, 8, 1, 0, 16, 17, 151], ["+", 8, 9, 0, 7, 8, 1, 0, 16, 12, 22]]
| 1
| 100
| 2
|
#include <iostream>
using namespace std;
int main() {
int height[10];
for (int i = 0; i < 10; i++) {
cin >> height[i];
}
int top[3] = {0};
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 3; j++) {
if (height[i] > top[j]) {
for (int k = 2; k > j; k--) {
top[k] = top[k - 1];
}
top[j] = height[i];
}
}
}
for (int j = 0; j < 3; j++) {
cout << top[j] << endl;
}
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
int height[10];
for (int i = 0; i < 10; i++) {
cin >> height[i];
}
int top[3] = {0};
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 3; j++) {
if (height[i] > top[j]) {
for (int k = 2; k > j; k--) {
top[k] = top[k - 1];
}
top[j] = height[i];
break;
}
}
}
for (int j = 0; j < 3; j++) {
cout << top[j] << endl;
}
return 0;
}
|
[["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35]]
| 1
| 163
| 2
|
#include <stdio.h>
using namespace std;
int main() {
int length;
int a, b, c, tmp;
a = b = c = 0;
for (int i = 0; i < 10; i++) {
scanf("%d", &length);
if (length > a) {
if (length > b) {
a = b;
if (length > c) {
b = c;
c = length;
} else {
b = length;
}
} else {
a = length;
}
}
printf("%d\n", c);
printf("%d\n", b);
printf("%d\n", a);
}
return 0;
}
|
#include <stdio.h>
using namespace std;
int main() {
int length;
int a, b, c, tmp;
a = b = c = 0;
for (int i = 0; i < 10; i++) {
scanf("%d", &length);
if (length > a) {
if (length > b) {
a = b;
if (length > c) {
b = c;
c = length;
} else {
b = length;
}
} else {
a = length;
}
}
}
printf("%d\n", c);
printf("%d\n", b);
printf("%d\n", a);
return 0;
}
|
[["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]]
| 1
| 141
| 2
|
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int sum[10];
int i;
for (i = 0; i < 10; i++)
cin >> sum[i];
sort(sum + 1, sum + 10);
for (i = 9; i > 6; i--)
cout << sum[i] << endl;
return 0;
}
|
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int sum[10], i;
for (i = 0; i < 10; i++)
cin >> sum[i];
sort(sum, sum + 10);
for (i = 9; i > 6; i--)
cout << sum[i] << endl;
return 0;
}
|
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
| 1
| 79
| 5
|
#include <algorithm>
#include <cstdio>
using namespace std;
const int N = 10;
int a[N];
int main() {
for (int i = 0; i < N; i++) {
scanf("%d", &a[i]);
}
sort(a, a + N);
for (int i = 1; i <= 3; i++)
printf("%d/n", a[N - i]);
}
|
#include <algorithm>
#include <cstdio>
using namespace std;
const int N = 10;
int a[N];
int main() {
for (int i = 0; i < N; i++) {
scanf("%d", &a[i]);
}
sort(a, a + N);
for (int i = 1; i < 4; i++)
printf("%d\n", a[N - i]);
}
|
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 8, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 8, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 8, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 1
| 92
| 7
|
#include <bits/stdc++.h>
using namespace std;
int n, a[50];
int main() {
cin >> n;
for (int i = 1; i <= n; i++)
cin >> a[i];
sort(a + 1, a + 1 + n);
for (int i = n; i >= n - 2; i--) {
cout << a[i] << endl;
}
}
|
#include <bits/stdc++.h>
using namespace std;
int n, a[50];
int main() {
n = 10;
for (int i = 1; i <= n; i++)
cin >> a[i];
sort(a + 1, a + 1 + n);
for (int i = n; i >= n - 2; i--) {
cout << a[i] << endl;
}
}
|
[["-", 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, 11, 17, 32], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]]
| 1
| 85
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.