/*【程序5】
题目:利用条件运算符的嵌套来完成此题:学习成绩>=90分的同学用A表示,60-89分之间的用B表示,60分以下的用C表示。
1.程序分析:(a>b)?a:b这是条件运算符的基本例子。*/
packagetest;
publicclasstest{
publicstaticStringgrade(intnum){
Stringresult=(num..
分类:
编程语言 时间:
2014-05-27 03:54:17
阅读次数:
247
1.局部变量static局部变量和普通局部变量有什么区别:static局部变量只被初始化一次,下一次依据上一次结果值;int
test(int j){static int i=10;i=i+j;return i;}int main(void){ ////美图秀秀笔试 int
m=test(12);....
分类:
编程语言 时间:
2014-05-23 09:17:44
阅读次数:
354
1.#include#include#define MAXN 1010int n,
G[MAXN][MAXN];int x[MAXN], y[MAXN], d[MAXN];int dp(int i) { int& ans = d[i];
if(ans > 0) return ans; ans ...
分类:
其他好文 时间:
2014-05-23 08:49:48
阅读次数:
211
代码如下:
#include
#include
double
dis(double
x1, double y1,
double x2,
double y2)
{
return
sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2));
}
double
v1, v2, v3, x[4], y[4];...
分类:
其他好文 时间:
2014-05-22 12:09:29
阅读次数:
247
代码a
#include
#define maxn 1005
int
a[maxn];
int
dp[maxn];
int
max(int x,int
y)
{
return
x>y?x:y;
}
int
main()
{
int
t,n;
scanf("%d",&t);...
分类:
其他好文 时间:
2014-05-22 09:16:47
阅读次数:
192
/** * @return the ${bare_field_name} *//** *
@param ${param} the ${bare_field_name} to set *//** * ${tags} *//** *
项目名称:${project_name} * 文件名称:${file_...
分类:
系统相关 时间:
2014-05-22 04:52:37
阅读次数:
302
常用快捷键:Debug:F8 Stop debugger:Shift + F8 Toggle
breakpoint:F5 Next line:F7 Step into:Shift + F7 Step out:Ctrl + F7Run to C...
分类:
其他好文 时间:
2014-05-22 03:29:01
阅读次数:
381
/**根据完美二叉树或者非完美二叉树都可以,利用左右子树的根节点的next节点信息来连接next*/public void
connect(TreeLinkNode root){ if(root==null) return; //利用父节点的next...
分类:
其他好文 时间:
2014-05-22 03:03:39
阅读次数:
183
package lbi.flow.util;import
net.sf.json.regexp.RegexpMatcher;public class RegexpUtils { /** *
匹配7c:d1:c3:73:d6:72形式mac * * @return ...
分类:
其他好文 时间:
2014-05-21 03:13:44
阅读次数:
288
@author作者@brief摘要@version版本号@date日期@file文件名,可以默认为空,DoxyGen会自己加@class类名@param函数参数@return函数返回值描述@exception函数抛异常描述@warning函数使用中需要注意的地方@remarks备注@seeseealso字段@notebrief下空一行后的内容表示详细描述,但..
分类:
其他好文 时间:
2014-05-20 22:38:54
阅读次数:
319