有如下方程:Ai= (Ai-1+ Ai+1)/2 - Ci(i = 1, 2, 3, .... n).若给出A0, An+1, 和 C1, C2, .....Cn.请编程计算A1= ?Input输入包括多个测试实例。 对于每个实例,首先是一个正整数n,(n >n){ cin>>ax>>...
分类:
其他好文 时间:
2014-12-02 18:48:19
阅读次数:
182
Description有n个木块排成一行,从左到右依次编号为1~n。你有k种颜色的油漆,其中第i种颜色的油漆足够涂ci个木块。所有油漆刚好足够涂满所有木块,即c1+c2+...+ck=n。相邻两个木块涂相同色显得很难看,所以你希望统计任意两个相邻木块颜色不同的着色方案。Input第一行为一个正整数k...
分类:
其他好文 时间:
2014-12-02 14:57:16
阅读次数:
169
测试大量服务器是否能够ping的通,如果能够ping的通时候可以ssh上去。前提:条件是跳板机和要测试的服务器之间要建立信任关系。#!/bin/bashdeclare-aIPIP[0]=192.168.30IP[1]=192.168.32IP[2]=192.168.34forIP3in${IP[*]}dofor((i=1;i<=100;i++))doping-c1${IP3}.${i}>&..
分类:
系统相关 时间:
2014-12-02 12:03:35
阅读次数:
294
public class Main { public static void main(String[] args) { Chicken c1 = new Chicken(); Chicken c2 = null; c1.eat(); S...
分类:
编程语言 时间:
2014-12-01 22:15:02
阅读次数:
279
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class C1 { public int m...
分类:
其他好文 时间:
2014-11-30 16:51:41
阅读次数:
136
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class C1 { public string...
分类:
其他好文 时间:
2014-11-30 15:26:38
阅读次数:
133
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class C1 { public static...
分类:
其他好文 时间:
2014-11-30 14:09:04
阅读次数:
182
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class C1 { public readon...
分类:
其他好文 时间:
2014-11-30 14:08:15
阅读次数:
201
题目:http://www.lydsy.com:808/JudgeOnline/problem.php?id=1055分析:比较难想的dpf[i][j][c]表示i..j能否压缩成字符c那么怎么转移呢如果存在i<=k<j,f[i][k][c1]=true且f[k+1][j][c2]=true且c1c...
分类:
其他好文 时间:
2014-11-29 23:02:58
阅读次数:
182
题目链接题意 : 给你两个圆的半径和圆心,让你求两个圆相交的面积大小。思路 : 分三种情况讨论假设半径小的圆为c1,半径大的圆为c2。c1的半径r1,圆心坐标(x1,y1)。c2的半径r2,圆心坐标(x2,y2)。d为两圆圆心连线的长度。相交面积为Sd=sqrt((x1-x2)^2+(y1-y2)^...
分类:
其他好文 时间:
2014-11-29 14:28:18
阅读次数:
131