Submission #36411783


Source Code Expand

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
using namespace std;
int main()
{
	int n;
	cin >> n;
	string s1 = "HDCS", s2 = "A23456789TJQK";
	vector<string> book;
	for (int i = 1; i <= n; ++i)
	{
		string s;
		cin >> s;
		if (s.length() != 2 || s1.find(s[0]) == s1.npos || s2.find(s[1]) == s2.npos)
		{
			cout << "No";
			return 0;
		}
		book.emplace_back(s);
	}
	sort(book.begin(), book.end());
	if (unique(book.begin(), book.end()) != book.end())
	{
		cout << "No";
		return 0;
	}
	cout << "Yes";
	return 0;
}

Submission Info

Submission Time
Task B - Playing Cards Validation
User LXl491214
Language C++ (Clang 10.0.0)
Score 200
Code Size 570 Byte
Status AC
Exec Time 10 ms
Memory 3036 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 4
AC × 19
Set Name Test Cases
Sample example0.txt, example1.txt, example2.txt, example3.txt
All example0.txt, example1.txt, example2.txt, example3.txt, max0.txt, random0.txt, random1.txt, random10.txt, random11.txt, random12.txt, random13.txt, random2.txt, random3.txt, random4.txt, random5.txt, random6.txt, random7.txt, random8.txt, random9.txt
Case Name Status Exec Time Memory
example0.txt AC 10 ms 2832 KiB
example1.txt AC 2 ms 2976 KiB
example2.txt AC 3 ms 2844 KiB
example3.txt AC 2 ms 2980 KiB
max0.txt AC 2 ms 2964 KiB
random0.txt AC 2 ms 2964 KiB
random1.txt AC 2 ms 2844 KiB
random10.txt AC 2 ms 2984 KiB
random11.txt AC 2 ms 2880 KiB
random12.txt AC 2 ms 2996 KiB
random13.txt AC 2 ms 2968 KiB
random2.txt AC 2 ms 2920 KiB
random3.txt AC 2 ms 2876 KiB
random4.txt AC 3 ms 2840 KiB
random5.txt AC 2 ms 2844 KiB
random6.txt AC 1 ms 2988 KiB
random7.txt AC 2 ms 3008 KiB
random8.txt AC 2 ms 3036 KiB
random9.txt AC 3 ms 2820 KiB