結果

問題 No.1749 ラムドスウイルスの感染拡大
ユーザー maple_1016maple_1016
提出日時 2021-11-19 22:06:34
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 15 ms / 2,000 ms
コード長 1,117 bytes
コンパイル時間 1,617 ms
コンパイル使用メモリ 172,184 KB
実行使用メモリ 11,048 KB
最終ジャッジ日時 2023-08-30 08:37:48
合計ジャッジ時間 3,046 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 9 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 8 ms
11,032 KB
testcase_11 AC 8 ms
11,048 KB
testcase_12 AC 15 ms
10,656 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 3 ms
4,380 KB
testcase_15 AC 4 ms
4,376 KB
testcase_16 AC 5 ms
4,380 KB
testcase_17 AC 8 ms
5,568 KB
testcase_18 AC 12 ms
9,624 KB
testcase_19 AC 10 ms
8,820 KB
testcase_20 AC 2 ms
4,376 KB
testcase_21 AC 2 ms
4,376 KB
testcase_22 AC 1 ms
4,380 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 AC 2 ms
4,376 KB
testcase_25 AC 7 ms
8,312 KB
testcase_26 AC 4 ms
4,936 KB
testcase_27 AC 2 ms
4,380 KB
testcase_28 AC 9 ms
4,380 KB
testcase_29 AC 8 ms
4,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define ll long long
#define rep(i,n) for(ll i=0;i<(n);++i)
#define reps(i,n) for(ll i=1;i<=(n);++i)
#define repr(i,n) for(ll i=2;i*i<=(n);++i)
#define all(x) (x).begin(),(x).end()
#define sz(x) ((string)(x).size())
#define pb push_back
#define pob pop_back()
#define MMod (ll)1000000007
#define mmod (ll)998244353
#define setp(x) setprecision((ll)(x))
#define INF (ll)(1000000000000000000)
using namespace std;
using vi=vector<int>;
using vc=vector<char>;
using vb=vector<bool>;
using vl=vector<long long>;
using vvi=vector<vi>;
using vvl=vector<vl>;
using vvc=vector<vc>;
using vvb=vector<vb>;
using vpi=vector<pair<int,int>>;
using vpl=vector<pair<ll,ll>>;
using vs=vector<string>;
using pii=pair<int, int>;
using pll=pair<ll,ll>;
using pqi=priority_queue<int>;

int main(){
  int n,m,t; cin>>n>>m>>t;
  vvi p(n+1);
  rep(i,m){
    int a,b; cin>>a>>b;
    p[a].pb(b);
    p[b].pb(a);
  }
  vvl inf(t+1,vl(n,0));
  inf[0][0]=1;
  reps(i,t){
    rep(j,n){
      for(int k:p[j]){
        inf[i][j]+=inf[i-1][k];
        inf[i][j]%=mmod;
      }
    }
  }
  cout<<inf[t][0]<<endl;
  return 0;
}
0