04 2014 档案
摘要:阿里笔试的时候考了,回来写了下。#include using namespace std;int BinarySearch(int array[], int lenght, int key){ int low = 0; int high = lenght - 1; ...
阅读全文
摘要:时间限制1000 ms内存限制65536 KB题目描述给出两个时间(24小时制),求第一个时间至少要经过多久才能到达第二个时间。给出的时间一定满足的形式,其中x和y分别代表小时和分钟。0≤x#define DEBUG#define DEBUG_INmain(){ unsigned in...
阅读全文
摘要:时间限制1000 ms内存限制65536 KB题目描述给出N个数,求出这N个数中最大值和次大值。注意这里的次大值必须严格小于最大值。输入保证N个数中至少存在两个不同的数。输入格式第一行为测试数据的组数T(T≤20)。请注意,任意两组测试数据之间是相互独立的。每组数据包括两行:第一行为一个整数N(1≤...
阅读全文
摘要:时间限制1000 ms内存限制65536 KB题目描述请你计算出第X年Y月Z日是第X年的第几天。其中,1月1日是第一天,1月2日是第二天,以此类推。计算时请注意闰年的影响。对于非整百年,年数能整除4是闰年,否则不是闰年;对于整百年,年数能整除400是闰年,否则不是闰年。如1900年和1901年不是闰...
阅读全文
摘要:时间限制1000 ms内存限制65536 KB题目描述Given points on a 2D plane, judge whether there're three points that locate on the same line.输入格式The number of test casesT(...
阅读全文
摘要:时间限制 1000 ms 内存限制 65536 KB 题目描述 Given an array with N integers where all elements appear three times except for one. Find out the one which appears on
阅读全文
摘要:时间限制1000 ms内存限制65536 KB题目描述Calculate the sum of two given integersAandB.输入格式The input consists of a line withAandB.(−10^4≤A,B≤10^4).输出格式Output the onl...
阅读全文
摘要:转载自http://blog.csdn.net/nicky_zs/article/details/4053146优先级操作符描述例子结合性1()[]->.::++--调节优先级的括号操作符数组下标访问操作符通过指向对象的指针访问成员的操作符通过对象本身访问成员的操作符作用域操作符后置自增操作符后置自...
阅读全文

浙公网安备 33010602011771号