
PAT
zhuqi12580
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
1002
#include #include using namespace std;const double MIN = 0.0000001;struct EC{ int exponents; //次数 double coefficients; //系数};EC a[10];EC b[10];EC result[20];int main(){ int counta, co原创 2013-03-08 21:31:10 · 606 阅读 · 0 评论 -
1031
#include #include using namespace std;int main(){ int a,b,n;//竖着是a横着是b string s; cin>>s; n=s.length(); a=(n+2)/3; b=n-a*2+2; for(int i=0;i<a;i++) { cout<<s[i]; a=(n+2)/3; b=n-a*2+2;原创 2013-03-13 14:06:45 · 634 阅读 · 0 评论 -
1028
#include #include #include using namespace std;const int N = 100000;struct Student{ char id[7]; char name[9]; int score;};Student stu[N];bool AscById(Student a, Student b){ return strcm原创 2013-03-13 14:02:28 · 618 阅读 · 0 评论 -
1050
#include #include const int MAX = 10000;char a[MAX+1];char b[MAX+1];char c[300];int main(){ gets(a); gets(b); int aLen = strlen(a); int bLen = strlen(b); for(int i=0; i<bLen; ++i) c[b[i]原创 2013-03-13 14:15:57 · 582 阅读 · 0 评论 -
1049
#include using namespace std;int a[11];int find1(const int& n){ int c=0; int cc = n; while(cc>0) { a[c++]=cc%10; cc/=10; } int count=0; int temp=1; for(int i=0;i<c;i++){ count+=(n原创 2013-03-13 14:14:39 · 548 阅读 · 0 评论 -
1041
#include const int N = 100000;const int MAX = 10000;int a[N];int b[MAX+1];int main(){ int count; scanf("%d", &count); int i=0; while(i<count) { scanf("%d", &a[i]); b[a[i]]++; i++; }原创 2013-03-13 14:12:43 · 592 阅读 · 0 评论 -
1029
#include #include using namespace std;const int MAX = 1000000;long int a[MAX];long int b[MAX];int main(){ int counta, countb, i, j, k, mid; scanf("%d", &counta); for(i=0; i<counta; i++) sc原创 2013-03-13 14:05:58 · 592 阅读 · 0 评论 -
1023
#include #include using namespace std;char c1[10];char c2[10];string Add(string &a,string&b) { string ans; int carry; int i,j,k; int add1,add2,sum; i=a.size()-1; j=b.size()-1;原创 2013-03-13 14:00:41 · 622 阅读 · 0 评论 -
1008
#include using namespace std;int f[10000];int main(){ f[0]=0; int i=1; int sum=0; int ncase=0; cin>>ncase; for(int j=0;j<ncase;j++) { cin>>f[i]; if(f[i]>f[i-1]) { sum+=((f[i]-f[i-1原创 2013-03-08 21:34:41 · 545 阅读 · 0 评论 -
1036
#include #include #include #include using namespace std;struct Student{ string name; string id; int grade;};bool Desc(Student a, Student b){ return a.grade>b.grade;}bool Asc(Student原创 2013-03-08 21:38:13 · 589 阅读 · 0 评论 -
1025
#include #include #include #include using namespace std;struct Student{ string registration_number; int score; int final_rank; int location_number; int local_rank; friend istream & operato原创 2013-03-08 21:36:43 · 662 阅读 · 0 评论 -
1009
#include #include #include using namespace std;const double MIN = 0.0000001;const int K = 10;struct EC{ int exponents; //次数 double coefficients; //系数};EC a[K];EC b[K];EC c[K][K*K];EC res原创 2013-03-08 21:36:09 · 604 阅读 · 0 评论 -
1007(最大子串和)
#include using namespace std;const int MAX = 10000;int a[MAX];void findij(const int array[], size_t length, unsigned int& i, unsigned int& j, const int& max){ int cur_max; for(i = 0; i <length;原创 2013-03-08 21:33:55 · 619 阅读 · 0 评论 -
1006
#include #include #include #include using namespace std;struct Person{ string id; string beg; string end; friend istream & operator>>(istream &is, Person &p) { is>>p.id>>p.beg>>p.end;原创 2013-03-08 21:33:02 · 573 阅读 · 0 评论 -
1005
#include #include #include using namespace std;void printEhar(const char &ch){ switch(ch) { case '0': cout<<"zero"; break; case '1': cout<<"one"; break; case '2': cout<<"two"; br原创 2013-03-08 21:31:56 · 580 阅读 · 0 评论 -
1035
#include #include const int N = 1000;char c[N];struct Person{ char name[11]; char password[11];};Person p[N];int main(){ int count, r=0, len; char ch; scanf("%d", &count); for(int i=0;原创 2013-03-13 14:09:45 · 553 阅读 · 0 评论