BZOJ 4898: [Apio2017]商旅 题解
2021-09-05 21:11
标签:php continue 参考 check str its size clu false BZOJ链接:http://www.lydsy.com/JudgeOnline/problem.php?id=4898 题目PDF链接:https://files.cnblogs.com/files/winmt/merchant%28zh_CN%29.pdf 题解PDF链接:https://files.cnblogs.com/files/winmt/APIO2017-%E5%95%86%E6%97%85%E9%A2%98%E8%A7%A3.pdf 参考代码:(因为官方数据并没有出来,所以我的标程正确性只能说90%正确吧,毕竟对拍过。) #include using namespace std; const int N = 105; const int K = 1005; const long long INF = 1e10; const int MAX_ANS = 1e9 + 1; int n, m, items; int buy[N][K], sell[N][K]; long long dist[N][N], profit[N][N]; long long adj[N][N], adj2[N][N]; inline bool check(long long x) { for (int i = 1; i items; for (int i = 1; i buy[i][j] >> sell[i][j]; } } for (int i = 1; i > v >> w; dist[u][v] = min(dist[u][v], (long long) w); } for (int k = 1; k
下一篇:C#部分语法总结