Add social share boxes to Grid Tiling Puzzle and Sunny Lines Puzzle

This commit is contained in:
Neeldhara Misra 2025-07-23 06:07:52 +05:30
parent 2ccd2fec3a
commit 146cc4cdcd
2 changed files with 22 additions and 2 deletions

View file

@ -4,6 +4,7 @@ import { Button } from '@/components/ui/button';
import { Badge } from '@/components/ui/badge';
import { Alert, AlertDescription } from '@/components/ui/alert';
import { CheckCircle, XCircle, Info, ChevronDown, ChevronUp, Undo2 } from 'lucide-react';
import SocialShare from '@/components/SocialShare';
interface Point {
x: number;
@ -387,13 +388,13 @@ const SunnyLinesPuzzle: React.FC<SunnyLinesPuzzleProps> = ({ showSocialShare = t
Sunny Lines Puzzle
</CardTitle>
<p className="text-muted-foreground mt-2">
Based on IMO 2025 Problem P6
Based on IMO 2025 Problem P1. The original problem was to determine all nonnegative integers k such that there exist n distinct lines in the plane satisfying both of the following: for all positive integers a and b with a + b n + 1, the point (a, b) lies on at least one of the lines; and exactly k of the n lines are sunny.
</p>
</CardHeader>
<CardContent>
<div className="text-center space-y-4">
<p className="text-lg text-muted-foreground">
Place lines to cover all blue dots in the triangle where a + b n + 1.
Place lines to cover all blue dots in the triangle where a + b n + 1. <br />
A line is "sunny" if it's not parallel to the x-axis, y-axis, or x + y = 0.
</p>
@ -598,6 +599,15 @@ const SunnyLinesPuzzle: React.FC<SunnyLinesPuzzleProps> = ({ showSocialShare = t
</CardContent>
</Card>
)}
{/* Social Share */}
{showSocialShare && (
<SocialShare
title="Sunny Lines Puzzle - IMO 2025 P6"
description="Place lines to cover all points in a triangle. A line is 'sunny' if it's not parallel to x-axis, y-axis, or x+y=0. Based on IMO 2025 Problem P6."
url="/contest-problems/sunny-lines"
/>
)}
</div>
);
};