Language: C++

#include <cmath>
#include <cstdio>
#include <algorithm>
??
#define MAX_N 300
const double PI=acos(-1.0);
??
struct Point{
????????double x,y;
????????Point(){
????????????????x=y=0;
????????}
????????bool operator<(const Point& p)const{
????????????????return this->x < p.x;
????????}
};
??
struct comp{
????????bool operator()(const Point &P1, const Point &P2){
????????????????return P1.x < P2.x;
????????}
????????bool operator()(const Point &P, double d){
????????????????return P.x < d;
????????}
????????bool operator()(double d, const Point &P){
????????????????return d < P.x;
????????}
};
??
Point points[MAX_N];
int N;
??
double distance(Point *a, Point *b){
????????return std::sqrt(pow(a->x-b->x,2)+pow(a->y-b->y,2));
}
??
double distance2(Point *a, Point *b){
????????return pow(a->x-b->x,2)+pow(a->y-b->y,2);
}
??
int solve(){
????????Point C, *P1, *P2, *P3;
????????int max=1;
????????for(int i=0;i<N;i++){
????????????????P1=&points[i];
????????????????Point *LB,*UB;
????????????????LB=std::lower_bound(points,points+N,P1->x-2.0001,comp());
????????????????UB=std::upper_bound(points,points+N,P1->x+2.0001,comp());
????????????????for(int j=(LB-points);j<(UB-points);j++){
????????????????????????if(i==j) continue;
????????????????????????P2=&points[j];
????????????????????????if(distance(P1,P2)>2.0) continue;
??
????????????????????????double alpha,beta;
????????????????????????alpha=acos(distance(P1,P2)/2.0);
????????????????????????if((P2->x-P1->x)>=0){
????????????????????????????????if((P2->y - P1->y)>=0){
????????????????????????????????????????beta=atan((P2->y - P1->y) / (P2->x - P1->x));
????????????????????????????????}else{
????????????????????????????????????????beta=atan((P2->y - P1->y) / (P2->x - P1->x))+2.0*PI;
????????????????????????????????}
????????????????????????}else{
????????????????????????????????beta=atan((P2->y - P1->y) / (P2->x - P1->x))+PI;
????????????????????????}
????????????????????????C.x=P1->x+cos(alpha+beta);
????????????????????????C.y=P1->y+sin(alpha+beta);
??
????????????????????????int enclosed=0;
????????????????????????Point *lb,*ub;
????????????????????????lb=std::lower_bound(points,points+N,C.x-1.0001,comp());
????????????????????????ub=std::upper_bound(points,points+N,C.x+1.0001,comp());
????????????????????????for(int k=(lb-points);k<(ub-points);k++){
????????????????????????????????if(k==i||k==j){
????????????????????????????????????????enclosed++;
????????????????????????????????????????continue;
????????????????????????????????}
????????????????????????????????P3=&points[k];
????????????????????????????????if(distance2(P3,&C)<1.0) enclosed++;
????????????????????????}
????????????????????????if(enclosed>max) max=enclosed;
????????????????????????if(max==N) return max;
????????????????}
????????}
????????return max;
}
??
int main(void){
????????while(scanf("%d",&N), N){
????????????????for(int i=0;i<N;i++){
????????????????????????scanf("%lf %lf", &points[i].x, &points[i].y);
????????????????}
????????????????std::sort(points,points+N);
????????????????printf("%d\n",solve());
????????}
????????return 0;
}

Compiler output:
a.cc:4:1: error: expected unqualified-id before '?' token
    4 | ??
      | ^
a.cc:7:1: error: expected unqualified-id before '?' token
    7 | ??
      | ^
a.cc:17:1: error: expected unqualified-id before '?' token
   17 | ??
      | ^
a.cc:29:1: error: expected unqualified-id before '?' token
   29 | ??
      | ^
a.cc:32:1: error: expected unqualified-id before '?' token
   32 | ??
      | ^
a.cc:36:1: error: expected unqualified-id before '?' token
   36 | ??
      | ^
a.cc:40:1: error: expected unqualified-id before '?' token
   40 | ??
      | ^
a.cc:86:1: error: expected unqualified-id before '?' token
   86 | ??
      | ^