Create 1259.cpp

This commit is contained in:
KiritoTRw 2016-05-26 07:49:17 +08:00
parent db7bac6f98
commit 47b8f903a6

41
QUSTOJ/1259.cpp Normal file
View File

@ -0,0 +1,41 @@
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
int org[4];
int code[4];
int inc[4];
int main()
{
scanf("%d%*c%d%*c%d%*c%d",org,org+1,org+2,org+3);
scanf("%d%*c%d%*c%d%*c%d",code,code+1,code+2,code+3);
for(int i=0;i<4;i++)
{
org[i]=org[i]&code[i];
}
int n;
scanf("%d",&n);
int i;
for(;n>0;n--)
{
scanf("%d%*c%d%*c%d%*c%d",inc,inc+1,inc+2,inc+3);
for(i=0;i<4;i++)
{
if(org[i]!=(inc[i]&code[i]))
{
break;
}
}
if(i==4)
{
printf("INNER\n");
}
else
{
printf("OUTER\n");
}
}
return 0;
}