上回发了个贴,说全RE,要谢谢当时大佬的帮助,现在确实不RE了,但他又全WA了啊!!哪位大佬救救菜鸟!!!
在下不才,代码如下:
#include<bits/stdc++.h>
using namespace std;
string c;
int sum=0;
int main(){
int n;
cin>>n;
bool a[n+1][5];
for(int i=1;i<=n;i++){
for(int j=1;j<=4;j++) a[i][j]=1;
}
for(int i=1;i<=n;i++){
cin>>c;
for(int j=1;j<=n;j++){
if(c[j]>'1') a[i][1]=0;
if(c[j]>'7') a[i][2]=0;
if(c[j]>'9') a[i][3]=0;
if(c[j]>'F') a[i][4]=0;
}
}
for(int i=1;i<=n;i++){
for(int j=1;j<=4;j++){
cout<<a[i][j];
}cout<<endl;
}
return 0;
}