链接:https://ac.nowcoder.com/acm/contest/560/D来源:牛客网 题目描述 Give you a rectangular gird which is h cells high and w cells wide. Each grid is black initially. You can turn some grids into white. A grid A(x,y) is connected with grid B if the coordinate of…
Minieye杯第十五届华中科技大学程序设计邀请赛现场同步赛 I Matrix Again https://ac.nowcoder.com/acm/contest/700/I 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 KK is the engineer responsible for sensor sensing in MINIEYE. KK recently need to u…
A - Beauty of Trees 题意: 链接:https://www.nowcoder.com/acm/contest/119/A来源:牛客网 Beauty of Trees 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %lld 题目描述 It’s universally acknowledged that there’re innumerable trees in the campus of…
链接:https://www.nowcoder.com/acm/contest/119/F来源:牛客网 Beautiful Land 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %lld 题目描述 It’s universally acknowledged that there’re innumerable trees in the campus of HUST. Now HUST got a big…
链接:https://www.nowcoder.com/acm/contest/106/K 来源:牛客网 题目描述 It's universally acknowledged that there're innumerable trees in the campus of HUST. Now you're going to walk through a large forest. There is a path consisting of N stones winding its way to…
链接:https://www.nowcoder.com/acm/contest/106/J 来源:牛客网 题目描述 It's universally acknowledged that there're innumerable trees in the campus of HUST. And there are many different types of trees in HUST, each of which has a number represent its type. The doc…
题目描述 It's universally acknowledged that there're innumerable trees in the campus of HUST. Thus a professional tree manager is needed. Your task is to write a program to help manage the trees. Initially, there are n forests and for the i-th forest the…
链接:https://www.nowcoder.com/acm/contest/106/B 来源:牛客网 题目描述 It's universally acknowledged that there're innumerable trees in the campus of HUST. One day Xiao Ming is walking on a straight road and sees many trees line up in the right side. Heights of e…
It’s universally acknowledged that there’re innumerable trees in the campus of HUST.Now HUST got a big land whose capacity is C to plant trees. We have n trees which could be plant in it. Each of the trees makes HUST beautiful which determined by the…
链接:https://www.nowcoder.com/acm/contest/106/K来源:牛客网 题目描述 It’s universally acknowledged that there’re innumerable trees in the campus of HUST. Now you're going to walk through a large forest. There is a path consisting of N stones winding its way to t…
链接:https://www.nowcoder.com/acm/contest/106/J来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 It’s universally acknowledged that there’re innumerable trees in the campus of HUST. And there are many different types o…
1352: New Sorting Algorithm Time Limit: 1 Sec Memory Limit: 128 MB Description We are trying to use a new sorting algorithm to sort a sequence with distinct integers. This algorithm will be end if the sequence is already in increasing order from…
1350: To Add Which? Time Limit: 1 Sec Memory Limit: 128 MB Description There is an integer sequence with N integers. You can use 1 unit of cost to increase any integer in the sequence by 1. Could you tell us the least units of cost to achieve tha…
Now Loading!!! Time Limit: 1 Second Memory Limit: 131072 KB DreamGrid has integers . DreamGrid also has queries, and each time he would like to know the value of for a given number , where , . Input There are multiple test cases. The first l…
Problem 1603 - Minimum Sum Time Limit: 2000MS Memory Limit: 65536KB Total Submit: 564 Accepted: 157 Special Judge: No Description There are n numbers A[1] , A[2] .... A[n], you can select m numbers of it A[B[1]] , A[B[2]] ... A[B[m]] ( 1 <= B[…
Another Server 时间限制:1秒 空间限制:262144K 题目描述 何老师某天在机房里搞事情的时候,发现机房里有n台服务器,从1到n标号,同时有2n-2条网线,从1到2n-2标号,其中第i条网线双向连接着 服务器和号服务器,在一个单位时间内最多能够承受x_i个单位流量. 显然这些服务器之间要进行信息交换,为了测试服务器的抗压能力,你需要帮何老师计算出1号服务器在一个单位时间内最多能向n号服务器发送多少个单位流量的数据,这里认为数据的传输是瞬间完成的. (该图引用自百度百科) 输入描…
给你一个一般图 保证每条边的一端下标不大于30 问最小覆盖集的大小为多少 爆搜:枚举前30个点是否在覆盖集内 剪枝1:如果不在的话 那么他所连的下标大于30的点都必须选 剪纸2:最优解剪枝 #include<bits/stdc++.h> using namespace std; int n, m; bitset<> G[], em; int cnt, ans; > a) { if (a.count() >= ans) { return; } || o > ) {…
给你一个一共由两种边的完全图 要求你求1到N的最短路 q队列为前沿队列(已探索过且最外围的点) p队列为未探索队列(未探索过的点) depth这个数组的用法并不是代表实际上这个点在第几层 而是防止死循环 保证每次通过前沿的一个点都只会遍历p中每个点一次 #include <bits/stdc++.h> using namespace std; typedef long long ll; ; ; ; int n,m,a,b,nm,qwq; int head[maxn]; ll dis[maxn…