buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
#include <math.h>
#include <stdio.h>
int main() {
int cardS[12] = {0}, cardH[12] = {0}, cardC[12] = {0}, cardD[12] = {0};
int mark = 0, rank = 0, i = 0, n = 0;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
scanf(" %c %d", &mark, &rank);
if (mark == 'S') {
cardS[rank - 1] = 1;
} else if (mark... | #include <math.h>
#include <stdio.h>
int main() {
int cardS[13] = {0}, cardH[13] = {0}, cardC[13] = {0}, cardD[13] = {0};
int mark = 0, rank = 0, i = 0, n = 0;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
scanf(" %c %d", &mark, &rank);
if (mark == 'S') {
cardS[rank - 1] = 1;
} else if (mark... | [["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13]] | 0 | 336 |
#include <stdio.h>
int main(void) {
int i, j, k, n, b;
char S[13], H[13], C[13], D[13], a;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%c %d\n", &a, &b);
if (a == 'S') {
S[b - 1] = b;
} else if (a == 'H') {
H[b - 1] = b;
} else if (a == 'C') {
C[b - 1] = b;
} else ... | #include <stdio.h>
int main(void) {
int i, j, k, n, b;
char S[13], H[13], C[13], D[13], a;
scanf("%d", &n);
for (i = 0; i < n + 1; i++) {
scanf("%c %d\n", &a, &b);
if (a == 'S') {
S[b - 1] = b;
} else if (a == 'H') {
H[b - 1] = b;
} else if (a == 'C') {
C[b - 1] = b;
} e... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 0 | 326 |
#include <stdio.h>
int main() {
int a[4][13], i, j, k, x, n;
char m;
for (i = 0; i < 4; i++) {
for (j = 0; j < 13; j++) {
a[i][j] = 0;
}
}
scanf("%d", &n);
for (k = 0; k < n; k++) {
scanf("%c%d", m, x);
if (m == 'S')
a[0][x - 1] = 1;
else if (m == 'H')
a[1][x - 1] = ... | #include <stdio.h>
int main() {
int a[4][13], i, j, k, x, n;
char m;
for (i = 0; i < 4; i++) {
for (j = 0; j < 13; j++) {
a[i][j] = 0;
}
}
scanf("%d", &n);
for (k = 0; k < n; k++) {
scanf(" %c%d", &m, &x);
if (m == 'S')
a[0][x - 1] = 1;
else if (m == 'H')
a[1][x - 1]... | [["-", 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, 66, 17, 67]] | 0 | 311 |
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
int x, y, cards[4][14];
for (x = 0; x < 4; x++) {
for (y = 1; y <= 13; y++) {
cards[x][y] = 0;
}
}
int i, number, suit;
char c;
for (i = 0; i < n; i++) {
scanf("%c %d", &c, &number);
if (c == 'S')
suit = 0;
if ... | #include <stdio.h>
int main() {
int n;
scanf("%d", &n);
int x, y, cards[4][14];
for (x = 0; x < 4; x++) {
for (y = 1; y <= 13; y++) {
cards[x][y] = 0;
}
}
int i, number, suit;
char c;
for (i = 0; i < n; i++) {
scanf("%c %c %d", &c, &c, &number);
if (c == 'S')
suit = 0;
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 28, 22]] | 0 | 282 |
#include <stdio.h>
void to_card(int idx, char *suit, int *rank) {
switch (idx / 13) {
case 0:
*suit = 'S';
break;
case 1:
*suit = 'H';
break;
case 2:
*suit = 'C';
break;
case 3:
*suit = 'D';
break;
}
*rank = idx % 4 + 1;
}
void to_idx(char suit, int rank, int *idx) {
sw... | #include <stdio.h>
void to_card(int idx, char *suit, int *rank) {
switch (idx / 13) {
case 0:
*suit = 'S';
break;
case 1:
*suit = 'H';
break;
case 2:
*suit = 'C';
break;
case 3:
*suit = 'D';
break;
}
*rank = idx % 13 + 1;
}
void to_idx(char suit, int rank, int *idx) {
s... | [["-", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13]] | 0 | 327 |
#include <stdio.h>
int main(void) {
int card[4][13] = {};
char symbol;
int number;
int n;
int i, j;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%c %d", &symbol, &number);
switch (symbol) {
case 'S':
card[0][number - 1] = 1;
break;
case 'H':
card[1][number - 1] = ... | #include <stdio.h>
int main(void) {
int card[4][13] = {};
char symbol;
int number;
int n;
int i, j;
scanf("%d", &n);
for (i = 0; i < n * 2; i++) {
scanf("%c %d", &symbol, &number);
switch (symbol) {
case 'S':
card[0][number - 1] = 1;
break;
case 'H':
card[1][number - 1... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 48], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 0 | 276 |
#include <stdio.h>
int main(void) {
int i, j, n, x, card[4][13]; /* ?????????S,H,C,D ????????? */
char mark;
/* ????????? */
for (i = 0; i < 4; i++) {
for (j = 0; j < 13; j++) {
card[i][j] = 0;
}
}
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%c %d", &mark, &x);
switch (mark)... | #include <stdio.h>
int main(void) {
int i, j, n, x, card[4][13]; /* ?????????S,H,C,D ????????? */
char mark;
/* ????????? */
for (i = 0; i < 4; i++) {
for (j = 0; j < 13; j++) {
card[i][j] = 0;
}
}
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%*c%c %d", &mark, &x);
switch (ma... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 312 |
#include <stdio.h>
int main() {
int i, n, rank;
int s[13] = {}, h[13] = {}, c[13] = {}, d[13] = {};
char mark;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%c %d ", &mark, &rank);
switch (mark) {
case 'S':
s[rank - 1] = 1;
break;
case 'H':
h[rank - 1] = 1;
break;
... | #include <stdio.h>
int main() {
int i, n, rank;
int s[13] = {}, h[13] = {}, c[13] = {}, d[13] = {};
char mark;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf(" %c %d", &mark, &rank);
switch (mark) {
case 'S':
s[rank - 1] = 1;
break;
case 'H':
h[rank - 1] = 1;
break;
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 314 |
#include <stdio.h>
int main(void) {
int j, n, N, c;
char s;
int a[4][13] = {0};
scanf("%d", &N);
for (c = 0; c < N; c++) {
scanf("%c %d", &s, &n);
switch (s) {
case 'S':
a[0][n - 1] = 1;
break;
case 'H':
a[1][n - 1] = 1;
break;
case 'C':
a[2][n - 1] = 1;
... | #include <stdio.h>
int main(void) {
int j, n, N, c;
char s;
int a[4][13] = {0};
scanf("%d", &N);
for (c = 0; c < N; c++) {
scanf(" %c %d", &s, &n);
switch (s) {
case 'S':
a[0][n - 1] = 1;
break;
case 'H':
a[1][n - 1] = 1;
break;
case 'C':
a[2][n - 1] = 1;
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 321 |
#include <stdio.h>
int main(void) {
int i, j, n, num, card[4][13];
char mark;
for (i = 0; i < 4; i++) {
for (j = 0; j < 13; j++) {
card[i][j] = 0;
}
}
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%c %d", &mark, &num);
switch (mark) {
case 'S':
card[0][(num - 1)] = 1;
... | #include <stdio.h>
int main(void) {
int i, j, n, num, card[4][13];
char mark;
for (i = 0; i < 4; i++) {
for (j = 0; j < 13; j++) {
card[i][j] = 0;
}
}
scanf("%d\n", &n);
for (i = 0; i < n; i++) {
scanf("%c %d\n", &mark, &num);
switch (mark) {
case 'S':
card[0][(num - 1)] = 1;... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 326 |
#include <stdio.h>
int main(void) {
int cards[4][13], n, i, j, rank;
char type;
for (i = 0; i < 4; i++) {
for (j = 0; j < 13; j++) {
cards[i][j] = 0;
}
}
scanf("%d", &n);
for (n; n > 0; n--) {
scanf("%c %d", &type, &rank);
if (type == 'S')
i = 0;
else if (type == 'H')
... | #include <stdio.h>
int main(void) {
int cards[4][13], n, i, j, rank;
char type;
for (i = 0; i < 4; i++) {
for (j = 0; j < 13; j++) {
cards[i][j] = 0;
}
}
scanf("%d\n", &n);
for (n; n > 0; n--) {
scanf("%c %d\n", &type, &rank);
if (type == 'S')
i = 0;
else if (type == 'H')
... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 288 |
#include <stdio.h>
int main() {
int n, i, j, k, c[4][13], y;
char x;
for (i = 0; i < 4; i++) {
for (j = 0; j < 13; j++) {
c[i][j] = 0;
}
}
scanf("%d", &n);
for (k = 0; k < n; k++) {
scanf("%c %d", &x, &y);
if (x == 'S') {
c[0][y - 1] = 1;
} else if (x == 'H') {
... | #include <stdio.h>
int main() {
int n, i, j, k, c[4][13], y;
char x;
for (i = 0; i < 4; i++) {
for (j = 0; j < 13; j++) {
c[i][j] = 0;
}
}
scanf("%d", &n);
for (k = 0; k < n * 2; k++) {
scanf("%c %d", &x, &y);
if (x == 'S') {
c[0][y - 1] = 1;
} else if (x == 'H') {
... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 48], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 0 | 332 |
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int i, m, n, card[52];
char suit;
for (i = 0; i < 52; i++)
card[i] = 1;
scanf("%d", &n);
for (i = 0; i < n; i++) {
switch (scanf("%c %d", &suit, &m), suit) {
case 'S':
card[0 * 13 + m - 1] = 0;
break;
case 'H':
card[1 ... | #include <stdio.h>
#include <stdlib.h>
int main(void) {
int i, m, n, card[52];
char suit;
for (i = 0; i < 52; i++)
card[i] = 1;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf(" %c %d", &suit, &m);
switch (suit) {
case 'S':
card[0 * 13 + m - 1] = 0;
break;
case 'H':
ca... | [["-", 8, 9, 0, 7, 8, 9, 0, 99, 0, 155], ["-", 0, 7, 8, 9, 0, 99, 15, 23, 0, 24], ["-", 0, 34, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 8, 9, 0, 99, 15, 23, 0, 34, 0, 21], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 7, 8, 9, 0, 99, 0, 155], ["+", 0, 7, 8, 9, 0, 99, 15, 23, 0, 24]] | 0 | 283 |
#include <stdio.h>
int main(void) {
/*4???13??????????¬??????????trump?????£?¨?
0??????S 1??????H 2??????C 3??????D */
int trump[4][13]; //?????????????????????????????°???0???
int j = 0;
int i = 0; // for???????????????????????°
int n = 0; //?????????????????°???????´????????????°
char s... | #include <stdio.h>
int main(void) {
/*4???13??????????¬??????????trump?????£?¨?
0??????S 1??????H 2??????C 3??????D */
int trump[4][13]; //?????????????????????????????°???0???
int j = 0;
int i = 0; // for???????????????????????°
int n = 0; //?????????????????°???????´????????????°
char s... | [["-", 15, 23, 0, 16, 31, 69, 28, 69, 71, 13], ["+", 15, 23, 0, 16, 31, 69, 28, 69, 71, 13]] | 0 | 406 |
#include <math.h>
#include <stdio.h>
int main(int argc, const char *argv[]) {
int Cards[4][13], i, j, n, number;
char suit;
for (i = 0; i < 4; i++) {
for (j = 0; j < 13; j++) {
Cards[i][j] = 1;
}
}
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%c %d", &suit, &number);
if (su... | #include <math.h>
#include <stdio.h>
int main(int argc, const char *argv[]) {
int Cards[4][13], i, j, n, number;
char suit;
for (i = 0; i < 4; i++) {
for (j = 0; j < 13; j++) {
Cards[i][j] = 1;
}
}
scanf("%d", &n);
for (i = 0; i < n * 2; i++) {
scanf("%c %d", &suit, &number);
if ... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 48], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 0 | 330 |
#include <stdio.h>
int main() {
int n = 0, i, j;
int a[4][14] = {0};
char b;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%c %d\n", &b, &j);
if (b == 'S') {
a[0][j] = 1;
} else if (b == 'H') {
a[1][j] = 1;
} else if (b == 'C') {
a[2][j] = 1;
} else if (b == 'D') {
... | #include <stdio.h>
int main(void) {
int n, i, j;
int a[4][14] = {0};
char b;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf(" %c %d", &b, &j);
if (b == 'S') {
a[0][j] = 1;
} else if (b == 'H') {
a[1][j] = 1;
} else if (b == 'C') {
a[2][j] = 1;
} else if (b == 'D') {
... | [["+", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 299 |
#include <stdio.h>
int main(void) {
int n, A[4][14];
int I, j, k;
char i;
for (I = 0; I < 4; I++)
for (j = 0; j < 14; j++)
A[I][j] = 0;
scanf("%d", &n);
for (k = 0; k < n; k++) {
scanf(" %c %d", &i, &j);
if (i == 'S')
I = 0;
if (i == 'H')
I = 1;
if (i == 'C')
I ... | #include <stdio.h>
int main(void) {
int n, A[4][13];
int I, j, k;
char i;
for (I = 0; I < 4; I++)
for (j = 0; j < 14; j++)
A[I][j] = 0;
scanf("%d", &n);
for (k = 0; k < n; k++) {
scanf(" %c %d", &i, &j);
if (i == 'S')
I = 0;
if (i == 'H')
I = 1;
if (i == 'C')
I ... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 1, 0, 11, 31, 69, 71, 16, 17, 33], ["+", 0, 1, 0, 11, 31, 69, 71, 16, 12, 13], ["-", 8, 9, 0, 7, 8, 7, 15, 16, 12, 13], ["+", 8, 9, 0, 7, 8, 7, 15, 16, 12, 13], ["+", 64, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 64, 1, 0, 2, 3, ... | 0 | 265 |
#include <stdio.h>
int main(void) {
int card[4][14];
int n, i, j, right, d;
char b;
for (i = 0; i < 4; i++) {
for (j = 0; j < 14; j++) {
card[i][j] = 0;
}
}
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%c %d", &b, &right);
if (b == 'S') {
card[0][right] = 1;
} else if... | #include <stdio.h>
int main(void) {
int card[4][14];
int n, i, j, right, d;
char b;
for (i = 0; i < 4; i++) {
for (j = 0; j < 14; j++) {
card[i][j] = 0;
}
}
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf(" %c %d", &b, &right);
if (b == 'S') {
card[0][right] = 1;
} else i... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 313 |
#include <stdio.h>
int main(void) {
int n, r, i, a[13][4] = {{0}}, x, y;
char e;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%c", &e);
scanf(" %d", &r);
if (e == 'S') {
a[r - 1][0] = 1;
}
if (e == 'H') {
a[r - 1][1] = 1;
}
if (e == 'C') {
a[r - 1][2] = 1;
... | #include <stdio.h>
int main(void) {
int n, r, i, a[13][4] = {{0}}, x, y;
char e;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf(" %c", &e);
scanf("%d", &r);
if (e == 'S') {
a[r - 1][0] = 1;
}
if (e == 'H') {
a[r - 1][1] = 1;
}
if (e == 'C') {
a[r - 1][2] = 1;
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 297 |
#include <stdio.h>
int main(void) {
int kado[4][13] = {0}, n, i, j, b;
char a;
scanf("%d", &n);
for (i = 0; i <= n; i++) {
scanf("%c %d", &a, &b);
if (a == 'S') {
kado[0][b - 1] = 1;
} else if (a == 'H') {
kado[1][b - 1] = 1;
} else if (a == 'C') {
kado[2][b - 1] = 1;
} els... | #include <stdio.h>
int main(void) {
int kado[4][13] = {0}, n, i, j, b;
char a;
scanf("%d", &n);
for (i = 0; i < 2 * n; i++) {
scanf("%c %d", &a, &b);
if (a == 'S') {
kado[0][b - 1] = 1;
} else if (a == 'H') {
kado[1][b - 1] = 1;
} else if (a == 'C') {
kado[2][b - 1] = 1;
} ... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 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, 48], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 0 | 290 |
#include <stdio.h>
int main(void) {
int n, i;
scanf("%d\n", &n);
int s[13] = {0}, h[13] = {0}, c[13] = {0}, d[13] = {0};
char mark;
for (i = 0; i < n; i++) {
int num;
scanf("%c %d\n", &mark,
&num); //???????????????????????¨?????????????????????
switch (mark) {
case 'S': //"???7"???... | #include <stdio.h>
int main(void) {
int n, i;
scanf("%d\n", &n);
int s[14] = {0}, h[14] = {0}, c[14] = {0}, d[14] = {0};
char mark;
for (i = 0; i < n; i++) {
int num;
scanf("%c %d\n", &mark,
&num); //???????????????????????¨?????????????????????
switch (mark) {
case 'S': //"???7"???... | [["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13]] | 0 | 312 |
#include <stdio.h>
int main(void) {
int strs[4] = {'S', 'H', 'C', 'D'};
int data[4][13] = {0};
int n, i, j, x;
char c;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%c %d\n", &c, &x);
switch (c) {
case 'S':
data[0][x - 1] = 1;
break;
case 'H':
data[1][x - 1] = 1;
... | #include <stdio.h>
int main(void) {
int strs[4] = {'S', 'H', 'C', 'D'};
int data[4][13] = {0};
int n, i, j, x;
char c;
scanf("%d", &n);
for (i = 0; i <= n; i++) {
scanf("%c %d\n", &c, &x);
switch (c) {
case 'S':
data[0][x - 1] = 1;
break;
case 'H':
data[1][x - 1] = 1;
... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 0 | 243 |
#include <stdio.h>
int main(void) {
int i1, i2, i3, i4, n;
scanf("%d\n", &n);
char c[n], ansc[52];
int x[n], ansx[52];
for (i1 = 0; i1 <= n - 1; i1++) {
scanf("%c %d\n", &c[i1], &x[i1]);
}
i2 = 0;
for (i3 = 0; i3 <= 51; i3++) {
if (0 <= i3 && i3 <= 13 - 1)
ansc[i3] = 'S';
if (13 <= i3 ... | #include <stdio.h>
int main(void) {
int i1, i2, i3, i4, n;
scanf("%d\n", &n);
char c[n], ansc[52];
int x[n], ansx[52];
for (i1 = 0; i1 <= n - 1; i1++) {
scanf("%c %d\n", &c[i1], &x[i1]);
}
i2 = 0;
for (i3 = 0; i3 <= 51; i3++) {
if (0 <= i3 && i3 <= 13 - 1)
ansc[i3] = 'S';
if (13 <= i3 ... | [["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 309 |
N, t, i, j, a[50][12];
main() {
char c[2] = "", s[4] = "SHCD";
for (scanf("%d", &N); N--;) {
scanf("%s%d", c, &t);
switch (c[0]) {
case 'S':
a[0][t - 1] = 1;
break;
case 'H':
a[1][t - 1] = 1;
break;
case 'C':
a[2][t - 1] = 1;
break;
case 'D':
a[3][t ... | int N, t, i, j, a[50][20];
int main() {
char c[2] = "", s[4] = "SHCD";
for (scanf("%d", &N); N--;) {
scanf("%s%d", c, &t);
switch (c[0]) {
case 'S':
a[0][t - 1] = 1;
break;
case 'H':
a[1][t - 1] = 1;
break;
case 'C':
a[2][t - 1] = 1;
break;
case 'D':
... | [["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["-", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]] | 0 | 214 |
N, t, i, j, a[50][12];
main() {
char c[2] = "", s[4] = "SHCD";
for (scanf("%d", &N); N--;) {
scanf("%s%d", c, &t);
switch (c[0]) {
case 'S':
a[0][t - 1] = 1;
break;
case 'H':
a[1][t - 1] = 1;
break;
case 'C':
a[2][t - 1] = 1;
break;
case 'D':
a[3][t ... | N, t, i, j, a[50][20];
main() {
char c[2] = "", s[4] = "SHCD";
for (scanf("%d", &N); N--;) {
scanf("%s%d", c, &t);
switch (c[0]) {
case 'S':
a[0][t - 1] = 1;
break;
case 'H':
a[1][t - 1] = 1;
break;
case 'C':
a[2][t - 1] = 1;
break;
case 'D':
a[3][t ... | [["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13]] | 0 | 214 |
#include <stdio.h>
int main(void) {
int n, m, i, j;
int cards[][12] = {{}, {}, {}, {}};
char ch;
char c[4] = {'S', 'H', 'C', 'D'};
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%c %d", &ch, &m);
switch (ch) {
case 'S':
cards[0][m - 1] = 1;
break;
case 'H':
cards[1][m ... | #include <stdio.h>
int main(void) {
int n, m, i, j;
int cards[][13] = {{}, {}, {}, {}};
char ch;
char c[4] = {'S', 'H', 'C', 'D'};
scanf("%d", &n);
for (i = 0; i < 2 * n; i++) {
scanf("%c %d", &ch, &m);
switch (ch) {
case 'S':
cards[0][m - 1] = 1;
break;
case 'H':
cards[1... | [["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 31, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 48], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]] | 0 | 248 |
#include <stdio.h>
int main(void) {
char mark;
char mk[4][2] = {"S", "H", "C", "D"};
int n, i, j, num;
int trump[4][13] = {0};
do {
scanf("%d", &n);
} while (n > 52);
for (i = 0; i < n; i++) {
scanf("%c %d", &mark, &num);
if (mark == 'S')
trump[0][num - 1] = 1;
if (mark == 'H')
... | #include <stdio.h>
int main(void) {
char mark;
char mk[4][2] = {"S", "H", "C", "D"};
int n, i, j, num;
int trump[4][13] = {0};
do {
scanf("%d", &n);
} while (n > 52);
for (i = 0; i < n * 2; i++) {
scanf("%c %d", &mark, &num);
if (mark == 'S')
trump[0][num - 1] = 1;
if (mark == 'H')
... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 48], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 0 | 251 |
#include <stdio.h>
#define N_MAX (int)52
#define AI_MAX (int)13
#define AI_MIN (int)1
void SortRank(int *card, int dx);
void PrintCard(int *card, char gara);
int main(void) {
char gara;
int n, rank;
int SCard[13], HCard[13], CCard[13], DCard[13];
int dx_s = 0, dx_h = 0, dx_c = 0, dx_d = 0;
if (scanf("%d%*... | #include <stdio.h>
#define N_MAX (int)52
#define AI_MAX (int)13
#define AI_MIN (int)1
void SortRank(int *card, int dx);
void PrintCard(int *card, char gara);
int main(void) {
char gara;
int n, rank;
int SCard[13], HCard[13], CCard[13], DCard[13];
int dx_s = 0, dx_h = 0, dx_c = 0, dx_d = 0;
if (scanf("%d%*... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 0 | 526 |
#include <iostream>
using namespace std;
int main() {
int cards[4][14] = {0};
int count, cardNum, simbolNum;
int i, j;
char simbol;
cin >> count;
for (i = 0; i < count - 1; i++) {
cin >> simbol >> cardNum;
if ('S' == simbol) {
simbolNum = 0;
} else if ('H' == simbol) {
simbolNum = ... | #include <iostream>
using namespace std;
int main() {
int cards[4][14] = {0};
int count, cardNum, simbolNum;
int i, j;
char simbol;
cin >> count;
for (i = 0; i < count; i++) {
cin >> simbol >> cardNum;
if ('S' == simbol) {
simbolNum = 0;
} else if ('H' == simbol) {
simbolNum = 1;
... | [["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 280 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, x;
bool mouth[4][13];
char ch;
for (int i = 0; i < 4; i++)
for (int j = 0; j < 13; j++)
mouth[i][j] = false;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> ch, x;
if (ch == 'S')
mouth[0][x - 1] = true;
... | #include <iostream>
#include <string>
using namespace std;
int main() {
int n, x;
bool mouth[4][13];
char ch;
for (int i = 0; i < 4; i++)
for (int j = 0; j < 13; j++)
mouth[i][j] = false;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> ch >> x;
if (ch == 'S')
mouth[0][x - 1] = true;
... | [["-", 0, 7, 8, 9, 0, 1, 0, 34, 0, 21], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 17, 152]] | 1 | 296 |
#include <iostream>
using namespace std;
int main() {
char ch, card[4][14] = {false};
int n, i, a, j, k;
cin >> n;
for (i = 0; i < n; i++) {
cin >> ch >> a;
if (ch == 'S') {
card[0][a] = true;
}
if (ch == 'H') {
card[1][a] = true;
}
if (ch == 'C') {
card[2][a] = true;
... | #include <iostream>
using namespace std;
int main() {
char ch, card[4][14] = {false};
int n, i, a, j, k;
cin >> n;
for (i = 0; i < n; i++) {
cin >> ch >> a;
if (ch == 'S') {
card[0][a] = true;
}
if (ch == 'H') {
card[1][a] = true;
}
if (ch == 'C') {
card[2][a] = true;
... | [["-", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13]] | 1 | 277 |
#include <stdio.h>
int a[4][13];
int main(void) {
int i, j, k, n;
char ch;
scanf("%d", &n);
for (k = 0; k < 4; k++) {
for (j = 0; j < 13; j++) {
a[k][j] = j + 1;
}
}
for (i = 0; i < n; i++) {
scanf("%c", &ch);
scanf("%c %d", &ch, &j);
if (ch == 'S')
a[0][j - 1] = 0;
if (c... | #include <stdio.h>
int a[4][13];
int main(void) {
int i, j, k, n;
char ch;
scanf("%d", &n);
for (k = 0; k < 4; k++) {
for (j = 0; j < 13; j++) {
a[k][j] = j + 1;
}
}
for (i = 0; i < n; i++) {
scanf("%c", &ch);
scanf("%c %d", &ch, &j);
if (ch == 'S')
a[0][j - 1] = 0;
if (c... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]] | 1 | 335 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, num, S[14] = {}, C[14] = {}, H[14] = {}, D[14] = {};
char m;
cin >> n;
for (int i = n; i < n; i++) {
cin >> m >> num;
if (m == 'S') {
S[num] = 1;
} else if (m == 'C') {
C[num] = 1;
} else if (m == 'H') ... | #include <iostream>
#include <string>
using namespace std;
int main() {
int n, num, S[14] = {}, C[14] = {}, H[14] = {}, D[14] = {};
char m;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> m >> num;
if (m == 'S') {
S[num] = 1;
} else if (m == 'C') {
C[num] = 1;
} else if (m == 'H') ... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 302 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int A[3][13] = {}, n, num;
char mark;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> mark >> num;
if (mark == 'S') {
A[0][num] = 1;
} else if (mark == 'H') {
A[1][num] = 1;
} else if (mark == 'C') {
A[2][n... | #include <iostream>
#include <string>
using namespace std;
int main() {
int A[4][14] = {}, n, num;
char mark;
cin >> n;
/*
for(int i=0;i<4;i++){
for(int j=1;j<=13;j++){
cout<<A[i][j]<<" ";
}
cout<<endl;
... | [["-", 0, 43, 49, 50, 49, 80, 49, 80, 81, 13], ["+", 0, 43, 49, 50, 49, 80, 49, 80, 81, 13], ["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13]] | 1 | 292 |
#include <iostream>
int main() {
int n;
bool cards[4][13];
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 13; j++) {
cards[i][j] = false;
}
}
std::cin >> n;
for (int i = 0; i < n; i++) {
char suit;
int rank;
std::cin >> suit >> rank;
switch (suit) {
case 'S':
sui... | #include <iostream>
int main() {
int n;
bool cards[4][13];
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 13; j++) {
cards[i][j] = false;
}
}
std::cin >> n;
for (int i = 0; i < n; i++) {
char suit;
int rank;
std::cin >> suit >> rank;
switch (suit) {
case 'S':
sui... | [["-", 0, 100, 0, 1, 0, 11, 12, 103, 0, 125], ["+", 0, 100, 0, 1, 0, 11, 12, 103, 0, 125]] | 1 | 275 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int toint(char c) {
if (c == 'S')
return 0;
if (c == 'H')
return 1;
if (c == 'C')
return 2;
if (c == 'D')
return 3;
}
char tochar(int n) {
if (n == 0)
retu... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int toint(char c) {
if (c == 'S')
return 0;
if (c == 'H')
return 1;
if (c == 'C')
return 2;
if (c == 'D')
return 3;
}
char tochar(int n) {
if (n == 0)
retu... | [["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 244 |
#include <iostream>
#include <string>
using namespace std;
int main(void) {
int n, rank;
bool card[4][13];
char suit;
string suits = "SHDC";
for (int i = 0; i < 4; i++)
for (int j = 0; j < 13; ++j)
card[i][j] = true;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> suit >> rank;
card[su... | #include <iostream>
#include <string>
using namespace std;
int main(void) {
int n, rank;
bool card[4][13];
char suit;
string suits = "SHCD";
for (int i = 0; i < 4; i++)
for (int j = 0; j < 13; ++j)
card[i][j] = true;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> suit >> rank;
card[su... | [["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6]] | 1 | 182 |
#include <iostream>
using namespace std;
int main() {
int cards[4][13];
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 13; j++) {
cards[i][j] = 0;
}
}
int n;
cin >> n;
for (int h = 0; h < n; h++) {
int num;
char mar;
cin >> mar >> num;
if (mar == 'S') {
cards[0][num -... | #include <iostream>
using namespace std;
int main() {
int cards[4][13];
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 13; j++) {
cards[i][j] = 0;
}
}
int n;
cin >> n;
for (int h = 0; h < n; h++) {
int num;
char mar;
cin >> mar >> num;
if (mar == 'S') {
cards[0][num -... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 315 |
#include <stdio.h>
#include <vector>
int main() {
bool poss[4][14];
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 13; j++) {
poss[i][j] = false;
}
}
int n;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
char mark;
int num;
scanf("%c %d", &mark, &num);
switch (mark) {
... | #include <stdio.h>
#include <vector>
int main() {
bool poss[4][14];
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 14; j++) {
poss[i][j] = false;
}
}
int n;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
char mark;
int num;
scanf(" %c %d", &mark, &num);
switch (mark) {
... | [["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 342 |
#include <iostream>
using namespace std;
int main() {
int cards[4][14], n = 0, v;
char f;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 14; j++) {
cards[i][j] = 0;
}
}
cin >> n;
for (int i = 0; i < n; i++) {
cin >> f >> v;
if (f == 'S') {
cards[0][v] = 1;
} else if ... | #include <iostream>
using namespace std;
int main() {
int cards[4][14], n = 0, v;
char f;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 14; j++) {
cards[i][j] = 0;
}
}
cin >> n;
for (int i = 0; i < n; i++) {
cin >> f >> v;
if (f == 'S') {
cards[0][v] = 1;
} else if ... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 329 |
#include <iostream>
using namespace std;
/* 「警告 W8060 おそらく不正な代入」は、if文などの条件式の中が==ではなく=とな
っている場合にでるエラー */
/* 「エラー E2134 複合文に}がない。」→そのまま */
/* 「エラー E2451 未定義のシンボル」→宣言がされていない。*/
int mark_num(char c) {
if (c == 'S')
return 0;
else if (c == 'H')
return 1;
else if (c == 'C')
return 2;
else if (c == 'D'... | #include <iostream>
using namespace std;
/* 「警告 W8060 おそらく不正な代入」は、if文などの条件式の中が==ではなく=とな
っている場合にでるエラー */
/* 「エラー E2134 複合文に}がない。」→そのまま */
/* 「エラー E2451 未定義のシンボル」→宣言がされていない。*/
/* 配列(とくに二次元配列以上)の初期化は array[4][13] = {0}
* というような書き方もある*/
int mark_num(char c) {
if (c == 'S')
return 0;
else if (c == 'H')
ret... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 298 |
n = gets
a = gets.split("").map(&:to_i)
puts a.reverse.join("")
| n = gets
a = gets.split(" ").map(&:to_i)
puts a.reverse.join(" ")
| [["+", 12, 652, 486, 652, 3, 4, 0, 557, 0, 6], ["+", 3, 4, 0, 652, 3, 4, 0, 557, 0, 6]] | 4 | 28 |
a = gets.split(" ").map(&:to_i)
puts a.reverse.join(" ")
| gets
a = gets.split(" ").map(&:to_i)
puts a.reverse.join(" ")
| [["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 22]] | 4 | 27 |
gets
i = gets.chomp.split
puts i.join(" ") | gets
i = gets.chomp.split
puts i.reverse.join(" ") | [["+", 0, 652, 3, 4, 0, 652, 486, 652, 735, 22], ["+", 0, 493, 0, 652, 3, 4, 0, 652, 17, 131]] | 4 | 17 |
gets
nums = gets.chomp.split.reverse
puts num.join(' ') | gets
nums = gets.chomp.split.reverse
puts nums.join(' ') | [["-", 0, 493, 0, 652, 3, 4, 0, 652, 486, 22], ["+", 0, 493, 0, 652, 3, 4, 0, 652, 486, 22]] | 4 | 19 |
n = gets.to_i
a = gets.chomp.split
n.times do |i|
if i == n - i
print a[(n - 1) - i]
else
print a[(n - 1) - i] + " "
end
end
puts "" | n = gets.to_i
a = gets.chomp.split
n.times do |i|
if i == n - 1
print a[(n - 1) - i]
else
print a[(n - 1) - i] + " "
end
end
puts "" | [["-", 8, 736, 0, 121, 15, 738, 12, 738, 12, 22], ["+", 8, 736, 0, 121, 15, 738, 12, 738, 12, 612]] | 4 | 57 |
n=gets.to_i
mp=gets.split(' ').map(&:to_i).sort!
n.downto(1){ |i|
if i==1 then
printf("%d\n",mp[i-1])
else
printf("%d ",mp[i-1])
end
} | n=gets.to_i
mp=gets.split(' ').map(&:to_i)
n.downto(1){ |i|
if i==1 then
printf("%d\n",mp[i-1])
else
printf("%d ",mp[i-1])
end
} | [["-", 36, 36, 0, 493, 0, 662, 12, 652, 17, 131], ["-", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22]] | 4 | 68 |
gets
puts gets.split.map(:to_i).reverse.join(' ') | gets
puts gets.split.map(&:to_i).reverse.join(' ') | [["+", 486, 652, 486, 652, 3, 4, 0, 752, 0, 67]] | 4 | 19 |
gets
n = gets.split("").map{|v| v= v.to_i}
puts n.reverse.join(" ") | gets
n = gets.split(" ").map{|v| v=v.to_i}
puts n.reverse.join(" ") | [["+", 12, 652, 486, 652, 3, 4, 0, 557, 0, 6]] | 4 | 33 |
# -*- coding: utf-8 -*-
# データの数を取得
n = STDIN.gets
# 数列を取得
arr = STDIN.gets.split.map(&:to_i)
# ここから変える
puts arr.reverse puts arr.join(" ") | # -*- coding: utf-8 -*-
# データの数を取得
n = STDIN.gets
# 数列を取得
arr = STDIN.gets.split.map(&:to_i)
# ここから変える
puts arr.reverse.join(" ") | [["-", 3, 4, 0, 652, 3, 4, 0, 652, 735, 22], ["-", 3, 4, 0, 652, 3, 4, 0, 652, 486, 22]] | 4 | 35 |
# -*- coding: utf-8 -*-
# データの数を取得
n = STDIN.gets
# 数列を取得
arr = STDIN.gets.split.map(&:to_i)
# ここから変える
arr.reverse.join(' ') | # -*- coding: utf-8 -*-
# データの数を取得
n = STDIN.gets
# 数列を取得
arr = STDIN.gets.split.map(&:to_i)
# ここから変える
puts arr.reverse.join(' ') | [["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22]] | 4 | 32 |
a = STDIN.gets
p STDIN.gets.split.reverse.join(" ") | a = STDIN.gets
puts STDIN.gets.split.reverse.join(" ") | [["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22]] | 4 | 20 |
a = gets.split.map(&:to_i)
puts(a.reverse.join(" ")) | gets
a = gets.split.map(&:to_i)
puts(a.reverse.join(" ")) | [["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 22]] | 4 | 24 |
n = gets.to_i
a = gets
p a.split.reverse.join " " | n = gets.to_i
a = gets
puts a.split.reverse.join " " | [["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22]] | 4 | 19 |
gets
puts gets.spilit.map(&:to_i).reverse.join(" ")
| gets
puts gets.split.map(&:to_i).reverse.join(" ")
| [["-", 0, 652, 486, 652, 486, 652, 486, 652, 735, 22], ["+", 0, 652, 486, 652, 486, 652, 486, 652, 735, 22]] | 4 | 20 |
n = gets.to_i
input = gets.split.map(&:to_i)
puts input.join(" ").reverse
| n = gets.to_i
input = gets.split.map(&:to_i)
puts input.reverse.join(" ")
| [["+", 0, 652, 3, 4, 0, 652, 486, 652, 735, 22], ["+", 0, 493, 0, 652, 3, 4, 0, 652, 17, 131], ["-", 0, 493, 0, 652, 3, 4, 0, 652, 17, 131], ["-", 0, 493, 0, 652, 3, 4, 0, 652, 735, 22]] | 4 | 27 |
n = int(input())
num = list(map(int, input().split()))
num.sort(reverse = True)
print(" ".join(map(str, num)))
| n = int(input())
num = list(map(int, input().split()))
num.reverse()
print(" ".join(map(str, num)))
| [["-", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["-", 0, 1, 0, 652, 3, 4, 0, 653, 51, 146], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 49 |
n = int(input())
a = list(map(int, input().split()))
a.reverse()
print(' '.join(a))
| n = int(input())
a = list(input().split())
a.reverse()
print(' '.join(a))
| [["-", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 41 |
from sys import stdin
stdin.readline().rstrip()
a = [int(x) for x in stdin.readline().rstrip().split()]
a.sort(reverse=True)
print(*a)
| from sys import stdin
stdin.readline().rstrip()
a = [int(x) for x in stdin.readline().rstrip().split()]
a.reverse()
print(*a)
| [["-", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["-", 0, 1, 0, 652, 3, 4, 0, 653, 51, 146], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 50 |
num = int(input())
data = list(map(int, input().split()))
lengh = len(data)
for tmp in range(lengh):
if tmp == lengh-1:
print(data.pop(-1))
else:
print(data.pop(-1), end="")
| num = int(input())
data = list(map(int, input().split()))
lengh = len(data)
for tmp in range(lengh):
if tmp == lengh-1:
print(data.pop(-1))
else:
print(data.pop(-1), end=" ")
| [["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 6]] | 5 | 73 |
n = int(input())
l = list(map(int, input().split()))
l.reverse()
for i in range(n):
if i > 1:
print(" ", end="")
print(l[i], end="")
print()
| n = int(input())
l = list(map(int, input().split()))
l.reverse()
for i in range(n):
if i >= 1:
print(" ", end = '')
print(l[i], end = '')
print()
| [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20], ["-", 0, 652, 3, 4, 0, 653, 51, 557, 0, 654], ["-", 0, 652, 3, 4, 0, 653, 51, 557, 0, 655], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 654], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 655]] | 5 | 69 |
cnt = int(input())
li = list(map(int,input().split()))
re_li = li[::-1]
print(' '.join(map(int,re_li)))
| cnt = int(input())
li = list(map(int,input().split()))
re_li = li[::-1]
print(' '.join(map(str,re_li)))
| [["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22]] | 5 | 50 |
n = eval(input());
j = list(map(int,input().split(" ")));
j.reverse()
print(n)
for i in range(0,n-1):
print(j[i], end=' ')
print(j[n-1]) | n = eval(input());
j = list(map(int,input().split(" ")));
j.reverse()
for i in range(0,n-1):
print(j[i], end=' ')
print(j[n-1]) | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 73 |
input()
a = input().split()
a.reverse()
print(' '/join(a)) | input()
a = input().split()
a.reverse()
print(' '.join(a)) | [["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 85], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 0, 131]] | 5 | 28 |
input()
a = input().split()
a.reverse()
print(''.join(a)) | input()
a = input().split()
a.reverse()
print(' '.join(a)) | [["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6]] | 5 | 27 |
n = eval(input())
a = sorted(map(int,input().split()))
a.reverse()
for i in range(n):
print(a[i], end=' ') | #coding:UTF-8
n = eval(input())
a = list(map(int,input().split()))
a.reverse()
for i in range(n):
print(a[i], end=' ') | [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]] | 5 | 51 |
n = eval(input())
nums = list(map(int,input().split()))
for x in range(n-1, -1, -1):
print(nums[x]) | n = eval(input())
nums = list(map(int,input().split()))
for x in range(n-1, -1, -1):
print(nums[x], end=' ') | [["+", 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, 6], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 655]] | 5 | 48 |
L=[]
n=eval(input())
L=input()
L=L[::-1]
print("".join(L)) | L=[]
n=eval(input())
L=input().split()
L=L[::-1]
print(" ".join(L)) | [["+", 0, 1, 0, 662, 12, 652, 63, 319, 0, 131], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6]] | 5 | 36 |
n=eval(input())
a=list(map(int,input().split()))
a.reverse()
for i in a:
print(i) | n=eval(input())
a=list(map(int,input().split()))
a.reverse()
for i in a:
print(i, end=' ') | [["+", 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, 6], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 655]] | 5 | 39 |
n = int(input())
a = list(map(int,input().split()))
a.reverse()
for i in n:
print(i, end=' ') | n = int(input())
a = list(map(int,input().split()))
a.reverse()
for i in a:
print(i, end=' ') | [["-", 36, 36, 36, 36, 0, 656, 0, 7, 12, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 7, 12, 22]] | 5 | 45 |
n = int(input())
a = map(int, input().split())
for i in range(1, n):
print(str(a[-i]) + " ", end="")
print(a[0]) | n = int(input())
a = input().split()
for i in range(1, n):
print(str(a[-i]) + " ", end = "")
print(a[0]) | [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 59 |
n = input()
a = list(map(int, input().split()))
for i in range(0, n):
print(a[n-i-1], end=' ') | n = eval(input())
a = list(map(int, input().split()))
for i in range(0, n):
print(a[n-i-1], end=' ') | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 49 |
n = int(input())
a = list(map(int, input().split()))
for i in range(n):
print(a[n-i], end=' ') | n = int(input())
a = list(map(int, input().split()))
for i in range(n):
print(a[n-i-1], end=' ') | [["+", 0, 652, 3, 4, 0, 206, 206, 657, 17, 33], ["+", 0, 652, 3, 4, 0, 206, 206, 657, 12, 612]] | 5 | 48 |
n = input()
a = list(map(int, input().split()))
for i in range(n):
print(a[-i-1], end=' ') | n =int(input())
a = list(map(int, input().split()))
for i in range(n):
print(a[-i-1], end=' ') | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 46 |
n=eval(input())
a=list(map(int,input().split()))
a.reverse()
print((' '.join(a))) | n=eval(input())
a=list(map(str,input().split()))
a.reverse()
print((' '.join(a))) | [["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22]] | 5 | 43 |
input()
l = [int(i) for i in input().split()]
l.sort()
print(" ".join(map(str,l[::-1]))) | input()
l = [int(i) for i in input().split()]
print(" ".join(map(str,l[::-1]))) | [["-", 0, 656, 0, 1, 0, 652, 63, 319, 500, 22], ["-", 0, 656, 0, 1, 0, 652, 63, 319, 0, 131], ["-", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 48 |
a = list(map(int, input().split()))
a.reverse()
a = list(map(str,a))
print(" ".join(a)) | n = input()
a = list(map(int, input().split()))
a.reverse()
a = list(map(str,a))
print(" ".join(a)) | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 44 |
class ReversingNumbers:
def output(self, a):
s = ""
a.reverse()
for i in range(len(a)-1):
s += "%d " % (a[i])
s += "%d" % (a.index(len(a)-1))
print(s)
if __name__ == "__main__":
rn = ReversingNumbers()
input()
a = list(map(int, input().split()))
r... | class ReversingNumbers:
def output(self, a):
s = ""
a.reverse()
for i in range(len(a)-1):
s += "%d " % (a[i])
s += "%d" % (a[len(a)-1])
print(s)
if __name__ == "__main__":
rn = ReversingNumbers()
input()
a = list(map(int, input().split()))
rn.outp... | [["-", 12, 657, 12, 23, 0, 652, 63, 319, 0, 131], ["-", 12, 657, 12, 23, 0, 652, 63, 319, 319, 22], ["-", 12, 657, 12, 23, 0, 652, 3, 4, 0, 24], ["+", 0, 677, 12, 657, 12, 23, 0, 206, 0, 70], ["-", 12, 657, 12, 23, 0, 652, 3, 4, 0, 25], ["+", 0, 677, 12, 657, 12, 23, 0, 206, 0, 73]] | 5 | 106 |
n = input()
A = [i for i in n.split()]
A.reverse()
print(' '.join(A)) | n = input()
A = [i for i in input().split()]
A.reverse()
print(' '.join(A)) | [["-", 12, 658, 0, 659, 12, 652, 63, 319, 500, 22], ["+", 0, 659, 12, 652, 63, 319, 500, 652, 63, 22], ["+", 12, 652, 63, 319, 500, 652, 3, 4, 0, 24], ["+", 12, 652, 63, 319, 500, 652, 3, 4, 0, 25]] | 5 | 34 |
A = [i for i in input().split()]
A.reverse()
print(' '.join(A)) | input()
A = [i for i in input().split()]
A.reverse()
print(' '.join(A)) | [["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 31 |
input()
numbers = input().split()
r_numbers = ''.join(reversed(numbers))
print(" ".join(r_numbers)) | input()
numbers = input().split()
#print(numbers)
r_numbers = reversed(numbers)
#print(r_numbers)
print(" ".join(r_numbers)) | [["-", 0, 662, 12, 652, 63, 319, 500, 557, 0, 654], ["-", 0, 662, 12, 652, 63, 319, 500, 557, 0, 655], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 0, 131], ["-", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 35 |
n = int(input())
list = [i for i in input().split()].reverse()
print(" ".join(list)) | n = int(input())
list = [i for i in input().split()]
list.reverse()
print(" ".join(list)) | [["+", 0, 656, 0, 1, 0, 652, 63, 319, 500, 22]] | 5 | 38 |
L = input().split()
L.reverse()
for x in L:
print(x, end=' ') | input()
L = input().split()
L.reverse()
for x in L:
print(x, end=' ') | [["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 29 |
input()
a = [int(x) for x in input().split()]
print(*sorted(a, reverse=True)) | input()
a = [int(x) for x in input().split()]
print(*reversed(a)) | [["-", 0, 652, 3, 4, 0, 652, 63, 661, 0, 22], ["+", 0, 652, 3, 4, 0, 652, 63, 661, 0, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["-", 3, 4, 0, 652, 3, 4, 0, 653, 141, 22], ["-", 3, 4, 0, 652, 3, 4, 0, 653, 0, 32], ["-", 3, 4, 0, 652, 3, 4, 0, 653, 51, 146]] | 5 | 33 |
n = int(input())
inp = map(int,input().split())
inp.reverse()
for i in range(n-1):
print(inp[i]," ",sep="",end="")
print(inp[n-1]) | n = int(input())
inp = list(map(int,input().split()))
inp.reverse()
for i in range(n-1):
print(inp[i]," ",sep="",end="")
print(inp[n-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 | 67 |
n = int(input())
n_list = [int(i) for i in input().split(" ")]
n_list.reverse()
print(' '.join(map(str, a))) | n = int(input())
n_list = [int(i) for i in input().split(" ")]
n_list.reverse()
print(' '.join(map(str, n_list))) | [["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22]] | 5 | 50 |
n = int(input())
print(" ".join(input().split())[::-1]) | n = int(input())
print(" ".join(input().split()[::-1])) | [["-", 3, 4, 0, 206, 51, 652, 3, 4, 0, 25], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 31 |
n=input()
n=int(n)
a=input().split()
a=a[::-1]
for i in a:
print(" ".join(a)) | n=input()
n=int(n)
a=input().split()
a=a[::-1]
print(" ".join(a)) | [["-", 36, 36, 36, 36, 0, 656, 0, 7, 0, 88], ["-", 36, 36, 36, 36, 0, 656, 0, 7, 31, 22], ["-", 36, 36, 36, 36, 0, 656, 0, 7, 0, 267], ["-", 36, 36, 36, 36, 0, 656, 0, 7, 12, 22], ["-", 36, 36, 36, 36, 0, 656, 0, 7, 0, 102]] | 5 | 45 |
n=int(input())
a=list(map(int,input().split()))
a=a[::-1]
print(" ".join(a)) | n=int(input())
a=list(map(str,input().split()))
a=a[::-1]
print(" ".join(a)) | [["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22]] | 5 | 45 |
n = int(input())
memo = input().split()
for i in range(n-1):
print(memo[n - i - 1]+" ")
print(memo[0]) | n = int(input())
memo = input().split()
for i in range(n-1):
print(memo[n - i - 1]+" ",end="")
print(memo[0]) | [["+", 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 | 49 |
n = input()
numbers = input().split()
print(''.join(numbers[::-1])) | n = input()
numbers = input().split()
print(' '.join(numbers[::-1])) | [["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6]] | 5 | 30 |
numbers = list(input().split())
print(" ".join(numbers[::-1])) | n = input()
numbers = list(input().split())
print(" ".join(numbers[::-1])) | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 29 |
a = list(map(int, input().split()))
a.reverse()
sum = ""
for i in a:
sum = sum + str(i) + " "
print(sum[:-1]) | input()
a = list(map(int, input().split()))
a.reverse()
sum = ""
for i in a:
sum = sum + str(i) + " "
print(sum[:-1]) | [["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 52 |
n=int(input())
print(*list(reversed(map(int, input().split())))) | n=int(input())
print(*list(map(int, reversed(input().split())))) | [["-", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24]] | 5 | 30 |
n = int(input())
array = input().split()
for i in reversed(list(range(n))):
print(i, end=' ') | n = int(input())
array = input().split()
for i in reversed(list(range(n))):
print(array[i], end=' ') | [["+", 0, 1, 0, 652, 3, 4, 0, 206, 51, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 206, 0, 70], ["+", 0, 1, 0, 652, 3, 4, 0, 206, 0, 73]] | 5 | 41 |
input()
a = list(map(int, input().split()))
a.sort(reverse = True)
print(" ".join(map(str, a)))
| input()
a = list(map(int, input().split()))
a.reverse()
print(" ".join(map(str, a)))
| [["-", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["-", 0, 1, 0, 652, 3, 4, 0, 653, 51, 146], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 44 |
n = int(input())
a = str(input())
list = a.split()
for i in list[4:0:-1]:
print(i, end = ' ')
print(list[0])
| n = int(input())
a = str(input())
list = a.split()
for i in list[n:0:-1]:
print(i, end = ' ')
print(list[0])
| [["-", 0, 656, 0, 7, 12, 206, 206, 663, 0, 612], ["+", 0, 656, 0, 7, 12, 206, 206, 663, 0, 22]] | 5 | 53 |
n = int(input())
a = list(map(int, input().split()))
b = []
count = 0
for i in a:
count += 1
b.append(a[n-count])
print(b)
print(" ".join(map(str, b)))
| n = int(input())
a = list(map(int, input().split()))
b = []
count = 0
for _ in a:
count += 1
b.append(a[n-count])
print(" ".join(map(str, b)))
| [["-", 36, 36, 36, 36, 0, 656, 0, 7, 31, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 7, 31, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 71 |
input()
print(''.join(input().split()[::-1]))
| input()
print(' '.join(input().split()[::-1]))
| [["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6]] | 5 | 25 |
n = int(input())
x = [int(i) for i in input().split()]
x.sort()
x.reverse()
for i in range(n-1):
print(x[i]," ",sep="",end="")
print(x[n-1])
| n = int(input())
x = [int(i) for i in input().split()]
x.reverse()
for i in range(n-1):
print(x[i]," ",sep="",end="")
print(x[n-1])
| [["-", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 0, 656, 0, 1, 0, 652, 63, 319, 500, 22], ["-", 0, 656, 0, 1, 0, 652, 63, 319, 0, 131]] | 5 | 76 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.