結果
問題 | No.1639 最小通信路 |
ユーザー |
![]() |
提出日時 | 2021-08-06 21:44:48 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 442 bytes |
コンパイル時間 | 2,144 ms |
コンパイル使用メモリ | 197,076 KB |
最終ジャッジ日時 | 2025-01-23 14:58:01 |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 37 WA * 6 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n; cin>>n; set<int> s; rep(i,n*(n-1)/2){ int a,b; string x; cin>>a>>b>>x; s.insert(a); s.insert(b); if((int)s.size()==n){ cout<<x<<endl; return 0; } } return 0; }