結果
| 問題 |
No.3326 岩井星人の帰星
|
| コンテスト | |
| ユーザー |
のらら
|
| 提出日時 | 2025-10-28 20:56:50 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 812 bytes |
| コンパイル時間 | 3,253 ms |
| コンパイル使用メモリ | 185,564 KB |
| 実行使用メモリ | 29,792 KB |
| 最終ジャッジ日時 | 2025-11-01 09:27:36 |
| 合計ジャッジ時間 | 18,615 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 59 |
ソースコード
//入力チェック+連結確認
#include <iostream>
#include <algorithm>
#include <atcoder/all>
#include <queue>
#include <set>
#include <cassert>
using namespace std;
using namespace atcoder;
using ll = long long;
//#define endl "\n";
ll N, M, L;
vector<vector<int>> G;
set<pair<ll,ll>> st;
int main(){
cin >> N >> M;
G.resize(N + 1);
dsu d(N + 1);
for(int i = 0; i < M; i++){
ll a, b;
cin >> a >> b;
if(a > b) swap(a, b);
G[a].push_back(b);
G[b].push_back(a);
assert(a != b);
assert(st.find({a, b}) == st.end());
st.insert({a, b});
d.merge(a, b);
}
cin >> L;
vector<ll> chk(N + 1, -1);
for(int i = 0; i < L; i++){
ll j, k;
cin >> j >> k;
chk[j] = k;
}
if(d.same(1, N) == true) cout << "T" << endl;
else cout << "F" << endl;
return 0;
}
のらら