Add social share boxes to Grid Tiling Puzzle and Sunny Lines Puzzle
This commit is contained in:
parent
2ccd2fec3a
commit
146cc4cdcd
2 changed files with 22 additions and 2 deletions
|
|
@ -4,6 +4,7 @@ import { Button } from '@/components/ui/button';
|
||||||
import { Badge } from '@/components/ui/badge';
|
import { Badge } from '@/components/ui/badge';
|
||||||
import { Alert, AlertDescription } from '@/components/ui/alert';
|
import { Alert, AlertDescription } from '@/components/ui/alert';
|
||||||
import { CheckCircle, XCircle, Info, ChevronDown, ChevronUp } from 'lucide-react';
|
import { CheckCircle, XCircle, Info, ChevronDown, ChevronUp } from 'lucide-react';
|
||||||
|
import SocialShare from '@/components/SocialShare';
|
||||||
|
|
||||||
interface Rectangle {
|
interface Rectangle {
|
||||||
id: number;
|
id: number;
|
||||||
|
|
@ -409,6 +410,15 @@ const GridTilingPuzzle: React.FC<GridTilingPuzzleProps> = ({ showSocialShare = t
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Social Share */}
|
||||||
|
{showSocialShare && (
|
||||||
|
<SocialShare
|
||||||
|
title="Grid Tiling Puzzle - IMO 2025"
|
||||||
|
description="Place rectangular tiles on a grid so that each row and column has exactly one uncovered square. Based on IMO 2025 Problem P6."
|
||||||
|
url="/contest-problems/grid-tiling"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import { Button } from '@/components/ui/button';
|
||||||
import { Badge } from '@/components/ui/badge';
|
import { Badge } from '@/components/ui/badge';
|
||||||
import { Alert, AlertDescription } from '@/components/ui/alert';
|
import { Alert, AlertDescription } from '@/components/ui/alert';
|
||||||
import { CheckCircle, XCircle, Info, ChevronDown, ChevronUp, Undo2 } from 'lucide-react';
|
import { CheckCircle, XCircle, Info, ChevronDown, ChevronUp, Undo2 } from 'lucide-react';
|
||||||
|
import SocialShare from '@/components/SocialShare';
|
||||||
|
|
||||||
interface Point {
|
interface Point {
|
||||||
x: number;
|
x: number;
|
||||||
|
|
@ -387,13 +388,13 @@ const SunnyLinesPuzzle: React.FC<SunnyLinesPuzzleProps> = ({ showSocialShare = t
|
||||||
Sunny Lines Puzzle
|
Sunny Lines Puzzle
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<p className="text-muted-foreground mt-2">
|
<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>
|
</p>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<div className="text-center space-y-4">
|
<div className="text-center space-y-4">
|
||||||
<p className="text-lg text-muted-foreground">
|
<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.
|
A line is "sunny" if it's not parallel to the x-axis, y-axis, or x + y = 0.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -598,6 +599,15 @@ const SunnyLinesPuzzle: React.FC<SunnyLinesPuzzleProps> = ({ showSocialShare = t
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</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>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue