Submission #64622693
Source Code Expand
Copy
#include <stdio.h>int main(void) {int cnt[16] = {};int i;int three = 0, two = 0;for (i = 0; i < 7; i++) {int A;if (scanf("%d", &A) != 1) return 1;if (1 <= A && A <= 13) cnt[A]++;}for (i = 1; i <= 13; i++) {if (cnt[i] >= 3) {if (three) two++; else three++;} else if (cnt[i] >= 2) {two++;}}puts(three && two ? "Yes" : "No");return 0;}
#include <stdio.h>
int main(void) {
	int cnt[16] = {};
	int i;
	int three = 0, two = 0;
	for (i = 0; i < 7; i++) {
		int A;
		if (scanf("%d", &A) != 1) return 1;
		if (1 <= A && A <= 13) cnt[A]++;
	}
	for (i = 1; i <= 13; i++) {
		if (cnt[i] >= 3) {
			if (three) two++; else three++;
		} else if (cnt[i] >= 2) {
			two++;
		}
	}
	puts(three && two ? "Yes" : "No");
	return 0;
}
			Submission Info
| Submission Time | |
|---|---|
| Task | B - Full House 3 | 
| User | mikecat | 
| Language | C (gcc 12.2.0) | 
| Score | 250 | 
| Code Size | 401 Byte | 
| Status | AC | 
| Exec Time | 0 ms | 
| Memory | 1652 KB | 
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 250 / 250 | ||||
| Status | 
 | 
 | 
| Set Name | Test Cases | 
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt | 
| All | hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt | 
| Case Name | Status | Exec Time | Memory | 
|---|---|---|---|
| hand_01.txt | AC | 0 ms | 1624 KB | 
| hand_02.txt | AC | 0 ms | 1640 KB | 
| hand_03.txt | AC | 0 ms | 1536 KB | 
| hand_04.txt | AC | 0 ms | 1620 KB | 
| sample_01.txt | AC | 0 ms | 1620 KB | 
| sample_02.txt | AC | 0 ms | 1540 KB | 
| sample_03.txt | AC | 0 ms | 1532 KB | 
| sample_04.txt | AC | 0 ms | 1612 KB | 
| test_01.txt | AC | 0 ms | 1560 KB | 
| test_02.txt | AC | 0 ms | 1588 KB | 
| test_03.txt | AC | 0 ms | 1596 KB | 
| test_04.txt | AC | 0 ms | 1596 KB | 
| test_05.txt | AC | 0 ms | 1620 KB | 
| test_06.txt | AC | 0 ms | 1568 KB | 
| test_07.txt | AC | 0 ms | 1596 KB | 
| test_08.txt | AC | 0 ms | 1628 KB | 
| test_09.txt | AC | 0 ms | 1652 KB | 
| test_10.txt | AC | 0 ms | 1540 KB | 
| test_11.txt | AC | 0 ms | 1624 KB | 
| test_12.txt | AC | 0 ms | 1612 KB | 
| test_13.txt | AC | 0 ms | 1592 KB | 
| test_14.txt | AC | 0 ms | 1572 KB | 
| test_15.txt | AC | 0 ms | 1652 KB | 
| test_16.txt | AC | 0 ms | 1540 KB | 
| test_17.txt | AC | 0 ms | 1644 KB | 
| test_18.txt | AC | 0 ms | 1560 KB | 
| test_19.txt | AC | 0 ms | 1644 KB | 
| test_20.txt | AC | 0 ms | 1624 KB | 
| test_21.txt | AC | 0 ms | 1596 KB | 
| test_22.txt | AC | 0 ms | 1564 KB | 
| test_23.txt | AC | 0 ms | 1628 KB | 
| test_24.txt | AC | 0 ms | 1636 KB | 
| test_25.txt | AC | 0 ms | 1628 KB | 
| test_26.txt | AC | 0 ms | 1560 KB |