Solve of UVA 12854: Automated Checking Machine
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c,d,e,f,g,h,i,j,k,l;
while(scanf("%1d%1d%1d%1d%1d%1d%1d%1d%1d%1d",&a,&b,&c,&d,&e,&f,&g,&h,&i,&j)==10)
{
if(a!=f && b!=g && c!=h && d!=i && e!=j) cout<<"Y"<<endl;
else cout<<"N"<<endl;
}
return 0;
}
No comments:
Post a Comment