From 146cc4cdcdb40e9c5fcd2543eb949cf74434d19a Mon Sep 17 00:00:00 2001 From: Neeldhara Misra Date: Wed, 23 Jul 2025 06:07:52 +0530 Subject: [PATCH] Add social share boxes to Grid Tiling Puzzle and Sunny Lines Puzzle --- src/components/GridTilingPuzzle.tsx | 10 ++++++++++ src/components/SunnyLinesPuzzle.tsx | 14 ++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/components/GridTilingPuzzle.tsx b/src/components/GridTilingPuzzle.tsx index 0b083eb..38ec8f0 100644 --- a/src/components/GridTilingPuzzle.tsx +++ b/src/components/GridTilingPuzzle.tsx @@ -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 } from 'lucide-react'; +import SocialShare from '@/components/SocialShare'; interface Rectangle { id: number; @@ -409,6 +410,15 @@ const GridTilingPuzzle: React.FC = ({ showSocialShare = t )} + + {/* Social Share */} + {showSocialShare && ( + + )} ); }; diff --git a/src/components/SunnyLinesPuzzle.tsx b/src/components/SunnyLinesPuzzle.tsx index bb3ac50..4c8f3e2 100644 --- a/src/components/SunnyLinesPuzzle.tsx +++ b/src/components/SunnyLinesPuzzle.tsx @@ -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 = ({ showSocialShare = t Sunny Lines Puzzle

- 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.

- 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.
A line is "sunny" if it's not parallel to the x-axis, y-axis, or x + y = 0.

@@ -598,6 +599,15 @@ const SunnyLinesPuzzle: React.FC = ({ showSocialShare = t )} + + {/* Social Share */} + {showSocialShare && ( + + )}
); };