After winning gold and silver in IOI 2014, Akshat and Malvika want to have some fun. Now they are playing a game on a grid made of n horizontal and m ...
分类:
其他好文 时间:
2019-11-03 20:34:00
阅读次数:
101
1、找两台Windows系统,一个是A,作为Hub;一个是B,作为Node; 2、在A、B两台电脑分别下载selenium-server-standalone-2.48.0.jar,并放到指定目录 3、先设置Hub,打开A电脑的cmd,cd进入该目录 4、并执行命令:java -jar seleni ...
分类:
其他好文 时间:
2019-11-03 20:14:44
阅读次数:
86
@{ ViewBag.Title = "Grid/Grid"; var F = Html.F();} @section body { @(F.Grid().IsFluid(true).CssClass("blockpanel").Title("表格").ShowHeader(true).ShowBo ...
分类:
其他好文 时间:
2019-11-03 18:35:09
阅读次数:
286
原题链接在这里:https://leetcode.com/problems/largest-1-bordered-square/ 题目: Given a 2D grid of 0s and 1s, return the number of elements in the largest square ...
分类:
其他好文 时间:
2019-11-03 10:52:24
阅读次数:
99
#include<bits/stdc++.h> using namespace std ; int n; struct City { int id; long long x,y; //坐标 long long cc,kk; //自建的花费,连线的花费 bool self;//是否建站 int fa;... ...
分类:
其他好文 时间:
2019-11-03 01:44:22
阅读次数:
77
"cf题面" 解题思路 比赛过程中想了一个贪心——把所有城市按照自建代价排序,排在第一的城市肯定自建,之后依次判断排在后面的城市要自建还是要连接前面的。这么做WA13了(第一次忘开 WA4)。 赛后看看题解,又参考了之前同样WA13的 Artoriax的代码,大概发现了这种做法的漏洞。假设自建代价是 ...
分类:
其他好文 时间:
2019-11-02 16:13:41
阅读次数:
122
" D. Shichikuji and Power Grid " 参考: "Codeforces Round 597 (Div. 2)" 思路:一个很裸的最小生成树。把建立基站看成是,城市与源点(虚构的)建边。由此建立最小生成树,即可得出答案。 代码: cpp // Created by CAD o ...
分类:
其他好文 时间:
2019-11-02 16:00:00
阅读次数:
85
CF1245D: Shichikuji and Power Grid 题意描述: + 给定$n$个点$(n\leq2000)$,在第$i$个点上建立一个基站需要$c_i$的代价,连接两个点需要$(|x_i x_j|+|y_i y_j|) (k_i+k_j)$的代价。对于一个点要么建立基站,要么连接建 ...
分类:
其他好文 时间:
2019-11-02 13:33:44
阅读次数:
130
题意: 二维平面上n个点,每个点可以建厂,也可以与其他点连边,建厂花费为$c_i$,与j连边花费为$(k_i+k_j) dis(i,j)$,dis为两点之间的欧式距离,求让每个点都通电的最小花费与方案 思路: 维护使这个点通电的花费的优先队列,一开始先把建厂放进去,然后每次拿出最小花费的点i,再用i ...
分类:
其他好文 时间:
2019-11-02 13:28:49
阅读次数:
79
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Linq; us... ...