//
//copyright(c) 2014软件技术1班
//All rights reserved.
//作者:A36黄阿德
//完成日期:2014年12月3日
//版本号:v1.0
//
//问题描述:创建一个程序来把摄氏度转成华氏度。
//输入描述:一个实数,代表摄氏度
//
using System;
using System.Collections.Generic;
using Syst...
分类:
其他好文 时间:
2014-12-03 21:18:02
阅读次数:
220
class Solution {
public:
double pow(double x,int n)
{
if(n<0)return 1.0/power(x,-n);
return power(x,n);
}
double power(double x, int n) {
if(n == 0) return 1;
double temp =...
分类:
其他好文 时间:
2014-12-03 21:19:09
阅读次数:
103
#include
#include
#include
#include
#include
using namespace std;
/*
*0-1背包问题(递归实现)
*/
//int * * values;//values[i][j]表示在前i个物品中能够装入容量为j的背包中的物品的最大值 (二维数组方案一)
vector> values;//values[i][j]表示在前i个物品中能够装...
分类:
其他好文 时间:
2014-12-03 21:20:05
阅读次数:
166
1.程序入口
// create the application instance
AppDelegate app;
return Application::getInstance()->run();2.主循环
int Application::run():
while(!glview->windowShouldClose())
{
Que...
分类:
其他好文 时间:
2014-12-03 21:18:15
阅读次数:
153
题目大意:给定n个点,一些点之间有电阻相连,求1~n的等效电阻
首先我们设电流为1A 终点电势为零 点i的电势为Ui
由于电流是流 显然对于每个点(点1和点n除外) 有总流入等于总流出 即
Σ(Ui-Uj)/Rij=0 (i!=1,i!=n)
Σ(U1-Uj)/R1j=1
Σ(Un-Uj)/Rnj=-1
Un=0
联立方程组高斯消元即可 最后输出点1的电势就是答案
注意自环要无...
分类:
其他好文 时间:
2014-12-03 21:17:43
阅读次数:
152
1.程序入口
// create the application instance
AppDelegate app;
return Application::getInstance()->run();2.主循环
int Application::run():
while(!glview->windowShouldClose())
{
...
分类:
其他好文 时间:
2014-12-03 21:17:16
阅读次数:
175
又是一个八皇后问题:
Given an integer n, return all distinct solutions to the n-queens puzzle.
Each solution contains a distinct board configuration of the n-queens' placement, where 'Q' and '.' both
...
分类:
其他好文 时间:
2014-12-03 21:17:08
阅读次数:
175
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe...
分类:
其他好文 时间:
2014-12-03 21:16:33
阅读次数:
139
Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig...
分类:
其他好文 时间:
2014-12-03 21:16:44
阅读次数:
172
如何在博客园上面显示自己的头像1、打开你的博客主页:点击【管理】,如图:2、点击【设置】,在如下图的界面里点击【头像设置】3、出现如下图界面后,选择右上角的【我的博客】左边那个选项,我的是【张昺华-sky】4、出现如下图后右键--【查看网页源代码】5、出现下图后,按快捷键【ctrl+f】搜索【use...
分类:
其他好文 时间:
2014-12-03 21:15:11
阅读次数:
231
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t...
分类:
其他好文 时间:
2014-12-03 21:14:43
阅读次数:
202
红寺堡镇漠漠平林一望中,参差新瓦绿映红。古今画手知多少,除却松嵒无此工。注:松嵒,即钱松嵒(1899.9-1985.9),当代画家。是当代中国山水画主要代表人之一。红寺堡农村所见家家新房少妇姑,户户微香无瓦炉。又是一年春事了,杞园麦地笑相呼。
分类:
其他好文 时间:
2014-12-03 21:15:50
阅读次数:
180
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsum =...
分类:
其他好文 时间:
2014-12-03 21:13:33
阅读次数:
182
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ...
分类:
其他好文 时间:
2014-12-03 21:14:01
阅读次数:
198
在 ARM 汇编语言程序里,有一些特殊指令助记符,这些助记符与指令系统的助记符不同,没有相对应的操作码,通常称这些特殊指令助记符为伪指令,他们所完成的操作称为伪操作。伪指令在源程序中的作用是为完成汇编程序作各种准备工作的,这些伪指令仅在汇编过程中起作用,一旦汇编结束,伪指令的使命就完成。 在 ARM...
分类:
其他好文 时间:
2014-12-03 21:14:18
阅读次数:
270
Combination SumCombination Sum Total Accepted: 25850 Total Submissions: 96391 My Submissions Question Solution Given a set of candidate numbers (C) an...
分类:
其他好文 时间:
2014-12-03 21:15:19
阅读次数:
163
Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit ...
分类:
其他好文 时间:
2014-12-03 21:12:18
阅读次数:
188