题目的意思就是给每台电脑的最大传输速度,可以限制每台电脑的最大速度,然后选择k台电脑,使这k台电脑有相同的速度,且这个速度最大 典型的贪心算法,电脑的速度排个序,选择第k大速度即可 #include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int n,k; cin >>n >> k; vector<int> a…
题目地址:http://codeforces.com/problemset/problem/412/A /* 模拟:题目没看懂,但操作很简单,从最近的一头(如果不在一端要先移动到一端)往另一头移动,顺便打印内容 */ #include <cstdio> #include <iostream> #include <algorithm> #include <cmath> #include <cstring> #include <string&g…
题目链接 A. Poster time limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard output The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the ne…
安装oracle执行检查,出现 Checking Network Configuration requirements ... Check complete. The overall result of this check is: Failed <<<< Problem: The install has detected that the primary IP address of the system is DHCP- assigned. Recommendation: Ora…
t题目链接:Coder-Strike 2014 - Round 2 A题:简单水题,注意能加入反复的数字.因此仅仅要推断是否能把Min和Max加入好.就能够了 B题:开一个sum计算每一个聊天总和,和一个s计算每一个人在每一个聊天总和,最后每一个人就用总和减掉自己发送的就可以 C题:最优策略为先把非特殊的答完,然后从最大的開始答 D题:dp,状态为dp[i][j][k],i表示当前长度,j表示前面数字的总和,k表示是否能组成,然后进行记忆化搜索 代码: A: #include <stdio.h>…
Network Configuration TL;DR When Docker starts, it creates a virtual interface named docker0 on the host machine. It randomly chooses an address and subnet from the private range defined by RFC 1918 that are not in use on the host machine, and assign…
本文首发于个人博客https://kezunlin.me/post/5076bc45/,欢迎阅读! ubuntu network configuration Guide network proxy System wide: Network--->None/Manual chrome: can not set firefox: about:preferences---> Network Proxy eth0 config rename xxx to eth0 errors may occur:…
如何解决ubuntu 12.04重启后出现waiting for network configuration和网络标志消失问题 作为菜鸟的我在学着设置网络后,重启电脑后显示 waiting fornetwork configuration,然后是waiting up to 60 more seconds for network configuration,最后显示booting system without fullnetwork configuration.并且进入桌面后网络连接状态图标也消失…
解读先电2.4版 iaas-install-mysql.sh 脚本 基础服务的操作命令已经编写成shell脚本,通过脚本进行一键安装.如下: # Controller节点 安装 执行脚本iaas-install-mysql.sh进行安装 报错的原因是: source /etc/xiandian/openrc.sh,脚本里ping通, 1 #!/bin/bash 2 3 source /etc/xiandian/openrc.sh 4 5 ping $HOST_IP -c 4 >> /dev/n…
TCO round 1C的 250 和500 的题目都太脑残了,不说了. TCO round 1C 950 一个棋子,每次等概率的向左向右移动,然后走n步之后,期望cover的区域大小?求cover,肯定就是dp[l][r][n], 走了n步之后,左边cover了l,右边cover了r. 一开始DP没有搞清楚,这个要画一下图就更清楚了. 转移方程就是概率的传递方向. 1: double dp[505][505][2]; // l,r,n steps unsed; 2: class RedPain…