Codeforces 950E / 949C Data Center Maintenance 图论+tarjan

这篇博客讨论了BigData Inc.如何确保其在全球的n个数据中心在维护期间仍能提供服务。采用两路复制策略,每个数据都有两个副本分别存放在不同的数据中心。问题在于,如何在改变某些数据中心的维护时间而不影响客户数据的可用性。通过建立图论模型,使用Tarjan算法找出最小影响的数据中心数量和这些中心的索引。文章介绍了如何构建图、进行强连通分量分析,以找到最优解决方案。
摘要由CSDN通过智能技术生成

C. Data Center Maintenance
time limit per test
1 second
memory limit per test
512 megabytes
input
standard input
output
standard output

BigData Inc. is a corporation that has n data centers indexed from 1 to n that are located all over the world. These data centers provide storage for client data (you can figure out that client data is really big!).

Main feature of services offered by BigData Inc. is the access availability guarantee even under the circumstances of any data center having an outage. Such a guarantee is ensured by using the two-way replication. Two-way replication is such an approach for data storage that any piece of data is represented by two identical copies that are stored in two different data centers.

For each of m company clients, let us denote indices of two different data centers storing this client data as ci, 1 and ci, 2.

In order to keep data centers operational and safe, the software running on data center computers is being updated regularly. Release cycle of BigData Inc. is one day meaning that the new version of software is being deployed to the data center computers each day.

Data center software update is a non-trivial long process, that is why there is a special hour-long time frame that is dedicated for data center maintenance. During the maintenance period, data center computers are installing software updates, and thus they may be unavailable. Consider the day to be exactly h hours long. For each data center there is an integer u<

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值