码迷,mamicode.com
首页 >  
搜索关键字:枚举    ( 15377个结果)
mybatis 3 -枚举
定义枚举:public static enum AppStateEnum { Valid("有效"), Virtual("虚拟"), Hide("隐藏"); public String toString() { return this.app...
分类:其他好文   时间:2014-10-26 15:36:19    阅读次数:131
Rhythmk 一步一步学 JAVA (18): Enum枚举学习
枚举定义:public enum SizeEnum { SMALL, BIG, BIGEST};public enum SizeStringEnum { SMALL("小"), BIG("大"), BIGEST("巨大"); private Strin...
分类:编程语言   时间:2014-10-26 15:34:13    阅读次数:142
枚举类型小结
枚举语法:[public] enum 枚举名{ 值1, 值2 值3, ......}枚举类型默认可以跟int类型相互转换,枚举类型跟int类型是兼容的。public enum QQState{ Online, OffLine, Leave, Busy, QMe}class Program{ stat...
分类:其他好文   时间:2014-10-26 15:31:11    阅读次数:176
C#编程(4_复杂的变量类型)
枚举类型enum{,,,,...,}举例:namespace ConsoleApplication1{ enum orientation : byte { north=1, south=2, east=3, west=4, ...
分类:Windows程序   时间:2014-10-26 07:58:43    阅读次数:276
uva1152 - 4 Values whose Sum is 0(枚举,中途相遇法)
用中途相遇法的思想来解题。分别枚举两边,和直接暴力枚举四个数组比可以降低时间复杂度。可是我不会写。。。看了紫书作者刘汝佳老师的代码,真是太美了!简单明了,就像看吕钦下的棋一样。我就模仿的写了一下:#include#include#include#include#include#include#inc...
分类:其他好文   时间:2014-10-26 00:20:11    阅读次数:282
POJ 2586 Y2K Accounting Bug(枚举大水题)
Y2K Accounting Bug Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10674   Accepted: 5344 Description Accounting for Computer Machinists (ACM) has sufferre...
分类:其他好文   时间:2014-10-25 23:04:29    阅读次数:161
函数 枚举和递归
1、函数 一个较大的程序一般应分为若干个程序块,每一个模块用来实现一个特定的功能。所有的高级语言中都有子程序这个概念,用子程序实现模块的功能。在C#语言中,子程序的作用是由一个主函数和若干个函数构成。由主函数调用其它函数,其它函数也可以互相调用。同一个函数可以被一个或多个函数调用任意多次。 在...
分类:其他好文   时间:2014-10-25 22:41:42    阅读次数:214
【枚举+优化】10396 - 组队
【枚举+优化】10396 - 组队Time Limit: 1000MSMemory Limit: 65536KBNBA每年都有球员选秀环节。通常用速度和身高两项数据来衡量一个篮球运动员的基本素质。假如一支球队里速度最慢的球员速度为minV,身高最矮的球员高度为minH,那么这支球队的所有队员都应该满...
分类:其他好文   时间:2014-10-25 21:29:53    阅读次数:270
uva-10487 - Closest Sums
暴力枚举后去重最后二分加判断找答案 #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { int count=0; int t,m,i,n,j; int a[1010]; while(ci...
分类:其他好文   时间:2014-10-25 17:23:14    阅读次数:190
UVa1583 Digit Generator
因为题目给出的n的最大值是100000,即为它的各个位数加起来的和的最大值是1+9+9+9+9+9=46,所以对于任意一个数n,就可以从n-46开始枚举就可以了,检测它是否满足条件。#includeint main(){ long int n,i,s=0,num; scanf("%d",&num.....
分类:其他好文   时间:2014-10-25 17:09:31    阅读次数:158
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!