首页 > TAG信息列表 > Nanjing

2019 ICPC Asia Nanjing Regional

题目地址 A题 题意 思路 就找最大的集合,不存在 2 2 2 倍关系的那个就是答案。 代码 int n;cin>>n; if (n % 2 == 0) { cout << n/2+1 <<endl; } else

2019 icpc nanjing K - Triangle (计算几何+乱搞)

计蒜客 - 42405 struct point { double x, y; point() {}; point(double x, double y) : x(x), y(y) {}; inline double dis(point b) { return sqrt((x - b.x) * (x - b.x) + (y - b.y) * (y - b.y)); } point operator + (point b) const { return point(x + b.x, y

The Preliminary Contest for ICPC Asia Nanjing 2019

A.The beautiful values of the palace 首先对于每个\((x,y)\),我们可以\(O(1)\)的查询出这个坐标的值。接下来就将问题转化为了一个\(10^6 \cdot 10^6\)的矩阵,每次查询子矩阵内的点的和。 考虑将所有的\(y\)离散化,计\(mp_{i,j}\)表示\((1,1)-(i,j)\)的和,那么对于\((x_1,y_1)->(x_2

Nanjing F. Greedy Sequence(线段树 - 单点修改 区间最大值查询)

链接:https://nanti.jisuanke.com/t/41303 来源:The Preliminary Contest for ICPC Asia Nanjing 2019   题意:给我们一个序列(全排列中的某个序列),序列长度为n。现在需要我们用这个序列组成n个长度为n新序列,问每个序列中非零的数字共有多少个?这n个序列的条件就是:第 i 个

The Preliminary Contest for ICPC Asia Nanjing 2019

A. The beautiful values of the palace 求出每个点的权值, 然后树状数组扫描线 #include <iostream>#include <sstream>#include <algorithm>#include <cstdio>#include <cmath>#include <set>#include <map>#include <queue>#include <s

The Preliminary Contest for ICPC Asia Nanjing 2019 D. Robots(概率dp)

题目链接:https://nanti.jisuanke.com/t/41301 题目大意: 给定一个没有循环的有向图,它从节点1开始,到节点n结束。 有一个机器人从1开始,每天都会以相同的概率前往相邻节点之一或静止不动。每天机器人的耐久性消耗量等于经过的天数。 请计算机器人到达节点n时的预期耐久性消耗量。 保证

The Preliminary Contest for ICPC Asia Nanjing 2019

Rank Solved A B C D E F G H I 157/1361 4/9 O O . Ø . O . O . O: 当场通过 Ø: 赛后通过 .: 尚未通过 A The beautiful values of the palace solved by viscaria&chelly chelly’s solution 找到坐标和权值的对应关系,就是一个简单的二维数点。 B super_log