結果
問題 |
No.8078 Very Simple Traveling Salesman Problem
|
ユーザー |
![]() |
提出日時 | 2021-03-09 23:20:12 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 513 bytes |
コンパイル時間 | 1,557 ms |
コンパイル使用メモリ | 174,028 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-11 12:39:14 |
合計ジャッジ時間 | 3,560 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 1 |
other | RE * 10 |
ソースコード
#include<bits/stdc++.h> using namespace std; /* 今からverifyするよ~ */ int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int N,M,a,b,c; cin>>N>>M; set<pair<int,int>>se; assert(2<=N&&N<=500); assert(M==N*(N-1)/2); for(int i=0; i<M; i++){ cin>>a>>b>>c; assert(1<=a&&a<=N); assert(1<=b&&b<=N); assert(a==b); assert(c==1); assert(!se.count(make_pair(a,b))); se.insert(make_pair(a,b)); } cout<<N<<endl; }