/*
Modify the temperature conversion program to print the table in reverse order,
that is, from 300 degrees to 0.
*/
#include
/* print Fahrenheit-Celsius table in reverse order */
main()
{
int...
分类:
其他好文 时间:
2015-07-11 20:16:44
阅读次数:
164
#include
using namespace std;
int main(void)
{
int x, y, num1, num2, temp;
printf("请输入两个正整数:\n");
scanf("%d %d", &num1, &num2);
if(num1 < num2)//交换
{
num1^=num2;...
分类:
编程语言 时间:
2015-07-11 20:16:33
阅读次数:
140
1D grid of 1D blocks__device__ int getGlobalIdx_1D_1D(){return blockIdx.x *blockDim.x + threadIdx.x;}1D grid of 2D blocks__device__ int getGlobalIdx_1...
分类:
其他好文 时间:
2015-07-11 20:08:50
阅读次数:
191
.Net语言分值数据类型和引用数据类型值类型:值类型储存在栈上,压栈压栈,先进后出{ int a; //do something { int b; //dosomething }}//深深深
package?com.sunhang;
//:?containers/References.java
//?Demonstrates?Reference?objects
import?java.lang.ref.*;
import?java.util.*;
class?VeryBig?{
????private?static?final?int?SIZ...
分类:
其他好文 时间:
2015-07-11 18:50:45
阅读次数:
163
样例题目来自LintCode, 给出中序遍历:[1,2,3]和前序遍历:[2,1,3]. 返回如下的树: 2
/ 1 3代码实现/**
* Definition of TreeNode:
* class TreeNode {
* public:
* int val;
* TreeNode *left, *right;
* TreeNode(int va...
分类:
其他好文 时间:
2015-07-11 18:39:04
阅读次数:
137
把5张牌看成由5个数字组成的数组。大小王定义为0。
bool IsContinuous(int* numbers, int length)
{
if (numbers == NULL || length
return false;
qsort(numbers, length, sizeof(int), compare);
int numberOfZero = 0;
int ...
分类:
其他好文 时间:
2015-07-11 18:38:04
阅读次数:
235
前言:嵌入式数据库Sqlite基本sql使用摘要。使用测试,与关系数据库mysql在语法上有非常多的类似之处,先准备測试数据:CREATE TABLE COMPANY(ID INT NOT NULL, NAME VARCHAR(20),AGE INT,ADDRESS VARCHAR(20),SALA...
分类:
移动开发 时间:
2015-07-11 18:20:32
阅读次数:
143
称号:给定的一组数字。集数字上升。给定一个数字target,获取数字target放置在集合索引值(同样升序)算法:一个简单的比较public class Solution { public int searchInsert(int[] A, int target) { int ...
分类:
其他好文 时间:
2015-07-11 18:20:24
阅读次数:
111
推广渠道表有ParentID字段,代表上下层级关系。现要统计每个推广员,推广了多少人? 1 --创建表结构,插入测试数据 2 USE DBA_Monitor 3 GO 4 CREATE TABLE [dbo].[TGYinfo]( 5 [TGYID] [int] IDENTITY(1,1) ...
分类:
其他好文 时间:
2015-07-11 18:14:42
阅读次数:
134