結果
問題 | No.267 トランプソート |
ユーザー |
![]() |
提出日時 | 2016-02-18 01:42:38 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 542 bytes |
コンパイル時間 | 591 ms |
コンパイル使用メモリ | 68,784 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-22 07:44:40 |
合計ジャッジ時間 | 1,355 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <iostream>#include <sstream>#include <set>using namespace std;int main(int argc, char *argv[]){int N;cin >> N;set<string> c;for (int i = 0; i < N; ++i) {string s;cin >> s;c.insert(s);}const string suite = "DCHS";const string number = "A23456789TJQK";string delim = "";for (int i = 0; i < 4; ++i) {for (int j = 0; j < 13; ++j) {string s = suite.substr(i, 1) + number.substr(j, 1);if (c.find(s) != c.end()) {cout << delim << s;delim = " ";}}}cout << endl;return 0;}