There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requi...
分类:
其他好文 时间:
2014-07-09 13:31:26
阅读次数:
239
频谱、幅度谱、功率谱和能量谱在信号处理的学习中,有一些与谱有关的概念,如频谱、幅度谱、功率谱和能量谱等,常常让人很糊涂,搞不清其中的关系。这里主要从概念上厘清其间的区别。对一个时域信号进行傅里叶变换,就可以得到的信号的频谱,信号的频谱由两部分构成:幅度谱和相位谱。这个关系倒还是简单。那么,什么是功率...
分类:
其他好文 时间:
2014-07-09 13:18:29
阅读次数:
244
jquery的 插件cluetip,地址下载是:plugins.learningjquery.com/cluetip/demo/下面简单讲解下用法:1 首先当然要放JQUERY的基本JS,和这个插件的JS了,如: $('a.basic').cluetip();3 定义弹出框的高度大小等: $('a....
分类:
Web程序 时间:
2014-07-09 13:17:52
阅读次数:
171
这道题我错了一次,主要是A跟Z边界没有考虑,其他的就是记得测试时用nextLine,因为字符串可能可能有空格。
import java.util.Scanner;
public class bigLetterCount {
public static int CalcCapital(String str){
int count=0;
for(int i=0;i<str.length()...
分类:
其他好文 时间:
2014-07-09 12:17:19
阅读次数:
279
HDU 4847 Wow! Such Doge!
题目链接
题意:给定文本,求有几个doge,不区分大小写
思路:水题,直接一个个读字符每次判断即可
代码:
#include
#include
char c;
char a[5];
int main() {
a[5] = '\0';
int ans = 0;
while ((c = ge...
分类:
其他好文 时间:
2014-07-09 12:15:23
阅读次数:
220
可以稍微让代码写的好看,不用直接写双循环的话,就可以写成函数的调用,重用性也很高。
import java.util.Scanner;
public class findOnlyOnceChar {
public static boolean FindChar(String pInputString, char pChar){
int count=0;
for(int i=0;i<pI...
分类:
其他好文 时间:
2014-07-09 11:48:07
阅读次数:
397
A:
#include
#include
int main() {
int T;
scanf("%d", &T);
while(T --) {
double x, ans = 0;
for(int i = 0; i < 12;i ++) {
scanf("%lf", &x);
ans += x;
}
ans /= 12;
char b[1000];
...
分类:
其他好文 时间:
2014-07-09 11:05:46
阅读次数:
277
因为区分大小写,所以要用toUpperCase()和toLowerCase()两个函数同时与charAt得到的字符比较。
import java.util.Scanner;
public class countCharNumber {
public static void main(String args[]){
Scanner input=new Scanner(System.in);...
分类:
其他好文 时间:
2014-07-09 09:26:17
阅读次数:
232
很简单,逆向输出就好了。
import java.util.Scanner;
public class convertString {
public static void main(String args[]){
Scanner input=new Scanner(System.in);
String s=input.nextLine();
StringBuffer l=new Str...
分类:
其他好文 时间:
2014-07-09 09:11:55
阅读次数:
236