题解
文章平均质量分 77
韬丶
这个作者很懒,什么都没留下…
展开
-
The 2021 ICPC Asia Regionals Online Contest (II) J Leaking Roof (拓扑排序)
J Leaking RoofGrandpa Are lives in an old house. Now it is the heavy rain that occurs only once in a hundred years, but the roof of Grandpa Are’s house leaks. His roof can be viewed as a n×n grid, and each square has a height. Denote the height of the squ原创 2021-09-28 17:14:45 · 183 阅读 · 0 评论 -
The 2021 ICPC Asia Regionals Online Contest (I) D Edge of Taixuan (思维+线段树)
D Edge of TaixuanFu Hua, a network engineer who comes from Mount Taixuan, has a very important mission:After years of slow internet and broken promises, Mount Taixuan finally has a village head who determines to upgrade the internet with broadband.To bu原创 2021-09-27 21:02:49 · 212 阅读 · 0 评论 -
Codeforces-1436B Prime Square (思维)
题目链接: https://codeforces.com/contest/1436/problem/B.题意:求一个行列均为n的矩阵,矩阵中每个数均不为素数,但每行和每列的和均为素数。思路:观察第二个样例想到(心想900分的题必然简单233):1不是素数,那么试试全为1。然后发现如果n为素数,全为1可行,但如果n不为素数,那么就需要把某一行的一个1变为另一个合数。#include<stdio.h>const int N = 200;bool vis[N];bool viss[N原创 2020-10-31 19:53:37 · 281 阅读 · 0 评论 -
第十一届蓝桥杯c++b组省赛第二场 G.回文日期
回文日期题目描述2020 年春节期间,有一个特殊的日期引起了大家的注意:2020 年 2 月 2 日。因为如果将这个日期按 “yyyymmdd” 的格式写成一个 8 位数是 20200202,恰好是一个回文数。我们称这样的日期是回文日期。有人表示 20200202 是 “千年一遇” 的特殊日子。对此小明很不认同,因为不到 2 年之后就是下一个回文日期:20211202 即 2021 年 12 月 2 日。也有人表示 20200202 并不仅仅是一个回文日期,还是一个 ABABBABA 型的回文日期。原创 2021-04-17 22:09:00 · 311 阅读 · 0 评论 -
The 2021 ICPC Asia Regionals Online Contest (I) A Busiest Computing Nodes (线段树+二分)
题面You have a computing cluster with a total of k computing nodes, labelled from 0 to k−1. The cluster can handle multiple requests at the same time, but each node can process at most one request at the same time.The rules for request assignment to comput原创 2021-09-25 21:00:27 · 269 阅读 · 0 评论 -
BAPC2020 F. Generator Grid(最小生成树)
中文题面国家电网决定在某个区域建设发电厂和电网。这个区域有n座城市。国家电网对这些城市进行了调查,并建议将其中的m个城市作为发电厂的可能位置,第i个建议指出,国家电网可以在城市ci中建造一座发电厂,成本为ai。这些发电厂非常现代化,一座发电厂就可以为整个区域供电,但修建电线是一件需要花钱的事情。输入一个数组b,当1≤ i<n时,bi表示在城市i和城市i+1之间建造电线的成本,bn表示在城市n和1之间建造电线的成本。如果一个城市包含一个发电厂,或者通过电线连接到一个有发电厂的城市,那么它将获得电力原创 2021-09-14 10:42:10 · 121 阅读 · 0 评论 -
HDU-1530 Maximum Clique (最大团问题)
Maximum CliqueGiven a graph G(V, E), a clique is a sub-graph g(v, e), so that for all vertex pairs v1, v2 in v, there exists an edge (v1, v2) in e. Maximum clique is the clique that has maximum number of vertex.InputInput contains multiple tests. For ea原创 2021-05-29 18:49:16 · 341 阅读 · 0 评论