Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:I have Compile it in dev-c++.However, the OJ judge it "Compile Error".In Reply To:I have Compile it in dev-c++.However, the OJ judge it "Compile Error". Posted by:Selfind at 2007-10-21 20:17:27 //I got some right answers. //The OJ JUDGE IT 'COMPILE ERROR' IN C++,'WRONG ANSWER' IN G++ #include <iostream> using namespace std; int main() { int a,b; cin >> a >> b; char DNA[100][50]; for(int n=0;n<b;n++) { for(int m=0;m<a;m++) { cin>>DNA[n][m]; } } int x[100]; int loop; for(loop=0;loop<=49;loop++) x[loop]=0; for(int n=0;n<b;n++) { for(int m=0;m<a;m++) { for(int r=m;r<a;r++) { if(DNA[n][r]<DNA[n][m]) x[n]++; } } } for(int w=0;w<=(a*(a-1))/2;w++) { for(int n=0;n<b;n++) { if(x[n]==w) { for(int m=0;m<a;m++) { cout<<DNA[n][m]; } cout<<endl; } } } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator