結果
| 問題 | No.298 話の伝達 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2015-11-14 02:49:18 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 771 bytes | 
| コンパイル時間 | 1,319 ms | 
| コンパイル使用メモリ | 161,796 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-09-13 16:40:08 | 
| 合計ジャッジ時間 | 2,109 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 WA * 11 | 
ソースコード
#include <bits/stdc++.h>
#define FOR(i,a,b)    for (int i=(a)  ;i<(b) ;i++)
#define RFOR(i,a,b)   for (int i=(b)-1;i>=(a);i--)
#define REP(i,n)      for (int i=0    ;i<(n) ;i++)
#define RREP(i,n)     for (int i=(n)-1;i>=0  ;i--)
#define ALL(a)        (a).begin(),  (a).end()
#define RALL(a)       (a).rbegin(), (a).rend()
const int MOD = 1e9 + 7;
const int INF = 1 << 29;
const double EPS = 1e-10;
using namespace std;
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n,m;
  cin >> n >> m;
  vector<float> p(n,1.0);
  p[0] = 0.0;
  REP(i,m){
    int a,b,c;
    cin >> a >> b >> c;
    p[b] *= 1.0 - (1.0 - p[a])*(c / 100.0);
    //cout << p[b] << endl;
  }
  REP(i,n){
    //cout << p[i] << endl;
  }
  cout << (1.0 - p[n-1]) << endl;
  return 0;
}
            
            
            
        