結果
| 問題 |
No.3029 オイラー標数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-02-21 21:52:49 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 677 ms / 2,000 ms |
| コード長 | 572 bytes |
| コンパイル時間 | 2,181 ms |
| コンパイル使用メモリ | 204,992 KB |
| 実行使用メモリ | 37,888 KB |
| 最終ジャッジ日時 | 2025-02-21 21:53:24 |
| 合計ジャッジ時間 | 13,924 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
void Yes(){cout << "YES\n";}
void No(){cout << "NO\n";}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int Q; cin >> Q;
set<pair<int,int>> S1,S2;
set<tuple<int,int,int>> S3;
while(Q--){
int a,b,c; cin >> a >> b >> c;
S1.insert({a,0});
S1.insert({b,0});
S1.insert({c,0});
S2.insert({a,b});
S2.insert({b,c});
S2.insert({a,c});
S3.insert({a,b,c});
}
cout << (int)S1.size()+(int)S3.size()-(int)S2.size() << endl;
}