zoukankan
html css js c++ java
int +问号使用
单问号---用于给变量设初值的时候,给变量(int类型)赋值为null,而不是0!
双问号---用于判断并赋值,先判断当前变量是否为null,如果是就可以赋一个新值,否则跳过!
public
int
?
para = null;
//
public int para;如果不注释掉此行,而把上一行注释掉的话,下面会报错!
public
int
par()
{
return
this
.para
??
0
;
}
查看全文
相关阅读:
HDU 1175 连连看 (DFS+剪枝)
CF702F T-Shirts
UVA12538 Version Controlled IDE
P2605 [ZJOI2010]基站选址
P3835 【模板】可持久化平衡树
CF915E Physical Education Lessons
P3701 「伪模板」主席树
P1198 [JSOI2008]最大数
P3466 [POI2008]KLO-Building blocks
P3919 【模板】可持久化数组(可持久化线段树/平衡树)
原文地址:https://www.cnblogs.com/ulex/p/1527948.html
最新文章
CodeForces 245H Queries for Number of Palindromes (区间DP)
LightOJ 1031 Easy Game (区间DP)
POJ 2391 Ombrophobic Bovines (二分答案+floyd+最大流)
HihoCoder1338 A Game (区间DP)
POJ 3280 Cheapest Palindrome (区间DP) 经典
POJ 2955 Brackets (区间DP)
Codeforces 607B Zuma (区间DP)
Codeforces 455A Boredom (线性DP)
HDU 4283 You Are the One 【区间DP】
POJ 1515 Street Directions (边双连通)
热门文章
POJ 1149 PIGS 【最大流】
POJ 1985 Cow Marathon (模板题)(树的直径)
CodeForces 721C Journey(拓扑排序+DP)
Codeforces 685B Kay and Snowflake (树的重心)
Codeforces 375B Maximum Submatrix 2 (DP)
POJ 1185 炮兵阵地 【状压DP】
PTA L2-001 紧急救援 (点带权最短路)
POJ 1201 Intervals (经典) (差分约束)
Codeforces 870C Maximum splitting (贪心+找规律)
HDU 1010 Tempter of the Bone (DFS+可行性奇偶剪枝)
Copyright © 2011-2022 走看看