ICode9

精准搜索请尝试: 精确搜索
  • Coolest Ski Route2022-05-03 19:34:41

    求最长路,可以用spfa做, 数组要开到1e6,否则会超时 #include <iostream> #include <queue> #include <cstring> using namespace std; const int N = 1e6 + 10; const int INF = 0x3f3f3f3f; #define x first #define y second int ne[N], e[N], w[N], h[N], idx, in[N]; type

  • CF1368E Ski Accidents2021-08-23 14:04:25

    读懂题是第一要素。 考虑把点集分割为:\(A,B,C\) 首先把所有入度为\(0\)的点加入\(A\) 然后对所有入边只来自\(A\)的点加入\(B\) 然后对所有入边只来自\(B\)的点加入\(C\) 剩下的全部加入\(C\) 此时: A:只有入度为0的点,或者全部入边全来自C B:只有来自A的入度 C:至少有来自B的入度

  • [USACO09OPEN]Ski Lessons2021-05-29 19:02:16

    嘟嘟嘟   先考虑这两点: 1.如果我们有结束时间相同的课程,且达到的能力相同,那么我们一定选择开始时间最晚的。 2.如果有能力值相同的滑雪坡,我们一定选择时间最短的。 因此先预处理两个数组。cla[i][j]代表在 i 时刻结束,能力值达到 j 的课程中开始的最晚时间,ski[i]代表需要能力值至

  • CodeForces - 350B Resort (DFS)2019-08-03 09:36:44

    Resort   Valera's finally decided to go on holiday! He packed up and headed for a ski resort. Valera's fancied a ski trip but he soon realized that he could get lost in this new place. Somebody gave him a useful hint: the resort has n objects (w

  • 滑雪2019-07-19 10:55:25

    滑雪 Problem Description Michael喜欢滑雪,这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道在一个区域中最长的滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一

  • BZOJ1721 Ski Lift 缆车支柱2019-04-21 14:41:45

    Description   Farmer Ron in Colorado is building a ski resort for his cows (though budget constraints dictate construction of just one ski lift). The lift will be constructed as a monorail and will connect a concrete support at the starting location to th

  • 划水——滑雪ski2019-02-23 17:54:40

    样例 5 5 1 2 3 4 5 16 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9 输出 25  怀念的划水题。 相信大部分同志都有看见过。。。 当年仅会dfs的我在这里卡了1h。。。 emmm~~ dfs+dp dp[i][j]记录第i行第j列的最大距离 上代码。。。 #include<bits/stdc++.h> usi

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有