青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

tianxuyuan

置頂隨筆 #

[置頂]自學class 可是做半天的題目 電腦上數據答案對了 提交是不對的 〔內附題目 我的答案〕

怎么這樣這樣?
下面是提交后的顯示:
編譯失敗...|錯誤號:1

MyProger\Prog69647.cpp:24: error: expected `;' before '(' token
MyProger\Prog69647.cpp:27: error: expected `;' before "int"
MyProger\Prog69647.cpp: In function `int main()':
MyProger\Prog69647.cpp:59: error: 'class Student' has no member named 'add'

高手們大俠們救命阿!
//=====================
#include<iostream>
#include<iomanip>
using namespace std;
//---------------------------------------------
class Student{
 string name;
  int mark;
   int classmark;
    char isganbu;
    char isxibu;
    int lw;
    int jxj;
public :
 void set(string na, int ma, int cl, char isga,char isxi,int l, int jx){
   name=na;mark=ma;classmark=cl;isganbu=isga;isxibu=isxi;lw=l;jxj=jx;
  }
 bool isys();
 bool isws();
 bool iscj();
 bool isxb();
 bool isbj();

 void  sumjxj(){
  if(isys()) jxj+=8000;
  if(isws()) jxj+=4000;
  if(iscj()) jxj+=2000;
  if(isxb()) jxj+=1000;
  if(isbj()) jxj+= 850;
  }
 int add(& sum){
  sum=sum+jxj ;
 }
 int  mmax(string & name1,int & jxj1){
  if(jxj>jxj1){ name1=name;jxj1=jxj ;}
    }
};
//-------------------------------------
 bool Student::isys(){
  return (mark>80&&lw>0);
  }
  bool Student::isws(){
   return (mark>85&&classmark>80 );
  }
  bool Student::iscj(){
   return (mark>90);
   }
  bool Student::isxb(){
   return (mark>85&&isxibu=='Y');
   }
  bool Student::isbj(){
   return (classmark>80&&isganbu=='Y');
   }
//---------------------------------------
int main(){
 string name1=" "; int jxj1=0; int sum=0;
 int n; cin>>n;
 for(;n;n--){
  Student x;
  string na; int ma; int cl; char isga;char isxi;int l; int jx=0;
  cin>>na>>ma>>cl>>isga>>isxi>>l;
  //jx=0;
  x.set(na,ma,cl,isga,isxi,l,jx);
  x.sumjxj();

  x.add(sum);
  x.mmax(name1,jxj1);

  }
 cout<<name1<<'\n';
 cout<<jxj1<<'\n';
 cout<<sum<<'\n';
  }

描述 Description
    某校的慣例是在每學期的期末考試之后發放獎學金。發放的獎學金共有五種,獲取的條件各自不同:

  1)  院士獎學金,每人8000元,期末平均成績高于80分(>80),并且在本學期內發表1篇或1篇以上論文的學生均可獲得;

  2)  五四獎學金,每人4000元,期末平均成績高于85分(>85),并且班級評議成績高于80分(>80)的學生均可獲得;

  3)  成績優秀獎,每人2000元,期末平均成績高于90分(>90)的學生均可獲得;

  4)  西部獎學金,每人1000元,期末平均成績高于85分(>85)的西部省份學生均可獲得;

  5)  班級貢獻獎,每人850元,班級評議成績高于80分(>80)的學生干部均可獲得;

  只要符合條件就可以得獎,每項獎學金的獲獎人數沒有限制,每名學生也可以同時獲得多項獎學金。例如姚林的期末平均成績是87分,班級評議成績82分,同時他還是一位學生干部,那么他可以同時獲得五四獎學金和班級貢獻獎,獎金總數是4850元。

  現在給出若干學生的相關數據,請計算哪些同學獲得的獎金總數最高(假設總有同學能滿足獲得獎學金的條件)。
輸入格式 Input Format
    輸入的第一行是一個整數N(1 <= N <= 100),表示學生的總數。接下來的N行每行是一位學生的數據,從左向右依次是姓名,期末平均成績,班級評議成績,是否是學生干部,是否是西部省份學生,以及發表的論文數。姓名是由大小寫英文字母組成的長度不超過20的字符串(不含空格);期末平均成績和班級評議成績都是0到100之間的整數(包括0和100);是否是學生干部和是否是西部省份學生分別用一個字符表示,Y表示是,N表示不是;發表的論文數是0到10的整數(包括0和10)。每兩個相鄰數據項之間用一個空格分隔。
輸出格式 Output Format
    輸出包括三行,第一行是獲得最多獎金的學生的姓名,第二行是這名學生獲得的獎金總數。如果有兩位或兩位以上的學生獲得的獎金最多,輸出他們之中在輸入文件中出現最早的學生的姓名。第三行是這N個學生獲得的獎學金的總數。

in
4
YaoLin 87 82 Y N 0
ChenRuiyi 88 78 N Y 1
LiXin 92 88 N N 0
ZhangQin 83 87 Y N 1
out
ChenRuiyi
9000
28700

posted @ 2007-08-16 23:01 田旭園 閱讀(690) | 評論 (5)編輯 收藏

[置頂]放假在家 學習類 今天編了日期簡單處理的

//===========================
#include<iostream>
#include<iomanip>
//========================
using namespace std;
class Date{
 int year,month,day;
public:
 bool isleapyear(){
   return(year%4==0&&year%100!=0)||(year%400==0);
   }
 void print(){
  cout<<setfill('0');
  cout<<setw(4)<<year<<'-'<<setw(2)<<month<<'-'<<setw(2)<<day<<'\n';
  cout<<setfill(' ');
  }
  void set(int y,int m,int d){
   year=y;  month=m; day=d;
  }
 };
//--------------------------
int main(){
 Date kk;
 int n;cin>>n;
 for(int i=1;i<=n;i++){
    int y;int m;int d;
     cin>>y>>m>>d;                                   //  kk.set(1000,8,16);
     kk.set(y,m,d);
    if(kk.isleapyear()) kk.print();
     else cout<<"notleap\n";
  }
 cout<<"over"<<'\n';
}
//--------------------------

想用類做8個排序算法 有點沒有頭緒阿

posted @ 2007-08-16 11:15 田旭園 閱讀(340) | 評論 (1)編輯 收藏

[置頂]待做

Sorting by Swapping
Time Limit:1000MS  Memory Limit:10000K
Total Submit:2515 Accepted:1374

Description
Given a permutation of numbers from 1 to n, we can always get the sequence 1, 2, 3, ..., n by swapping pairs of numbers. For example, if the initial sequence is 2, 3, 5, 4, 1, we can sort them in the following way:

2 3 5 4 1
1 3 5 4 2
1 3 2 4 5
1 2 3 4 5

Here three swaps have been used. The problem is, given a specific permutation, how many swaps we needs to take at least.


Input
The first line contains a single integer t (1 <= t <= 20) that indicates the number of test cases. Then follow the t cases. Each case contains two lines. The first line contains the integer n (1 <= n <= 10000), and the second line gives the initial permutation.

Output
For each test case, the output will be only one integer, which is the least number of swaps needed to get the sequence 1, 2, 3, ..., n from the initial permutation.

Sample Input


2
3
1 2 3
5
2 3 5 4 1

Sample Output


0
3

posted @ 2007-05-05 11:17 田旭園 閱讀(634) | 評論 (1)編輯 收藏

2007年8月16日 #

自學class 可是做半天的題目 電腦上數據答案對了 提交是不對的 〔內附題目 我的答案〕

怎么這樣這樣?
下面是提交后的顯示:
編譯失敗...|錯誤號:1

MyProger\Prog69647.cpp:24: error: expected `;' before '(' token
MyProger\Prog69647.cpp:27: error: expected `;' before "int"
MyProger\Prog69647.cpp: In function `int main()':
MyProger\Prog69647.cpp:59: error: 'class Student' has no member named 'add'

高手們大俠們救命阿!
//=====================
#include<iostream>
#include<iomanip>
using namespace std;
//---------------------------------------------
class Student{
 string name;
  int mark;
   int classmark;
    char isganbu;
    char isxibu;
    int lw;
    int jxj;
public :
 void set(string na, int ma, int cl, char isga,char isxi,int l, int jx){
   name=na;mark=ma;classmark=cl;isganbu=isga;isxibu=isxi;lw=l;jxj=jx;
  }
 bool isys();
 bool isws();
 bool iscj();
 bool isxb();
 bool isbj();

 void  sumjxj(){
  if(isys()) jxj+=8000;
  if(isws()) jxj+=4000;
  if(iscj()) jxj+=2000;
  if(isxb()) jxj+=1000;
  if(isbj()) jxj+= 850;
  }
 int add(& sum){
  sum=sum+jxj ;
 }
 int  mmax(string & name1,int & jxj1){
  if(jxj>jxj1){ name1=name;jxj1=jxj ;}
    }
};
//-------------------------------------
 bool Student::isys(){
  return (mark>80&&lw>0);
  }
  bool Student::isws(){
   return (mark>85&&classmark>80 );
  }
  bool Student::iscj(){
   return (mark>90);
   }
  bool Student::isxb(){
   return (mark>85&&isxibu=='Y');
   }
  bool Student::isbj(){
   return (classmark>80&&isganbu=='Y');
   }
//---------------------------------------
int main(){
 string name1=" "; int jxj1=0; int sum=0;
 int n; cin>>n;
 for(;n;n--){
  Student x;
  string na; int ma; int cl; char isga;char isxi;int l; int jx=0;
  cin>>na>>ma>>cl>>isga>>isxi>>l;
  //jx=0;
  x.set(na,ma,cl,isga,isxi,l,jx);
  x.sumjxj();

  x.add(sum);
  x.mmax(name1,jxj1);

  }
 cout<<name1<<'\n';
 cout<<jxj1<<'\n';
 cout<<sum<<'\n';
  }

描述 Description
    某校的慣例是在每學期的期末考試之后發放獎學金。發放的獎學金共有五種,獲取的條件各自不同:

  1)  院士獎學金,每人8000元,期末平均成績高于80分(>80),并且在本學期內發表1篇或1篇以上論文的學生均可獲得;

  2)  五四獎學金,每人4000元,期末平均成績高于85分(>85),并且班級評議成績高于80分(>80)的學生均可獲得;

  3)  成績優秀獎,每人2000元,期末平均成績高于90分(>90)的學生均可獲得;

  4)  西部獎學金,每人1000元,期末平均成績高于85分(>85)的西部省份學生均可獲得;

  5)  班級貢獻獎,每人850元,班級評議成績高于80分(>80)的學生干部均可獲得;

  只要符合條件就可以得獎,每項獎學金的獲獎人數沒有限制,每名學生也可以同時獲得多項獎學金。例如姚林的期末平均成績是87分,班級評議成績82分,同時他還是一位學生干部,那么他可以同時獲得五四獎學金和班級貢獻獎,獎金總數是4850元。

  現在給出若干學生的相關數據,請計算哪些同學獲得的獎金總數最高(假設總有同學能滿足獲得獎學金的條件)。
輸入格式 Input Format
    輸入的第一行是一個整數N(1 <= N <= 100),表示學生的總數。接下來的N行每行是一位學生的數據,從左向右依次是姓名,期末平均成績,班級評議成績,是否是學生干部,是否是西部省份學生,以及發表的論文數。姓名是由大小寫英文字母組成的長度不超過20的字符串(不含空格);期末平均成績和班級評議成績都是0到100之間的整數(包括0和100);是否是學生干部和是否是西部省份學生分別用一個字符表示,Y表示是,N表示不是;發表的論文數是0到10的整數(包括0和10)。每兩個相鄰數據項之間用一個空格分隔。
輸出格式 Output Format
    輸出包括三行,第一行是獲得最多獎金的學生的姓名,第二行是這名學生獲得的獎金總數。如果有兩位或兩位以上的學生獲得的獎金最多,輸出他們之中在輸入文件中出現最早的學生的姓名。第三行是這N個學生獲得的獎學金的總數。

in
4
YaoLin 87 82 Y N 0
ChenRuiyi 88 78 N Y 1
LiXin 92 88 N N 0
ZhangQin 83 87 Y N 1
out
ChenRuiyi
9000
28700

posted @ 2007-08-16 23:01 田旭園 閱讀(690) | 評論 (5)編輯 收藏

放假在家 學習類 今天編了日期簡單處理的

//===========================
#include<iostream>
#include<iomanip>
//========================
using namespace std;
class Date{
 int year,month,day;
public:
 bool isleapyear(){
   return(year%4==0&&year%100!=0)||(year%400==0);
   }
 void print(){
  cout<<setfill('0');
  cout<<setw(4)<<year<<'-'<<setw(2)<<month<<'-'<<setw(2)<<day<<'\n';
  cout<<setfill(' ');
  }
  void set(int y,int m,int d){
   year=y;  month=m; day=d;
  }
 };
//--------------------------
int main(){
 Date kk;
 int n;cin>>n;
 for(int i=1;i<=n;i++){
    int y;int m;int d;
     cin>>y>>m>>d;                                   //  kk.set(1000,8,16);
     kk.set(y,m,d);
    if(kk.isleapyear()) kk.print();
     else cout<<"notleap\n";
  }
 cout<<"over"<<'\n';
}
//--------------------------

想用類做8個排序算法 有點沒有頭緒阿

posted @ 2007-08-16 11:15 田旭園 閱讀(340) | 評論 (1)編輯 收藏

2007年5月22日 #

剛作好的 叫DNA 想用取余的做可是做不出來 高人幫忙~~

Input:

輸入包含多組測試數據。第一個整數N(N<=15),N表示組數,每組數據包含兩個整數a,b。a表示一個單位的DNA串的行數,a為奇數且 3<=a<=39。b表示重復度(1<=b<=20)。

Output:

輸出DNA的形狀,每組輸出間有一空行。

Sample Input:

2
3 1
5 4

Sample Output:

X X
X
X X
X   X
X X
X
X X
X   X
X X
X
X X
X   X
X X
X
X X
X   X
X X
X
X X
X   X



#include<iostream>
#include<string>
using namespace std;
int main()
{

int n; cin>>n;
int m=1;
for(int a,b;n&&cin>>a>>b;n--)
{ cout<<(m==1?"":"\n");

 for(int i=1;i<=b;i++)
  {for(int j=1;j<=a/2;j++)
  {
   cout<<string(j-1,' ');
   cout<<'X';
   cout<<string(a-2*(j-1)-2,' ');
   cout<<'X'<<'\n';
   }
    cout<<string(a/2,' ');
    cout<<'X'<<'\n';
    for(int i=a/2;i>1;i--)
    { cout<<string(i-1,' ');
      cout<<'X';
   cout<<string(a-2*(i-1)-2,' ');
   cout<<'X'<<'\n';
   }
   }
  cout<<'X';cout<<string(a-2,' ');
  cout<<'X'<<'\n';


  m++;
  }

  }

posted @ 2007-05-22 18:30 田旭園 閱讀(492) | 評論 (0)編輯 收藏

2007年5月6日 #

I wish

#include<stdio.h>
void main()
{
  int day;
  for(day=1;day<=365;day++)
      printf("I wish you happy everyday!\n");
}

posted @ 2007-05-06 14:26 田旭園 閱讀(647) | 評論 (2)編輯 收藏

2007年5月5日 #

StrInt + - * /(整除) % (取模)

/ StrInt + - * /(整除) % (取模)
//=====================================
#ifndef STRINT_HEADER
#define STRINT_HEADER
#include<iostream>
using namespace std;
//-------------------------------------
class StrInt{
  enum { BYTENUM = 200 };
  string _sign;
  string _num;
public:
  StrInt(const string& a = string("0") );
  StrInt(const string& sign, const string& num);
  friend StrInt mul( const StrInt& a, const StrInt& b );
  friend StrInt add( const StrInt& a, const StrInt& b );
  friend StrInt sub( const StrInt& a, const StrInt& b );
  friend StrInt div( const StrInt& a, const StrInt& b );
  friend StrInt mod( const StrInt& a, const StrInt& b );
  friend istream& operator>>(istream& in, StrInt& a);
  friend ostream& operator<<(ostream& out, const StrInt& a);
};//-----------------------------------
#endif   // STRINT_HEADER

posted @ 2007-05-05 11:20 田旭園 閱讀(1560) | 評論 (0)編輯 收藏

待做

Sorting by Swapping
Time Limit:1000MS  Memory Limit:10000K
Total Submit:2515 Accepted:1374

Description
Given a permutation of numbers from 1 to n, we can always get the sequence 1, 2, 3, ..., n by swapping pairs of numbers. For example, if the initial sequence is 2, 3, 5, 4, 1, we can sort them in the following way:

2 3 5 4 1
1 3 5 4 2
1 3 2 4 5
1 2 3 4 5

Here three swaps have been used. The problem is, given a specific permutation, how many swaps we needs to take at least.


Input
The first line contains a single integer t (1 <= t <= 20) that indicates the number of test cases. Then follow the t cases. Each case contains two lines. The first line contains the integer n (1 <= n <= 10000), and the second line gives the initial permutation.

Output
For each test case, the output will be only one integer, which is the least number of swaps needed to get the sequence 1, 2, 3, ..., n from the initial permutation.

Sample Input


2
3
1 2 3
5
2 3 5 4 1

Sample Output


0
3

posted @ 2007-05-05 11:17 田旭園 閱讀(634) | 評論 (1)編輯 收藏

僅列出標題  
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            午夜精品久久久久影视| 欧美先锋影音| 欧美激情精品久久久久久大尺度| 国产人成精品一区二区三| 香蕉亚洲视频| 亚洲国产小视频| 亚洲精品在线观看免费| 亚洲国产精品久久久| 久久亚洲午夜电影| 久久美女性网| 欧美中文字幕久久| 国产精品99免费看| 香蕉亚洲视频| 欧美一区二区三区免费在线看| 国产精品扒开腿爽爽爽视频| 亚洲国产婷婷香蕉久久久久久99| 亚洲国产三级在线| 欧美成人高清视频| 欧美一区二区三区免费大片| 国产精品久久久久久久久| 99国产精品久久久久老师| 久久免费视频在线观看| 久久久久国产精品一区三寸| 国产精品久久综合| 激情婷婷久久| 在线观看亚洲一区| 美女日韩欧美| 亚洲国产一区二区三区青草影视| 欧美无砖砖区免费| 亚洲自拍偷拍网址| 久久久久国产精品www| 美女久久网站| 国产曰批免费观看久久久| 亚洲激情黄色| 在线免费观看欧美| 久久精品亚洲乱码伦伦中文| 亚洲欧美www| 亚洲国产午夜| 99riav国产精品| 亚洲国产美女精品久久久久∴| 亚洲韩国青草视频| 欧美视频福利| 欧美一区二区三区免费看| 蜜桃伊人久久| 国产精品福利影院| 欧美v国产在线一区二区三区| 国产精品爽黄69| 久久久久久久性| 亚洲精品欧洲| 久久精品夜色噜噜亚洲aⅴ| 久久综合久久美利坚合众国| 久久久久国产精品厨房| 国外视频精品毛片| 91久久国产综合久久蜜月精品| 欧美精品日韩| 欧美综合国产| 欧美精品手机在线| 久久不射2019中文字幕| 你懂的视频欧美| 亚洲欧美中文日韩在线| 久久精品国产2020观看福利| 亚洲人久久久| 欧美一级午夜免费电影| 亚洲毛片av| 欧美一级艳片视频免费观看| 亚洲经典自拍| 亚洲——在线| 一本大道av伊人久久综合| 欧美一区二区三区男人的天堂| 最新国产成人av网站网址麻豆| 在线视频中文亚洲| 亚洲国产日韩欧美在线图片| 亚洲视频在线播放| 亚洲国产日韩欧美| 亚洲一区欧美激情| 91久久精品视频| 欧美一区日本一区韩国一区| 日韩一级裸体免费视频| 久久人91精品久久久久久不卡| 亚洲天堂网站在线观看视频| 久久不射中文字幕| 亚洲欧美中文字幕| 欧美国产欧美亚洲国产日韩mv天天看完整| 欧美一区久久| 一区二区国产精品| 黄色亚洲在线| 一二三区精品| 一区二区三区欧美在线观看| 久久精品免费观看| 午夜亚洲福利| 欧美日韩国产片| 亚洲人成在线观看网站高清| 国内精品久久久久久久影视麻豆| 日韩一区二区高清| 日韩视频在线免费| 美日韩精品免费观看视频| 另类尿喷潮videofree| 国产偷久久久精品专区| 亚洲婷婷在线| 亚洲在线播放电影| 欧美性猛交xxxx免费看久久久| 日韩一区二区精品| 亚洲一级影院| 日韩亚洲国产精品| 中文亚洲字幕| 欧美国产日韩a欧美在线观看| 久久字幕精品一区| 亚洲动漫精品| 久久综合九色综合欧美就去吻| 蜜臀91精品一区二区三区| 亚洲第一偷拍| 亚洲一区二区三区午夜| 国产精品久线观看视频| 狂野欧美激情性xxxx欧美| 国产欧美日韩三级| 亚洲一区二区在线观看视频| 午夜在线视频观看日韩17c| 国产精品免费在线| 国产精品99久久久久久宅男 | 亚洲综合精品| 欧美日韩国产专区| 一本久久综合| 性欧美长视频| 国产一区免费视频| 欧美成人一区二区三区| 亚洲精品中文在线| 亚洲欧美日韩在线综合| 国产欧美在线看| 欧美一区日韩一区| 欧美承认网站| 亚洲小说春色综合另类电影| 国产精品免费一区二区三区观看| 日韩一级精品| 久久精品30| 亚洲第一区在线| 欧美日韩一区二区在线观看视频| 午夜精品久久久久影视 | 美女黄色成人网| 夜夜爽夜夜爽精品视频| 国产精品一区二区三区四区 | 欧美黄色免费| 亚洲一区二区三区四区视频| 看片网站欧美日韩| 一区二区三区四区五区在线| 国产美女精品| 欧美激情麻豆| 欧美亚洲免费高清在线观看| 欧美成人在线影院| 欧美一区二区三区精品电影| 亚洲国产精品成人一区二区 | 好吊色欧美一区二区三区四区| 欧美二区不卡| 欧美自拍偷拍午夜视频| 亚洲精品你懂的| 欧美资源在线观看| 日韩午夜在线| 影音先锋久久资源网| 国产精品久久久久久久久婷婷 | 亚洲免费观看视频| 在线观看视频日韩| 国产日韩欧美一区| 欧美日韩a区| 猫咪成人在线观看| 欧美在线播放| 亚洲综合丁香| 亚洲视频欧美视频| 亚洲欧洲午夜| 久久综合电影一区| 欧美一级久久| 亚洲综合国产精品| 亚洲小说春色综合另类电影| 亚洲精品乱码久久久久久按摩观| 国语自产精品视频在线看一大j8| 午夜精品区一区二区三| 国产精品久久久一本精品| 欧美大片在线看免费观看| 久久国产直播| 亚洲男人的天堂在线观看| 一区二区三区免费在线观看| 日韩午夜一区| 一本到高清视频免费精品| 亚洲日本中文| 亚洲美女性视频| 亚洲三级影院| 亚洲精品久久久久久一区二区| 欧美激情亚洲另类| 亚洲电影免费观看高清完整版在线观看 | 国产一区在线播放| 国产亚洲女人久久久久毛片| 国产日韩欧美综合一区| 国产三区二区一区久久| 国产精品系列在线播放| 国产伦精品一区二区三区在线观看 | 亚洲一区二区三区视频播放| 亚洲天堂第二页| 午夜精品99久久免费| 欧美一区二区在线免费观看 | 美女视频网站黄色亚洲| 欧美www视频| 欧美日韩亚洲一区二区|