結果
| 問題 |
No.267 トランプソート
|
| コンテスト | |
| ユーザー |
hogeover30
|
| 提出日時 | 2018-07-10 14:05:51 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 415 bytes |
| コンパイル時間 | 2,694 ms |
| コンパイル使用メモリ | 212,800 KB |
| 最終ジャッジ日時 | 2025-01-06 11:54:22 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n; cin>>n;
vector<string> a(n); for(auto& e: a) cin>>e;
map<char, char> s;
for(int i=0; i<13; ++i) s["23456789ATJQK"[i]]="23456789/;<=>"[i];
sort(begin(a), end(a), [&](auto x, auto y) {
x[0]^=7, y[0]^=7;
x[1]=s[x[1]], y[1]=s[y[1]];
return x<y;
});
for(auto& e: a) cout<<e<<' ';
cout<<endl;
}
hogeover30