#include "stdafx.h"
#include <iostream>
#include <stdio.h>
using namespace std;
int main ()
{
short int x1,y1,x2,y2;
cout << "Input x1: ";
cin>> x1;
cout<<endl<<"Input y1: ";
cin>> y1;
cout << "Input x2: ";
cin>> x2;
cout<<endl<<"Input y2: ";
cin>> y2;
if ((abs(x2-x1)!=1) || (abs(y2-y1) !=2))
{cout<<"NOT";} else
{cout<<"OK"<<endl;}
system("PAUSE");
return 0;
1 килобайт=1024 байт
1/2 килобайта=512 байта
101101110= 556 (Р=8), 10100100= 244 (Р=8) .... Вроде так
<em>// PascalABC.NET 3.2, сборка 1374 от 10.01.2017</em>
<em>// Внимание! Если программа не работает, обновите версию!</em>
begin
ArrRandom(ReadInteger('n='),0,1).Println.Sorted.Println
end.
<u>Пример</u>
n= 15
0 0 1 1 0 1 1 1 1 0 0 1 1 0 1
0 0 0 0 0 0 1 1 1 1 1 1 1 1 1