結果
| 問題 |
No.8078 Very Simple Traveling Salesman Problem
|
| コンテスト | |
| ユーザー |
aspi
|
| 提出日時 | 2021-03-09 23:25:11 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 73 ms / 2,000 ms |
| コード長 | 513 bytes |
| コンパイル時間 | 1,602 ms |
| コンパイル使用メモリ | 174,600 KB |
| 実行使用メモリ | 9,216 KB |
| 最終ジャッジ日時 | 2024-10-11 12:39:09 |
| 合計ジャッジ時間 | 2,446 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 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;
}
aspi