INPUT ARRAY[2]
IF Index[0]=Index[1]
WRITE Index[1]
INDICES++
#include
#include
using namespace std;
int main()
{
string in;
in.resize(2);
fin.open("Input.txt", ios::in | ios:: binary);
if(fin.good())
{
fout.open("output.txt", ios::out | ios::binary);
while(!fin.eof())
{
fin >> in;
if(in[0] == in[1])
{
if (in[1] == 0xFF)
fout << '1';
else if (in[1] == 0x00)
fout << '0';
}
}
fout.close();
}
fin.close();
return 0;
}
Share with your friends: |