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

tianxuyuan

置頂隨筆 #

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

怎么這樣這樣?
下面是提交后的顯示:
編譯失敗...|錯誤號: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
    某校的慣例是在每學期的期末考試之后發(fā)放獎學金。發(fā)放的獎學金共有五種,獲取的條件各自不同:

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

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

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

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

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

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

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

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 田旭園 閱讀(698) | 評論 (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 田旭園 閱讀(349) | 評論 (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 田旭園 閱讀(645) | 評論 (1)編輯 收藏

2007年8月16日 #

自學class 可是做半天的題目 電腦上數(shù)據(jù)答案對了 提交是不對的 〔內(nèi)附題目 我的答案〕

怎么這樣這樣?
下面是提交后的顯示:
編譯失敗...|錯誤號: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
    某校的慣例是在每學期的期末考試之后發(fā)放獎學金。發(fā)放的獎學金共有五種,獲取的條件各自不同:

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

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

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

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

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

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

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

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 田旭園 閱讀(698) | 評論 (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 田旭園 閱讀(349) | 評論 (1)編輯 收藏

2007年5月22日 #

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

Input:

輸入包含多組測試數(shù)據(jù)。第一個整數(shù)N(N<=15),N表示組數(shù),每組數(shù)據(jù)包含兩個整數(shù)a,b。a表示一個單位的DNA串的行數(shù),a為奇數(shù)且 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 田旭園 閱讀(504) | 評論 (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 田旭園 閱讀(653) | 評論 (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 田旭園 閱讀(1567) | 評論 (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 田旭園 閱讀(645) | 評論 (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>
            欧美激情视频一区二区三区在线播放| 国产色产综合色产在线视频| 免费成人黄色| 国产日韩欧美在线播放| 亚洲黄页一区| 日韩视频在线观看国产| 美女精品在线观看| 亚洲另类自拍| 噜噜噜噜噜久久久久久91| 久久久久高清| 亚洲欧美国产日韩天堂区| 黄色小说综合网站| 老鸭窝91久久精品色噜噜导演| 久久亚洲综合色| 亚洲精品视频免费在线观看| 欧美噜噜久久久xxx| 最新国产成人在线观看| 中国日韩欧美久久久久久久久| 欧美日韩国产一区二区三区| 夜夜爽99久久国产综合精品女不卡| 在线一区免费观看| 国产精品盗摄久久久| 亚洲精品欧美日韩专区| 亚洲一区在线免费| 欧美午夜一区二区| 亚洲亚洲精品在线观看| 欧美在线播放| 精品99一区二区| 欧美日韩国产影院| 亚洲欧美日韩另类精品一区二区三区 | 欧美日韩专区在线| 亚洲欧美激情视频| 久久夜色精品国产噜噜av| 亚洲日韩视频| 国产精品久久久久影院色老大| 亚洲欧洲av一区二区| 欧美a级大片| 亚洲精品美女久久7777777| 欧美日韩另类国产亚洲欧美一级| 亚洲大黄网站| 午夜电影亚洲| 亚洲二区在线观看| 欧美婷婷久久| 久久精品道一区二区三区| 欧美二区在线播放| 亚洲综合电影| 亚洲第一久久影院| 国产精品成人一区二区三区夜夜夜 | 亚洲欧美日韩在线一区| 激情自拍一区| 欧美视频日韩| 久久亚洲私人国产精品va媚药| 亚洲日韩中文字幕在线播放| 亚洲精选在线观看| 欧美午夜免费影院| 免费av成人在线| 亚洲影视在线播放| 亚洲国产精品成人综合| 欧美在线视频观看| 一本色道久久综合亚洲精品小说 | 亚洲免费一在线| 亚洲电影下载| 麻豆国产精品777777在线 | 亚洲女性裸体视频| 91久久精品国产91久久性色tv| 国产精品久久久久影院色老大| 久久综合国产精品| 午夜精品一区二区三区四区| 亚洲欧洲一区二区在线观看| 久久一综合视频| 99精品99久久久久久宅男| 国产精品美女久久久浪潮软件| 欧美大片在线影院| 久久乐国产精品| 欧美一级免费视频| 99精品99| 亚洲三级电影全部在线观看高清| 免费成年人欧美视频| 欧美一区二区三区在线免费观看| 一本综合精品| 亚洲美女区一区| 亚洲国产成人高清精品| 韩国欧美国产1区| 国产日产精品一区二区三区四区的观看方式 | 亚洲日本激情| 在线免费观看一区二区三区| 国产精品久久久久av免费| 欧美日韩精品久久| 欧美激情四色 | 久久免费国产| 亚洲专区一区| 亚洲免费视频中文字幕| 亚洲一区二区在线播放| 亚洲一区二区日本| 亚洲制服少妇| 亚洲欧美日本国产有色| 亚洲一区二区三区在线播放| 在线视频精品一| 亚洲精品在线一区二区| 日韩视频在线观看| aa国产精品| 亚洲一级电影| 欧美影院一区| 狂野欧美一区| 欧美大片91| 欧美午夜www高清视频| 国产精品久久久对白| 国产欧美一区二区三区在线看蜜臀 | 国产精品看片资源| 欧美日韩一区二区欧美激情| 欧美体内she精视频| 国产伦精品一区| 国产欧美精品一区二区色综合| 国产一区二区福利| 亚洲第一免费播放区| 亚洲人成人77777线观看| 日韩亚洲精品电影| 午夜精品久久久久| 久久影院午夜论| 亚洲第一福利视频| 一区二区欧美视频| 久久se精品一区二区| 女人香蕉久久**毛片精品| 欧美日韩久久精品| 欧美日韩一区二区三区在线视频| 国产精品h在线观看| 国产日本欧美在线观看| 亚洲国产成人久久| 亚洲女爱视频在线| 久久综合久久综合久久| 欧美激情网友自拍| 亚洲桃花岛网站| 久久综合电影| 国产精品视频专区| 狠狠色综合色综合网络| 99精品免费网| 亚洲女ⅴideoshd黑人| 欧美/亚洲一区| 亚洲午夜高清视频| 欧美**人妖| 欧美视频专区一二在线观看| 伊甸园精品99久久久久久| 在线中文字幕一区| 看欧美日韩国产| 亚洲一区在线观看视频| 另类激情亚洲| 国产精品va在线| 在线欧美一区| 欧美在线亚洲在线| 亚洲另类自拍| 久久亚洲色图| 国产视频精品xxxx| 国产精品99久久久久久久久久久久| 久久亚洲精品一区二区| 久久久成人精品| 久久久国产午夜精品| 亚洲视频精品在线| 欧美日韩在线不卡| 在线亚洲精品| av成人免费在线观看| 欧美日韩免费| 国产精品99久久久久久久vr | 久热成人在线视频| 久久精品官网| 激情国产一区| 麻豆9191精品国产| 久久精品国产综合精品| 国产一在线精品一区在线观看| 欧美在线播放| 久久精品国产一区二区三区免费看 | 一区二区三区.www| 国产精品白丝av嫩草影院| 亚洲一区二区三区四区五区午夜| 99re66热这里只有精品4| 国产精品jizz在线观看美国| 亚洲欧美另类久久久精品2019| 亚洲欧美日韩久久精品| 国内精品美女av在线播放| 老司机免费视频一区二区| 男女激情久久| 亚洲无玛一区| 欧美一级在线视频| 国内视频一区| 亚洲国产精品高清久久久| 欧美日韩国产999| 午夜精品视频网站| 欧美在线视屏| 亚洲精品国久久99热| 一区二区三区日韩精品| 国产欧美一区在线| 免费亚洲一区二区| 欧美四级在线观看| 久久久久久久久岛国免费| 欧美fxxxxxx另类| 亚洲欧美日韩成人高清在线一区| 欧美中文字幕不卡| 亚洲麻豆视频| 性高湖久久久久久久久| 亚洲国产日韩精品| 亚洲午夜精品一区二区|