博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
HDU 5813 Elegant Construction
阅读量:7081 次
发布时间:2019-06-28

本文共 798 字,大约阅读时间需要 2 分钟。

构造。从a[i]最小的开始放置,例如放置了a[p],那么还未放置的,还需要建边的那个点 需求量-1,然后把边连起来。

#pragma comment(linker, "/STACK:1024000000,1024000000")#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;typedef long long LL;const double pi=acos(-1.0),eps=1e-8;void File(){ freopen("D:\\in.txt","r",stdin); freopen("D:\\out.txt","w",stdout);}inline int read(){ char c = getchar(); while(!isdigit(c)) c = getchar(); int x = 0; while(isdigit(c)) { x = x * 10 + c - '0'; c = getchar(); } return x;}const int maxn=1000+10;int T,n,sz;struct X{ int f,num; }s[maxn],ans[maxn*maxn];bool cmp(X a, X b) { return a.num

 

转载于:https://www.cnblogs.com/zufezzt/p/5759072.html

你可能感兴趣的文章
JDBC使用步骤分哪几步?
查看>>
线段树心得
查看>>
Linux 进程间通信 信号灯集
查看>>
Python Day 8: html 基本知识
查看>>
2012年4月19日
查看>>
UVA 11090 Going in Cycle!! 二分答案 + bellman-ford
查看>>
final,static,super,this
查看>>
LeetCode解题思路:442. Find All Duplicates in an Array
查看>>
解决BCG库示例程序中的一个诡异编译错误
查看>>
Linux常用命令
查看>>
gradle-遇到的问题
查看>>
C#生成唯一的字符串或者数字
查看>>
深入理解this对象
查看>>
inodes 100%情况解决办法
查看>>
mysql 5.6 调优
查看>>
动态菜单树加载过程
查看>>
计算机存储单位及网络传输单位
查看>>
linux安装jdk
查看>>
Oracle JOB 用法小结
查看>>
自动生成的当前时间与实际时间相差8个小时
查看>>