Pagini recente » Cod sursa (job #2670560) | Cod sursa (job #1004962) | Cod sursa (job #2750800) | Cod sursa (job #1558015) | Cod sursa (job #733109)
Cod sursa(job #733109)
#include <fstream>
using namespace std;
#define Ecu(a,b,c,x,y) ( a*x+b*y+c )
#define For(a,b,c) for(a=b;a<=c;++a)
typedef short Aux;
#define Nmax 1011
typedef int Sir;
Sir Point,a,b,c,x,y;
bool OKE;
short Np,Nd,co;
Aux i,j;
ifstream F("regiuni.in");
ofstream G("regiuni.out");
int main()
{
F>>Nd>>Np;
For (i,1,Nd) F>>a>>b>>c;
For (i,1,Np) F>>x>>y;
For (i,1,Nd)
For (j,1,Np)
if ( Ecu( a, b, c,
x, y ) > 0 )
++Point;
for (int i=1;i<=Np;++i)
if ( !OKE )
++co,OKE=1;
G<<co<<'\n';
F.close();
G.close();
return 0;
}