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 |
请求各位前辈了,可以帮我看看哪有错吗?我已经不行了,我用DEV-C++带数据进去是对的,求求你们了#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