摘要:
1 #include 2 #include 3 #include 4 using namespace std; 5 6 class Rational 7 { 8 public: 9 Rational(); 10 Rational(long numerator, long denominator); 11 long getNumerator()... 阅读全文
posted @ 2016-10-22 14:04
任我主宰
阅读(159)
评论(0)
推荐(0)
摘要:
1 #include 2 #include 3 #include 4 using namespace std; 5 int main() 6 { 7 int t; 8 cin>>t; 9 int a = t; 10 getchar(); 11 while(t--){ 12 string s; 13 int n; 14 cin>>n; 15 getcha... 阅读全文
posted @ 2016-10-22 13:55
任我主宰
阅读(136)
评论(0)
推荐(0)
摘要:
1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 class player{ 7 public: 8 char manplay(int a); 9 char computerplay(int a); 10 int a; 11 char s[3][3]... 阅读全文
posted @ 2016-10-22 13:55
任我主宰
阅读(129)
评论(0)
推荐(0)
摘要:
1 #include 2 using namespace std; 3 int main(){ 4 long long a,b; 5 long long d,e; 6 while(cin>>a>>b){ 7 d=a;e=b; 8 int c; 9 if(a<b){ 10 long long t; 11 t=a; 12 a=b; 13 b... 阅读全文
posted @ 2016-10-22 13:54
任我主宰
阅读(154)
评论(0)
推荐(0)
摘要:
1 #include 2 #include 3 using namespace std; 4 int main() 5 { 6 string x, y, z; 7 cin >> x >> y >> z; 8 9 ifstream file1(x.c_str()); 10 ifstream file2(y.c_str()); 11 ofstream file3(... 阅读全文
posted @ 2016-10-22 13:52
任我主宰
阅读(161)
评论(0)
推荐(0)
摘要:
1 #include 2 #include 3 #include 4 using namespace std; 5 template 6 class Array 7 { 8 public: 9 Array(); 10 ~Array(); 11 bool empty(); 12 void push... 阅读全文
posted @ 2016-10-22 13:52
任我主宰
阅读(142)
评论(0)
推荐(0)
摘要:
1 #include 2 #include 3 using namespace std; 4 class Bank 5 { 6 public: 7 Bank(string _name) 8 { 9 name = _name; 10 } 11 string getName() const 12 { 13 return name; 14... 阅读全文
posted @ 2016-10-22 13:51
任我主宰
阅读(124)
评论(0)
推荐(0)
摘要:
1 #include 2 #include 3 /* 4 usingnamespacestd; 5 6 structNode 7 { 8 int data;//数据域 9 struct Node*next;//指针域 10 }; 11 12 /* 13 Create 14 *函数功能:创建链表. 15 *输入:各节点的data ... 阅读全文
posted @ 2016-10-22 13:50
任我主宰
阅读(154)
评论(0)
推荐(0)
摘要:
1 #include 2 #include 3 using namespace std; 4 int main(){ 5 int n; 6 cin>>n; 7 while(n--){ 8 int t; 9 cin>>t; 10 int points=0; 11 while(t--){ 12 int a,b; 13 cin>>a>>b; 14 ... 阅读全文
posted @ 2016-10-22 13:49
任我主宰
阅读(264)
评论(0)
推荐(0)
摘要:
1 #include 2 #include 3 using namespace std; 4 int main() 5 { 6 int n; 7 cin>>n; 8 if(n==1) { 9 cout<<2<<endl; 10 return 0; 11 } 12 n=n-1; 13 int t=3; 14 while... 阅读全文
posted @ 2016-10-22 13:48
任我主宰
阅读(142)
评论(0)
推荐(0)
摘要:
1 #include 2 #include 3 using namespace std; 4 int main(){ 5 int a,b,c; 6 cin>>a>>b>>c; 7 long long sum=1; 8 for(int i=1;i<=b;i++){ 9 sum = sum*a%c; 10 } 11 cout<<sum%c<<endl; 12 re... 阅读全文
posted @ 2016-10-22 13:47
任我主宰
阅读(121)
评论(0)
推荐(0)
摘要:
1 #include 2 using namespace std; 3 int main() 4 { 5 int i,j; 6 cin>>i>>j; 7 int max=0; 8 for(int t=i;tmax) max=len; 22 } 23 cout<<max<<endl; 24 return 0; 25 } 阅读全文
posted @ 2016-10-22 13:46
任我主宰
阅读(257)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;int main(){ int n; while(cin>>n&&n!=0&&n<=4){ int t; int max=0; for(int i=0;i<n;i++){ cin>>t; if(t>max) max=t; } 阅读全文
posted @ 2016-10-22 13:45
任我主宰
阅读(164)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;int main(){ struct student{ string studentname; int qimograde; int banjigrade; char xuesgb; char xibxs; int lunw 阅读全文
posted @ 2016-10-22 13:44
任我主宰
阅读(156)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;int main(){ int ts; cin>>ts; for(int i=0;i<ts-1;i++){ int n,a,b; while(cin>>n){ int sum = 0; while(n--){ int t; 阅读全文
posted @ 2016-10-22 13:43
任我主宰
阅读(154)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;int root(int s){ if(s<10){ return s; } else{ int a=s; int b=0; while(a!=0){ b+=a%10; a=a/10; } root(b); }}int ma 阅读全文
posted @ 2016-10-22 13:42
任我主宰
阅读(99)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;int main(){ int n; while(cin>>n&&n!=0){ int t; int t0=0; int sum=0; while(n--){ cin>>t; if(t>t0) sum += (t-t0)*6 阅读全文
posted @ 2016-10-22 13:41
任我主宰
阅读(113)
评论(0)
推荐(0)
摘要:
#include<iostream>#include<iomanip>#include<set>#include<vector>#include<algorithm>using namespace std;class SetOperation { public: // Add any codes y 阅读全文
posted @ 2016-10-22 13:40
任我主宰
阅读(161)
评论(0)
推荐(0)
摘要:
#include<iostream>#include<string>#include<cstring>using namespace std;class String { public: String(); // str = "" String(const char*); // str = "abc 阅读全文
posted @ 2016-10-22 13:38
任我主宰
阅读(181)
评论(0)
推荐(0)
摘要:
#include <iostream>#include <vector>#include <algorithm>using namespace std; class Student{ public: Student(string _name, int _score) { name = _name; 阅读全文
posted @ 2016-10-22 13:37
任我主宰
阅读(161)
评论(0)
推荐(0)
摘要:
#include "Board.h" Board::Board(){ size = 10; s = new char[9]; set(); //对于棋盘的初始化 } char Board::getS(int i){ return s[i];} int Board::getSize(){ return 阅读全文
posted @ 2016-10-22 13:35
任我主宰
阅读(558)
评论(0)
推荐(0)
摘要:
#include<iostream>#include<cmath>using namespace std; class MyPoint { private: double x, y; public: // The no-arg constructor that contruccts a point 阅读全文
posted @ 2016-10-22 13:23
任我主宰
阅读(251)
评论(0)
推荐(0)
摘要:
#include<iostream>#include<string>using namespace std; class Elements{ private: int value; static int numberOfObjects; public: Elements(); Elements(co 阅读全文
posted @ 2016-10-22 13:22
任我主宰
阅读(166)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <iomanip> #include <cmath> using namespace std; //your code will be hereclass Land { public: Land() : price_(0) {} explic 阅读全文
posted @ 2016-10-22 13:22
任我主宰
阅读(123)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <iomanip> #include <cmath> using namespace std; //your code will be hereclass Land { public: Land() : price_(0) {} explic 阅读全文
posted @ 2016-10-22 13:21
任我主宰
阅读(117)
评论(0)
推荐(0)
摘要:
#include<iostream> using namespace std; class Complex //复数类 { public: Complex(double real = 0, double imag = 0); Complex operator+(Complex& com); Comp 阅读全文
posted @ 2016-10-22 13:20
任我主宰
阅读(160)
评论(0)
推荐(0)
摘要:
#include<iostream>#include<sstream>#include<iomanip>using namespace std;int main(){ int integer; string str; double doulb; while(cin>>str){ stringstre 阅读全文
posted @ 2016-10-22 13:16
任我主宰
阅读(106)
评论(0)
推荐(0)
摘要:
#include <iostream>#include <list> using namespace std; int main(){ int n; while(cin >> n) { list <int> num; while(n--) { string s; cin >> s; if(s == 阅读全文
posted @ 2016-10-22 13:13
任我主宰
阅读(116)
评论(0)
推荐(0)
摘要:
#include<iostream>#include<sstream>#include<cstring>using namespace std;int main(){ char s[1000]; string str; int count = 0; int count1 = 0; cin.get(s 阅读全文
posted @ 2016-10-22 13:12
任我主宰
阅读(115)
评论(0)
推荐(0)
摘要:
#include<iostream>#include<cmath>using namespace std; class Point{ private: double x,y; public: Point(); Point(double xv,double yv); Point(Point& pt); 阅读全文
posted @ 2016-10-22 13:10
任我主宰
阅读(233)
评论(0)
推荐(0)
摘要:
#include<iostream> #include<string> #include<string.h> using namespace std; char message[20][200]; int main() { string msg; int col; while(cin>>col&&c 阅读全文
posted @ 2016-10-22 13:08
任我主宰
阅读(151)
评论(0)
推荐(0)
浙公网安备 33010602011771号