Time of Update: 2015-05-11
標籤:c c++ java leetcode python Problem:Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should
Time of Update: 2015-05-11
標籤:c++ 最大數 最小數 輸入 //輸入8個數,求出最大值與最小值#include <iostream>using namespace std;int max(int b[],int n),min(int b[],int n);int main(){int a[8];cout<<"輸入8個int型數 :";for(
Time of Update: 2015-05-10
標籤:先看例子: printf("This line has only controlling strings.\n"); `printf(“I am %d years old and %f inch tall”, 21, 132);參數 printf()的參數分為兩大部分,分別是控制字元串和參數列表,二者用逗號隔開,而且參數之間也要用逗號隔開。其中控制字元串是字串常量,如果不需要其他參數的話,雙引號裡面的文字將被原原本本的列印到螢幕。通俗的講,雙引號裡面是什麼,輸出的就是什麼,包括逸出字元。
Time of Update: 2015-05-10
標籤:linux之道 linux調試c程式 linux gdb 一:起因(1)也許我們非常熟悉Windows下的VC6.0 和 CodeBlocks的調試工具 —— 介面化的調試,但是你是否想過你的每一個按鍵或者快速鍵的背後指令是什麼,讓我們一起走進Linux的gcc動態調試工具GDB(2)程式調試無非就是:debug(gcc -g -o target source);設定斷點(b
Time of Update: 2015-05-10
標籤:黑馬程式員------<a href="http://www.itheima.com" target="blank">Java培訓、Android培訓、iOS培訓、.Net培訓</a>、期待與您交流! ------- 關係運算和邏輯運算// 輸入一個字元,如果是大寫字母,則轉換為小寫字母,如果不是則不轉換,輸出最後得到的字元#include <stdio.h>int main(){ char ch;
Time of Update: 2015-05-10
標籤:黑馬程式員------<a href="http://www.itheima.com" target="blank">Java培訓、Android培訓、iOS培訓、.Net培訓</a>、期待與您交流! -------一 函數定義01 函數分為庫函數和自訂函數兩種函數一般格式:函數傳回值類型 函數名(資料類型 參數1, 資料類型
Time of Update: 2015-05-10
標籤:黑馬程式員------<a href="http://www.itheima.com" target="blank">Java培訓、Android培訓、iOS培訓、.Net培訓</a>、期待與您交流! -------六 指標與函數01
Time of Update: 2015-05-09
標籤:c c++ java leetcode python Problem:Given an array S of n integers, are there elements a, b, c in S such
Time of Update: 2015-05-10
標籤:邏輯關係 c++ 物理地址 位置 變數地址 我們平常所求的變數地址這裡是邏輯關係,真實的物理地址中儲存關係不是這樣,即使是相同的邏輯地址也有可能對應不同的物理地址。已初始化的靜態變數和全域變數儲存在資料區段靠近程式碼片段的位置。
Time of Update: 2015-05-10
標籤:c c++ java leetcode python Problem:Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1
Time of Update: 2015-05-10
標籤:(一)厄密多項式Hn(x)的遞迴實現。#include <stdio.h>int hermite(int n,int x){ if(n<=0) { return 1; } else if(n==1) { return 2*x; } else { return 2*x*hermite(n-1,x)-2*(n-1)*hermite(n-2,x); } return
Time of Update: 2015-05-10
標籤:c c++ leetcode java python Problem:Given a string containing just the characters ‘(‘, ‘)‘, ‘{‘, ‘}‘, ‘[‘ and ‘]‘, determine if
Time of Update: 2015-05-10
標籤:1.5 C語言程式的運行過程01 來源程式:由進階語言或組合語言編寫,C語言來源程式的副檔名為.C02 目標程式:來源程式經“編譯器”翻譯所得的二進位代碼為目標程式,其副檔名為.obj03 可執行程式:目標程式與庫函數串連,形成可執行程式,.out#include <stdio.h>int main(){#define PI 3.14 double r,len,area; printf("請輸入半徑:\n");
Time of Update: 2015-05-09
標籤:c++ 運算子多載 重載 operator // 實現運算子的重載#include <iostream>using namespace std;class Int{public:Int(int i = 0) :m(i){cout << "constructed function" << endl;}~
Time of Update: 2015-05-10
標籤: 前幾天因為五一的關係,參加了好幾次同學會,有一些感觸和大家分享,到了我們這個年紀,同學們大多家庭、事業小有成就,對自己會有激勵,在有的同學顯擺自己的車房、電子裝置、身家時,忽然想一個人的成熟應該是慢慢沉靜下來吧。想起古語:安而後能慮的話來
Time of Update: 2015-05-11
標籤:C#中HashTable的用法一,雜湊表(Hashtable)簡述在.NET Framework中,Hashtable是System.Collections命名空間提供的一個容器,用於處理和表現類似keyvalue的索引值對,其中key通常可用來快速尋找,同時key是區分大小寫;value用於儲存對應於key的值。Hashtable中keyvalue索引值對均為object類型,所以Hashtable可以支援任何類型的keyvalue索引值對.二,雜湊表的簡單操作在雜湊表中添加一
Time of Update: 2015-05-10
標籤: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 /* 7 * C# 中 結構 struct 與類 class的部分區別 8 * 9 * 結構中不能聲明無參的建構函式 系統會自動給出無參的建構函式10 * 結構中的可訪問性只能是 public11 *
Time of Update: 2015-05-11
標籤:.net 4.5中新增了async和await這一對用於非同步編程的關鍵字。async放在方法中存在await代碼的方法中,await放在調用返回Task的方法前。 class Class1 { private async void DoSomething() { await Do(); } private Task Do() { return Task.Run((
Time of Update: 2015-05-09
標籤:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Regex{ using System.Text.RegularExpressions;//Regex的命名空間 class Program { static void Main(string[] args)
Time of Update: 2015-05-09
標籤:超級冪 數論 題目大意 以若干行的形式給定若干組a,b,c(你不知道有多少組),輸出若干行,每行代表相應的abmodc的值。其中1≤a,c≤1000000000,1≤b≤101000000評測網址 http://acm.fzu.edu.cn/problem.php?pid=1759題解 資料真的很大。。。。。 不過我們有公式: abmodc=a(bmodφ(c))+φ(c)modc,b≥φ(c); 把它記為(*)式。