結果
| 問題 | No.2820 Non-Preferred IUPAC Nomenclature |
| コンテスト | |
| ユーザー |
Nichi10p
|
| 提出日時 | 2024-07-27 06:50:01 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 161 ms / 2,000 ms |
| + 731µs | |
| コード長 | 569 bytes |
| 記録 | |
| コンパイル時間 | 1,476 ms |
| コンパイル使用メモリ | 220,868 KB |
| 実行使用メモリ | 24,052 KB |
| 最終ジャッジ日時 | 2026-11-01 19:44:09 |
| 合計ジャッジ時間 | 7,786 ms |
|
ジャッジサーバーID (参考情報) |
judge7_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <boost/hana/functional/fix.hpp>
using boost::hana::fix;
int main() {
int N;
cin >> N;
vector<vector<int>> G(N);
for (int u=0; u < N; ++u)
for (int i=0; i < 4; ++i) {
string C;
cin >> C;
if (C != "H")
G[u].push_back(stoi(C) - 1);
}
fix([&](auto &&self, int const u, int const p) -> void {
for (int const v : G[u])
if (v != p) {
cout << "(";
self(v, u);
cout << "yl)";
}
cout << "meth";
})(0, -1);
cout << "ane" << endl;
}
Nichi10p