結果
問題 | No.3078 Very Simple Traveling Salesman Problem |
ユーザー | aspi |
提出日時 | 2021-03-09 23:20:12 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 513 bytes |
コンパイル時間 | 1,562 ms |
コンパイル使用メモリ | 168,528 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-04-19 20:25:00 |
合計ジャッジ時間 | 3,239 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | RE | - |
testcase_02 | RE | - |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | RE | - |
ソースコード
#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; }