QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#301100#5061. Allinzzuqy#RE 0ms0kbC++14894b2024-01-09 14:23:112024-01-09 14:23:11

Judging History

你现在查看的是最新测评结果

  • [2024-01-09 14:23:11]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2024-01-09 14:23:11]
  • 提交

answer

#include <bits/stdc++.h>
char a1[2], a2[2], b[2], c[3], d[2];

inline int get(char c) {
	if (c >= '0' && c <= '9')
		return c - '0';
	if (c == 'T')
		return 10;
	if (c == 'J')
		return 11;
	if (c == 'Q')
		return 12;
	if (c == 'K')
		return 13;
	if (c == 'A')
		return 14;
}

int main() {
	int T;
	scanf("%d", &T);
	while (T--) {
		scanf("%s%s%s%s%s", a1, a2, b, c, d);
		char x = a1[1];
		if (x != a2[1] || x != b[1] || x != c[1] || x != d[1]) {
			puts("check");
		} else {
			int o[5];
			o[0] = get(a1[0]);
			o[1] = get(a2[0]);
			o[2] = get(b[0]);
			o[3] = get(c[0]);
			o[4] = get(d[0]);
			std::sort(o, o + 5);
			if (o[1] != o[0] + 1 || o[2] != o[0] + 2 || o[3] != o[0] + 3 || o[4] != o[0] + 4) {
				puts("check");
			} else if (o[4] != get(a1[0]) && o[4] != get(a2[0])) {
				puts("check");
			} else
				puts("allin");
		}
	}
	return 0;
}

详细

Test #1:

score: 0
Runtime Error

input:

2
AC KC QC JC TC
AC TD 8S 5H 2C

output:


result: