結果

問題 No.2674 k-Walk on Bipartite
ユーザー tour2st
提出日時 2024-03-15 23:13:50
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 658 bytes
コンパイル時間 838 ms
コンパイル使用メモリ 97,580 KB
実行使用メモリ 16,256 KB
最終ジャッジ日時 2024-09-30 02:47:00
合計ジャッジ時間 4,013 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 16 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <random>
#include <time.h>
#include <map>
using namespace std;

int n,m,s,t,k,a,b;
vector<int>e[200000];
int length[200000];
bool visited[200000];

void dfs(int now, int len=0)
{
    if(visited[now]) return;
    visited[now]=true;
    length[now]=len;
    for(int nxt:e[now]) dfs(nxt, len+1);
}

int main()
{
    cin >> n >> m >> s >> t >> k;
    for(int i=0;i<m;i++)
    {
        cin >> a >> b;
        a--;b--;
        e[a].push_back(b);
        e[b].push_back(a);
    }
    s--;t--;
    dfs(s);
    cout << "No" << endl;
}
0