답안 #488836

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
488836 2021-11-20T15:31:13 Z ssense 꿈 (IOI13_dreaming) C++14
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#define startt ios_base::sync_with_stdio(false);cin.tie(0);
typedef long long  ll;
using namespace std;
#define vint vector<int>
#define all(v) v.begin(), v.end()
#define MOD 1000000007
#define MOD2 998244353
#define MX 1000000000
#define MXL 1000000000000000000
#define PI (ld)2*acos(0.0)
#define nax 200005
#define pb push_back
#define sc second
#define fr first
//#define int unsigned long long
//#define endl '\n'
#define ld long double
#define NO cout << "NO" << endl
#define YES cout << "YES" << endl

const int N = 105;

vector<pair<int, int>> adj[N];

int bfs(int s)
{
	queue<pair<pair<int, int>, int>> q;
	q.push({{s, -1}, 0});
	int now = 0;
	while(!q.empty())
	{
		int node = q.front().fr.fr;
		int dist = q.front().sc;
		int parent = q.front().fr.sc;
		now = max(now, dist);
		q.pop();
		for(auto v : adj[node])
		{
			if(v.fr != parent)
			{
				q.push({{v.fr, node}, dist+v.sc});
			}
		}
	}
	return now;
}

bool vis[N];

int dfs(int u, int par)
{
	int ans = bfs(u);
	vis[u] = true;
	for(auto v : adj[u])
	{
		if(v.fr != par)
		{
			ans = min(ans, dfs(v.fr, u));
		}
	}
	return ans;
}

int travelTime(int n, int m, int l, int a[], int b[], int t[])
{
	for(int i = 0; i <= n; i++)
	{
		adj[i].clear();
		vis[i] = false;
	}
	for(int i = 0; i < m; i++)
	{
		
	}
}

int32_t main(){
	startt
	int t = 1;
	//cin >> t;
	while (t--) {
		solve();
	}
}


Compilation message

dreaming.cpp: In function 'int travelTime(int, int, int, int*, int*, int*)':
dreaming.cpp:76:1: warning: no return statement in function returning non-void [-Wreturn-type]
   76 | }
      | ^
dreaming.cpp: In function 'int32_t main()':
dreaming.cpp:83:3: error: 'solve' was not declared in this scope
   83 |   solve();
      |   ^~~~~