diff --git a/app/writeups/WriteupTemplate.tsx b/app/writeups/WriteupTemplate.tsx new file mode 100644 index 0000000..13aa4f5 --- /dev/null +++ b/app/writeups/WriteupTemplate.tsx @@ -0,0 +1,32 @@ +import LinkIcon from "~/components/LinkIcon"; + +export default function WriteupTemplate( + { children, title, tags, href, href_name }: { children: React.ReactNode, title: string, tags: string[], href?: string, href_name?: string } +) { + return ( +
+
+
+

{title}

+
+ { + href && href_name && + } + { + tags.map((tag) => ( + + {tag} + + )) + } +
+
+
+ {children} +
+ ); +} \ No newline at end of file diff --git a/app/writeups/cf/1071/page.tsx b/app/writeups/cf/1071/page.tsx new file mode 100644 index 0000000..de6f4d3 --- /dev/null +++ b/app/writeups/cf/1071/page.tsx @@ -0,0 +1,11 @@ +import WriteupTemplate from "../../WriteupTemplate"; + +export default function Round1071() { + return ( + +
+

Problem A

+
+
+ ); +} \ No newline at end of file diff --git a/app/writeups/lc/312/page.tsx b/app/writeups/lc/312/page.tsx index 95d174b..160f509 100644 --- a/app/writeups/lc/312/page.tsx +++ b/app/writeups/lc/312/page.tsx @@ -1,8 +1,7 @@ "use client"; import ReactKatex from "@pkasila/react-katex"; import ShikiHighlighter from "react-shiki"; -import LinkIcon from "~/components/LinkIcon"; - +import WriteupTemplate from "../../WriteupTemplate"; const SOLN = String.raw`class Solution: def maxCoins(self, nums: List[int]) -> int: @@ -29,19 +28,7 @@ const SOLN = String.raw`class Solution: export default function LC312() { return ( -
-
-
-

Burst Balloons

-
- - DP -
-
-
+

@@ -141,6 +128,6 @@ export default function LC312() { {SOLN} -

+ ); } \ No newline at end of file diff --git a/app/writeups/page.tsx b/app/writeups/page.tsx index 60c6471..7eb7ea3 100644 --- a/app/writeups/page.tsx +++ b/app/writeups/page.tsx @@ -2,7 +2,7 @@ import Link from "next/link"; import { ReactNode } from "react"; function WriteupLink({ children, link }: { children: ReactNode, link: string }) { - return {children} + return {children} } export default function Writeups() { @@ -10,7 +10,7 @@ export default function Writeups() {

Codeforces

LeetCode