Language: C

#define dbg(fmt,...) fprintf(stderr,fmt,__VA_ARGS__)
#define dpri(x) dbg(#x ": %d\n", x)
#define dprs(x) dbg(#x ": %s\n", x)
#include <stdio.h>
typedef long long ll;
const int MYINF = 1e9+7;
typedef int bool;
const bool true = 1;
const bool false = 0;

#define MAX_N 100010

typedef struct {
	int suit;
	int rank;
	int origi_order;
} card_t;

#define exchange(a, b) exchange_(&(a), &(b))
void exchange_(card_t *a, card_t *b) {
	card_t tmp = *a;
	*a = *b;
	*b = tmp;
}

int Partition(card_t *A, int p, int r) {
	int x = A[r].rank;
	int i = p - 1, j;
	for (j = p; j < r; j++) {
		if (A[j].rank <= x) {
			i++;
			exchange(A[i], A[j]);
		}
	}
	exchange(A[i+1], A[r]);
	return i+1;
}

void Quicksort(card_t *A, int p, int r) {
	if (p < r) {
		int q = Partition(A, p, r);
		Quicksort(A, p, q-1);
		Quicksort(A, q+1, r);
	}
}

card_t arr[MAX_N];
int n;

int main(int argc, char **argv)
{
	int i, rank, stable;
	char suit[16];
	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%s %d", suit, &rank);
		arr[i].suit = suit[0];
		arr[i].rank = rank;
		arr[i].origi_order = i;
	}

	Quicksort(arr, 0, n-1);

	stable = 1;
	for (i = 1; i < n; i++) {
		if (arr[i-1].rank != arr[i].rank) continue;
		if (arr[i-1].origi_order > arr[i].origi_order) {
			stable = 0;
			break;
		}
	}
	if (stable) puts("Stable");
	else puts("Not stable");

	for (i = 0; i < n; i++) {
		printf("%c %d\n", arr[i].suit, arr[i].rank);
	}
	return 0;
}
#define dbg(fmt,...) fprintf(stderr,fmt,__VA_ARGS__)
#define dpri(x) dbg(#x ": %d\n", x)
#define dprs(x) dbg(#x ": %s\n", x)
#include <stdio.h>
typedef long long ll;
const int MYINF = 1e9+7;
typedef int bool;
const bool true = 1;
const bool false = 0;

#define MAX_N 100010

typedef struct {
	int suit;
	int rank;
	int origi_order;
} card_t;

#define exchange(a, b) exchange_(&(a), &(b))
void exchange_(card_t *a, card_t *b) {
	card_t tmp = *a;
	*a = *b;
	*b = tmp;
}

int Partition(card_t *A, int p, int r) {
	int x = A[r].rank;
	int i = p - 1, j;
	for (j = p; j < r; j++) {
		if (A[j].rank <= x) {
			i++;
			exchange(A[i], A[j]);
		}
	}
	exchange(A[i+1], A[r]);
	return i+1;
}

void Quicksort(card_t *A, int p, int r) {
	if (p < r) {
		int q = Partition(A, p, r);
		Quicksort(A, p, q-1);
		Quicksort(A, q+1, r);
	}
}

card_t arr[MAX_N];
int n;

int main(int argc, char **argv)
{
	int i, rank, stable;
	char suit[16];
	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%s %d", suit, &rank);
		arr[i].suit = suit[0];
		arr[i].rank = rank;
		arr[i].origi_order = i;
	}

	Quicksort(arr, 0, n-1);

	stable = 1;
	for (i = 1; i < n; i++) {
		if (arr[i-1].rank != arr[i].rank) continue;
		if (arr[i-1].origi_order > arr[i].origi_order) {
			stable = 0;
			break;
		}
	}
	if (stable) puts("Stable");
	else puts("Not stable");

	for (i = 0; i < n; i++) {
		printf("%c %d\n", arr[i].suit, arr[i].rank);
	}
	return 0;
}

Compiler output:
main.c:85:11: error: redefinition of 'MYINF'
   85 | const int MYINF = 1e9+7;
      |           ^~~~~
main.c:6:11: note: previous definition of 'MYINF' with type 'int'
    6 | const int MYINF = 1e9+7;
      |           ^~~~~
main.c:87:12: error: redefinition of 'true'
   87 | const bool true = 1;
      |            ^~~~
main.c:8:12: note: previous definition of 'true' with type 'bool' {aka 'const int'}
    8 | const bool true = 1;
      |            ^~~~
main.c:88:12: error: redefinition of 'false'
   88 | const bool false = 0;
      |            ^~~~~
main.c:9:12: note: previous definition of 'false' with type 'bool' {aka 'const int'}
    9 | const bool false = 0;
      |            ^~~~~
main.c:96:3: error: conflicting types for 'card_t'; have 'struct <anonymous>'
   96 | } card_t;
      |   ^~~~~~
main.c:17:3: note: previous declaration of 'card_t' with type 'card_t'
   17 | } card_t;
      |   ^~~~~~
main.c:99:6: error: conflicting types for 'exchange_'; have 'void(card_t *, card_t *)'
   99 | void exchange_(card_t *a, card_t *b) {
      |      ^~~~~~~~~
main.c:20:6: note: previous definition of 'exchange_' with type 'void(card_t *, card_t *)'
   20 | void exchange_(card_t *a, card_t *b) {
      |      ^~~~~~~~~
main.c:105:5: error: conflicting types for 'Partition'; have 'int(card_t *, int,  int)'
  105 | int Partition(card_t *A, int p, int r) {
      |     ^~~~~~~~~
main.c:26:5: note: previous definition of 'Partition' with type 'int(card_t *, int,  int)'
   26 | int Partition(card_t *A, int p, int r) {
      |     ^~~~~~~~~
main.c:118:6: error: conflicting types for 'Quicksort'; have 'void(card_t *, int,  int)'
  118 | void Quicksort(card_t *A, int p, int r) {
      |      ^~~~~~~~~
main.c:39:6: note: previous definition of 'Quicksort' with type 'void(card_t *, int,  int)'
   39 | void Quicksort(card_t *A, int p, int r) {
      |      ^~~~~~~~~
main.c:126:8: error: conflicting types for 'arr'; have 'card_t[100010]'
  126 | card_t arr[MAX_N];
      |        ^~~
main.c:47:8: note: previous declaration of 'arr' with type 'card_t[100010]'
   47 | card_t arr[MAX_N];
      |        ^~~
main.c:129:5: error: redefinition of 'main'
  129 | int main(int argc, char **argv)
      |     ^~~~
main.c:50:5: note: previous definition of 'main' with type 'int(int,  char **)'
   50 | int main(int argc, char **argv)
      |     ^~~~