結果

問題 No.8078 Very Simple Traveling Salesman Problem
ユーザー 👑 CleyL
提出日時 2021-10-27 16:01:30
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 274 bytes
コンパイル時間 559 ms
コンパイル使用メモリ 63,016 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-07 07:27:25
合計ジャッジ時間 1,340 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other AC * 1 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
  int n,m;cin>>n>>m;
  if(m==1){
    int a,b,c;cin>>a>>b>>c;
    cout << c << endl;
  }else{
    int re = 0;
    for(int i = 0; m > i; i++){
      int a,b,c;cin>>a>>b>>c;
      re += c;
    }
    cout << re << endl;
  }
}
0