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

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 田旭園 閱讀(691) | 評論 (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 田旭園 閱讀(341) | 評論 (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 田旭園 閱讀(635) | 評論 (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 田旭園 閱讀(691) | 評論 (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 田旭園 閱讀(341) | 評論 (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 田旭園 閱讀(493) | 評論 (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 田旭園 閱讀(648) | 評論 (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 田旭園 閱讀(1561) | 評論 (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 田旭園 閱讀(635) | 評論 (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>
            一区二区三区视频观看| 影音先锋日韩资源| 久久精品官网| 亚洲免费在线观看视频| 在线视频一区二区| 亚洲视频在线看| 香蕉尹人综合在线观看| 欧美中文字幕在线观看| 久久都是精品| 久久影音先锋| 欧美日韩综合另类| 国产欧美日韩精品丝袜高跟鞋| 国产精品亚洲综合| 国内精品一区二区| 亚洲欧洲精品一区二区三区波多野1战4| 在线欧美电影| 亚洲神马久久| 久久久亚洲高清| 欧美顶级艳妇交换群宴| 亚洲国产精品专区久久| 亚洲免费高清| 欧美伊人久久大香线蕉综合69| 亚洲日本一区二区| 亚洲一区二区免费在线| 久久精品国产第一区二区三区| 欧美国产欧美综合 | 欧美成人精品一区二区| 欧美精品成人| 国产一区二区在线免费观看| 亚洲国产精品99久久久久久久久| 在线午夜精品| 嫩草影视亚洲| 亚洲伊人色欲综合网| 免费中文日韩| 国产自产v一区二区三区c| 99精品国产在热久久| 欧美在线电影| 99视频一区二区| 模特精品裸拍一区| 伊人久久综合| 久久精品99国产精品酒店日本| 亚洲国产精品999| 亚洲欧美久久久| 欧美日韩在线播放三区| 亚洲国产成人av| 久久久www成人免费毛片麻豆| 一二三区精品| 欧美区高清在线| 最新成人在线| 欧美高清视频免费观看| 欧美一级视频一区二区| 国产精品v片在线观看不卡| 亚洲精品社区| 亚洲电影激情视频网站| 麻豆成人av| 亚洲大片av| 亚洲大片av| 欧美黄色一区| 一区二区三区国产在线观看| 亚洲国产精品成人| 欧美精选午夜久久久乱码6080| 亚洲精品一二三| 亚洲国产精品一区二区www在线| 狂野欧美一区| 99精品视频免费在线观看| 亚洲精品1区2区| 欧美日韩福利视频| 午夜精品久久久久久99热软件 | 欧美一区二区三区成人| 亚洲一区二区三区高清| 国产麻豆综合| 久久人人爽爽爽人久久久| 久久成人人人人精品欧| 亚洲第一精品夜夜躁人人躁| 欧美成人精品一区二区| 久久夜精品va视频免费观看| 性色av一区二区三区| 国产精品一区在线观看| 亚洲一区国产视频| 亚洲一区二区在线观看视频| 在线综合亚洲| 米奇777在线欧美播放| 国内精品一区二区| 欧美~级网站不卡| 午夜久久影院| 亚洲黄色在线| 亚洲狠狠丁香婷婷综合久久久| 夜夜嗨av一区二区三区四季av| 欧美精品国产精品日韩精品| 亚洲国产精品高清久久久| 欧美二区在线播放| 欧美电影免费| 亚洲手机成人高清视频| 久久国产主播| 亚洲福利视频一区二区| 亚洲激情电影在线| 欧美日韩国产综合久久| 亚洲片在线资源| 亚洲激情在线观看| 欧美三级中文字幕在线观看| 亚洲国产日韩欧美在线动漫| 99在线热播精品免费| 国产精品日韩一区二区三区| 欧美在线91| 久久亚洲午夜电影| 一本色道久久88亚洲综合88| 亚洲私人黄色宅男| 国产一区二区无遮挡| 亚洲娇小video精品| 狠狠久久亚洲欧美| 最新日韩精品| 国产欧美日韩专区发布| 欧美成人午夜激情| 欧美视频免费在线观看| 久久国产乱子精品免费女 | 一区二区三区.www| 国产亚洲成人一区| 欧美黄色小视频| 国产精品欧美日韩一区| 美国十次成人| 国模吧视频一区| 最近看过的日韩成人| 国产精品多人| 欧美v日韩v国产v| 国产精品欧美在线| 欧美福利一区二区| 国产女优一区| 久久午夜羞羞影院免费观看| 国产精品视频一区二区高潮| 欧美大片一区二区三区| 国产女人aaa级久久久级| 亚洲美女视频在线观看| 激情成人亚洲| 这里只有精品视频在线| 亚洲国产成人久久综合| 欧美在线一二三| 午夜激情综合网| 欧美激情在线狂野欧美精品| 亚洲一区二区视频在线| 欧美激情视频一区二区三区不卡| 欧美视频福利| 亚洲国产精品va在线看黑人动漫| 国产欧美在线视频| 亚洲福利国产| 夜夜爽av福利精品导航| 老司机凹凸av亚洲导航| 久久黄金**| 国产欧美日韩视频| 亚洲影音一区| 亚洲欧美日韩中文在线制服| 久久一区二区三区国产精品| 久久精品在线视频| 国产欧美日韩三区| 亚洲免费在线观看| 亚洲欧美一区二区精品久久久| 欧美日韩a区| 久久久久久久综合| 亚洲国产mv| 欧美高清视频一区二区三区在线观看 | 国产视频精品网| 亚洲欧美欧美一区二区三区| 伊人久久亚洲影院| 欧美精品一区二区三区久久久竹菊 | 亚洲天堂av高清| 午夜亚洲福利| 国产精品视频99| 亚洲欧美三级在线| 欧美中文字幕不卡| 国产日本亚洲高清| 欧美一区二区三区免费看| 久久se精品一区二区| 国产日韩一区二区三区在线播放| 亚洲资源av| 久久综合成人精品亚洲另类欧美| 国产精品mv在线观看| 久久国产66| 亚洲第一天堂av| 一区二区三区四区五区视频| 欧美日韩在线综合| 亚洲欧美怡红院| 免费视频亚洲| 亚洲毛片在线免费观看| 欧美视频官网| 亚洲人成在线影院| 欧美在线免费一级片| 在线观看视频欧美| 欧美精品在线网站| 亚洲女同性videos| 欧美成人免费视频| 久久国产日韩欧美| 亚洲区国产区| 国产精品丝袜xxxxxxx| 久久不见久久见免费视频1| 噜噜噜噜噜久久久久久91| 99re6这里只有精品| 欧美www视频在线观看| 亚洲免费视频在线观看| 亚洲欧美日韩国产成人精品影院| 国产精品自在欧美一区| 老牛嫩草一区二区三区日本|