对给的药水浓度进行排序,对于小于解毒药水浓度的可以直接加上它的体积,对每次混合后的药水浓度进行记录,
大于解毒药水浓度就输出,注意你求得是百分比还是百分数。。。
#include
#include
#include
#include
using namespace std;
int s[10005];
int main()
{
int a,i,n,m,k;
s...
分类:
其他好文 时间:
2014-08-01 19:59:32
阅读次数:
205
#include
int main()
{ int i,a;
while (~scanf("%x", &a)){
for(i=15;i>=0;i--)
printf("%1d", a&1
printf("\n");
}return 0;
}...
分类:
其他好文 时间:
2014-08-01 19:40:22
阅读次数:
182
问题:给你一组数一个数字出现一次,其他的数字出现两次,找出那个出现一次的数字分析:相同数字异或为0,所以将所有数字都异或后剩下的就是出现一次的数class Solution {public: int singleNumber(int A[], int n) { int sum=0...
分类:
其他好文 时间:
2014-08-01 19:36:22
阅读次数:
202
一、window1.在全局作用域中定义的变量和函数会被归在window对象。var a=1,b=2;function add(a,b){return a+b;}console.log(window.a);//1console.log(window.add(a,b));//3有点区别在于,全局变量不能...
分类:
编程语言 时间:
2014-08-01 18:32:42
阅读次数:
239
/**
*
* @param 传入一个字符串
* @return 返回一个字符串中的大写字母
*/
private static String stringChange(String s) {
if (Utils.isStrEmpty(s))
return "";
String...
分类:
编程语言 时间:
2014-08-01 16:18:51
阅读次数:
226
/**
* @param 传入一个中文字符串
* @return 返回一个字符串中的中文拼音
*/
private String getNameNum(String name) {
if (!Utils.isStrEmpty(name)) {
int len = name.length();
...
分类:
其他好文 时间:
2014-08-01 16:18:41
阅读次数:
237
Problem Description:
Given an array of strings, return all groups of strings that are anagrams.
Note: All inputs will be in lower-case.
分析:题目要求输出找出所有在字符串数组中的变形词,变形词的意思是指单词由相同的字母构成,只是字母在单词中的顺序...
分类:
其他好文 时间:
2014-08-01 16:09:01
阅读次数:
164
Problem Description:
Given two numbers represented as strings, return multiplication of the numbers as a string.
Note: The numbers can be arbitrarily large and are non-negative.
分析:两个string相乘...
分类:
其他好文 时间:
2014-08-01 16:06:01
阅读次数:
141
style只能获取元素的行间样式。原生代码获取css里的样式,currentStyle只适用于IE,getComputedStyle适用于FF、opera、safari、chrome。function getStyle ( obj, attr ) { return obj.currentSt...
分类:
Web程序 时间:
2014-08-01 15:51:41
阅读次数:
243
#import int main(int argc, const char *argv[]){ NSLog(@"Hello Object-C!"); return (0);}单击Build and GO或Mac键+R,将生成并运行程序;
分类:
其他好文 时间:
2014-08-01 15:35:41
阅读次数:
176