上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 29 下一页
摘要: 1 # include 2 # include 3 # include 4 using namespace std; 5 int main(int argc,const char *argv[]) 6 { 7 /*-----------------------------*/ 8 //插入元素 9 //dequed; 10 //d.push_back(1); 11 //d.push_back(2); 12 //d.push_back(3); 13 //coutd; 18 //d.push_back(1); 19... 阅读全文
posted @ 2013-12-06 20:53 天天AC 阅读(136) 评论(0) 推荐(0)
摘要: 1 # include 2 # include 3 # include 4 using namespace std; 5 int main(int argc,const char *argv[]) 6 { 7 /*-----------------------------------*/ 8 //multimap对象创建,元素插入 9 //multimap m;10 // m.insert(pair("Jack",300.5));11 // m.insert(pair("Kity",200));12 //m.insert(pair("kity& 阅读全文
posted @ 2013-12-06 20:51 天天AC 阅读(159) 评论(0) 推荐(0)
摘要: 1 import java.util.Scanner; 2 3 public class ArrayTest { 4 5 public static void main(String[] args) { 6 int n, m; 7 Scanner cin = new Scanner(System.in); 8 n = cin.nextInt(); 9 m = cin.nextInt();10 toBin(n);11 toHex(m);12 }13 14 public s... 阅读全文
posted @ 2013-12-05 19:16 天天AC 阅读(325) 评论(0) 推荐(0)
摘要: 1 # include 2 # include 3 # include 4 using namespace std; 5 int main(int argc,const char *argv[]) 6 { 7 /*-------------------------------------------*/ 8 //multiset中插入数据 9 //multisetms;10 //ms.insert("abc");11 // ms.insert("123");12 //ms.insert("111");13 //ms.insert(&q 阅读全文
posted @ 2013-12-05 18:51 天天AC 阅读(161) 评论(0) 推荐(0)
摘要: 1 # include 2 # include 3 # include 4 using namespace std; 5 struct myComp 6 { 7 bool operator()(const int &a, const int &b) 8 { 9 if(a!=b) 10 { 11 return a>b; 12 } 13 else 14 { 15 return a>b; 16 } 17 } 18 ... 阅读全文
posted @ 2013-12-05 18:49 天天AC 阅读(205) 评论(0) 推荐(0)
摘要: 1 # include 2 # include 3 # include 4 using namespace std; 5 struct myComp 6 { 7 bool operator()(const int &a,const int &b) 8 { 9 if(a!=b) 10 return a>b; 11 else 12 return as; 29 //s.insert(8); 30 //s.insert(1); 31 //s.insert(12);... 阅读全文
posted @ 2013-12-05 18:48 天天AC 阅读(163) 评论(0) 推荐(0)
摘要: 1 # include 2 # include 3 # include 4 # include 5 # include 6 # include 7 using namespace std; 8 int main(int argc,const char *argv[]) 9 { 10 /*------------------------------------------*/ 11 //length 12 //string s; 13 //s = "abc123456"; 14 //cout 21 //string s; 22 ... 阅读全文
posted @ 2013-12-03 17:24 天天AC 阅读(218) 评论(0) 推荐(0)
摘要: 1 # include 2 # include 3 # include 4 # include 5 using namespace std; 6 int main(int argc, const char * argv[]) 7 { 8 //vector容器的定义三种 9 //(1) vectorv 10 //(2) vectorv(3)用来存储3的double型的容器 11 //(3) vector(10,8.7)用来存储10个装有8.7的容器 12 13 //vectorv(3);//其中的3为元素的个数 14 /... 阅读全文
posted @ 2013-12-03 16:00 天天AC 阅读(206) 评论(0) 推荐(0)
摘要: (1)常规的大星********************上面的java程序为 1 public class daxing { 2 3 public static void main(String[] args) { 4 5 for (int i = 0; i < 5; i++) { 6 for (int j = 0; j < 5; j++) { 7 System.out.print("*"); 8 } 9 System.out.println();10 ... 阅读全文
posted @ 2013-12-01 19:36 天天AC 阅读(582) 评论(0) 推荐(0)
摘要: (1)for(int i = 0;i < n;i++)for中定义的 i 用完后就会释放,不会浪费内存(2)int y = 10; while(y < 10){ cout<<y<<endl; y--; }其中的y用完后还会在内存中占用内存 阅读全文
posted @ 2013-12-01 17:44 天天AC 阅读(228) 评论(0) 推荐(0)
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 29 下一页