Firetruck The Center City fire department collaborates with the transportation department to maintain maps of the city which reflects the current status of the city streets. On any given day, several streets are closed for repairs or construction. Fi…
一道简单的路径打印,首先需要一次dfs判断能否从1到达目标点,否则可能会超时.还有一点就是那个格式需要注意下,每条路径前没有空格(看起来好像有3个空格)-. AC代码: #include<cstdio> #include<vector> #include<cstring> #include<algorithm> using namespace std; const int maxn=21+5; int vis[maxn]; vector<int>…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 预处理一下终点能到达哪些点. 暴力就好. 输出结果的时候,数字之间一个空格.. [代码] /* 1.Shoud it use long long ? 2.Have you ever test several sample(at least therr) yourself? 3.Can you promise that the solution is right? At least,the main ideal 4.use the…