brain

tamnd's digital brain — notes, problems, research

43815 notes

CF 467E - Alex and Complicated Task

We are given a long sequence of integers, and we are allowed to pick a subsequence from it. The goal is not just to maximize the length of the subsequence, but to impose a very specific structural constraint on how the chosen elements repeat.

codeforcescompetitive-programmingdata-structuresdpgreedy
Lesson 19: Technology & Society

Digital transformation, platform economy, and the vocabulary of China's tech-society interface at C1 level

hsk-6lessonc1
CF 476E - Dreamoon and Strings

We start with a string s. We may delete exactly x characters, keeping the remaining characters in their original order. The resulting string is a subsequence of s. Inside that resulting string, we look for as many non-overlapping occurrences of a pattern p as possible.

codeforcescompetitive-programmingdpstrings
間 — JLPT N5 Kanji

間 (kan/ken/aida): interval. JLPT N5 kanji.

japanesekanjin5jlpt
电视 (diànshì) — television

HSK 1 | noun | television, TV

hsk-1vocabularya1
〜ざるを得ない — JLPT N2 Grammar

Learn how to use 〜ざるを得ない (zaru wo enai) to express reluctant necessity — 'have no choice but to; can't help but do.' Includes structure, nuance, examples, and comparisons.

japanesegrammarn2jlpt
青 — Kanji Reference

青 (blue, green): 8 strokes, JLPT N5. On: セイ、ショウ. Kun: あお、あお-い.

japanesekanjin5writing
今 — Kanji Reference

今 (now): 4 strokes, JLPT N5. On: コン、キン. Kun: いま.

japanesekanjin5writing
JLPT N3 Lesson 10: N3 Capstone — Integration and Review

Comprehensive N3 review: mock N3 reading passage with full analysis, 15 grammar transformation exercises, listening strategy guide, self-assessment checklist for all 10 lessons, and a Bridge to N2 preview.

japanesen3lessonjlptcapstonereviewn2-bridge
优化 (yōuhuà) — to optimize, to improve

HSK 5 | verb/noun | systematic improvement for better performance or efficiency

hsk-5vocabularyb2
飲 — Kanji Reference

飲 (drink): 12 strokes, JLPT N5. On: イン. Kun: の-む.

japanesekanjin5writing
CF 474A - Keyboard

The problem presents a keyboard with three rows of characters arranged exactly like a standard QWERTY layout. Mole is typing messages on this keyboard, but he accidentally shifted his hands either one key to the left or one key to the right.

codeforcescompetitive-programmingimplementation
CF 474E - Pillars

We have a sequence of pillars arranged from left to right. Pillar i has height h[i]. A valid jump can only go forward, from a smaller index to a larger index, and the height difference between the two pillars must be at least d.

codeforcescompetitive-programmingbinary-searchdata-structuresdpsortingstrees
天 — JLPT N5 Kanji

天 (ten/ame): heaven. JLPT N5 kanji.

japanesekanjin5jlpt
癌症 (áizhèng) — cancer

HSK 4 | noun | a serious disease caused by uncontrolled cell growth

hsk-4vocabularyb1
CF 479C - Exams

We are given a collection of exams, each with two relevant days. The official schedule assigns exam i a day ai, but the student has a special agreement allowing him to take it earlier on day bi, where bi < ai.

codeforcescompetitive-programminggreedysortings
功能 (gōngnéng) — function, capability

HSK 5 | noun | the specific purpose or role something is designed or able to perform

hsk-5vocabularyb2
系统 (xìtǒng) — system; systematic

HSK 4 | noun / adjective | an organized set of connected parts, or thorough and orderly

hsk-4vocabularyb1
CF 450B - Jzzhu and Sequences

The problem defines a linear sequence $fn$ with two initial values $x = f1$ and $y = f2$, and a recurrence that repeats every six terms: $f{n} = f{n-1} - f{n-2}$.

codeforcescompetitive-programmingimplementationmath
〜べく / 〜べきだ / 〜べきではない — JLPT N2 Grammar

Learn 〜べく (formal purpose) and 〜べきだ/べきではない (moral/logical obligation) in formal Japanese writing and speech.

japanesegrammarn2jlpt
安 — Kanji Reference

安 (cheap, peaceful): 6 strokes, JLPT N5. On: アン. Kun: やす-い.

japanesekanjin5writing
Lesson 38: Gondorian & Mirkwood Sindarin

Dialect variation in Sindarin: Gondorian Sindarin (influenced by Númenórean usage and Adûnaic), Mirkwood Sindarin (Silvan-influenced), and key phonological differences.

sindarindialectsgondormirkwoodadvanced
〜どころか — JLPT N3 Grammar

Learn 〜どころか (far from ~, let alone ~) — the N3 pattern for expressing strong unexpected contrast or reversal.

japanesegrammarn3jlpt
礼貌 (lǐmào) — polite; politeness

HSK 3 | adj/noun | polite behavior or manners

hsk-3vocabularya2
性能 (xìngnéng) — performance; capability

HSK 5 | noun | performance; capability; functional properties of a product or system

hsk-5vocabularyb2
主人 (zhǔrén) — host / owner / master

HSK 3 | noun | the host of a place or owner of something

hsk-3vocabularya2
应用程序 (yìngyòng chéngxù) — application, app

HSK 4 | noun | a software application designed for a specific purpose

hsk-4vocabularyb1
意思 (yìsi) — meaning; idea

HSK 3 | noun | the meaning of a word or the idea behind something

hsk-3vocabularya2
Lesson 11: Chinese Culture — Festivals

Learn vocabulary and grammar for discussing Chinese traditional festivals, including the customs, foods, and activities associated with major celebrations.

hsk-3lessona2
HSK 2.0 vs HSK 3.0 Comparison

Side-by-side comparison of HSK old standard (2.0, 6 levels) and new standard (3.0, 9 levels), including vocabulary counts, CEFR alignment, and transition timeline.

chinesehskhsk-3.0cefr
JLPT N1 — Grammar

Complete JLPT N1 grammar reference: ~200 patterns including classical Japanese influences, literary forms, highly formal conjunctions, advanced conditionals, and nuanced distinctions separating N1 from N2.

japanesejlptjlpt-n1grammarlanguage-learning
成果 (chéngguǒ) — achievement; result; fruit of effort

HSK 4 | noun | a positive result obtained through effort

hsk-4vocabularyb1
按时 (ànshí) — on time; punctually

HSK 4 | adverb | doing something at the scheduled or required time

hsk-4vocabularyb1
JLPT N4 Lesson 4: Expressing Probability and Inference

Master six essential Japanese patterns for expressing probability, hearsay, and inference — かもしれない, でしょう/だろう, はずだ/はずがない, らしい, そうだ (two uses!), and ようだ — with a certainty-scale comparison table.

japanesen4jlptlessonlanguage-learning
爸爸 (bàba) — dad, father

HSK 1 | noun | informal word for father

hsk-1vocabularya1
安全な (あんぜんな) — Japanese Vocabulary

安全な (あんぜんな / anzen na): safe. N4 level Japanese vocabulary.

japanesevocabularyn4adj-na
Lesson 10: Hobbies and Free Time

Learn to talk about what you like doing and what skills you have using 喜欢 and 会.

hsk-1lessona1
〜ために — Japanese Grammar

〜ために: JLPT N4 grammar pattern. Usage, structure, examples, and comparison with similar patterns.

japanesegrammarn4purpose
Lesson 1: Comparisons

Learn how to compare people and things using 比, 没有, and 一样 in natural Chinese.

hsk-2lessona1
Lesson 23: Critical Analysis

Critical thinking patterns in Chinese — the vocabulary and structures of analysis, evaluation, and reasoned judgment at C1 level

hsk-6lessonc1
肉 — JLPT N5 Kanji

肉 (ニク): meat; flesh. JLPT N5 essential kanji.

japanesekanjin5jlpt
CF 461A - Appleman and Toastman

We start with a single group containing all given numbers. Whenever Toastman receives a group, he adds the sum of all numbers in that group to the score. If the group contains more than one number, Appleman may split it into two non-empty groups and send both back to Toastman.

codeforcescompetitive-programminggreedysortings
由于 (yóuyú) — due to; because of; owing to

HSK 3 | preposition/conjunction | introduces a cause or reason, more formal than 因为

hsk-3vocabularya2
联系 (liánxì) — to contact / connection

HSK 3 | verb / noun | to contact, to get in touch; connection, link, relationship

hsk-3vocabularya2
N4 Kanji: 路 (Road, Route)

JLPT N4 kanji 路 — readings, vocabulary, stroke order, mnemonic, and common confusion pairs.

japanesen4jlptkanjilanguage-learning
Lesson 9: Pronouns — Object & Dative

Sindarin object pronouns and the dative construction with an: direct object pronoun forms, indirect object, and attested examples.

sindaringrammarpronounsbeginner
JLPT N4 Lesson 7: Passive and Causative

Master Japanese passive (〜られる/〜れる), causative (〜させる/〜せる), and causative-passive (〜させられる) forms. Includes full conjugation tables for 10 verbs, the suffering passive, and three dialogues contrasting active/passive/causative perspectives.

japanesen4jlptlessonlanguage-learning
表演 (biǎoyǎn) — to perform / performance

HSK 3 | verb / noun | to perform, to put on a show; a performance, show

hsk-3vocabularya2
時 — JLPT N5 Kanji

時 (ji/toki): time. JLPT N5 kanji.

japanesekanjin5jlpt
推测 (tuīcè) — Infer

HSK 4 | verb/noun | to infer, to speculate; inference, speculation

hsk-4vocabularyb1
〜にほかならない (nothing other than / is precisely)

N1 grammar pattern 〜にほかならない: emphatic definitional assertion — X is nothing other than Y. Used for declarative identification, formal analysis, and rhetorical emphasis.

japanesen1grammarjlptにほかならないformal Japanese
轻松 (qīngsōng) — relaxed / easy

HSK 3 | adjective | free from stress or difficulty; comfortable and at ease

hsk-3vocabularya2
N4 Kanji: 仕 (Work, Serve)

JLPT N4 kanji 仕 — readings, vocabulary, stroke order, mnemonic, and common confusion pairs.

japanesen4jlptkanjilanguage-learning
另 (lìng) — another / other

HSK 3 | pronoun / adjective | another, other, separate — introduces a different item

hsk-3vocabularya2
含义 (hányì) — meaning, connotation

HSK 6 | n | the meaning or significance contained within a word, phrase, or act

hsk-6vocabularyc1
推断 (tuīduàn) — to infer, to deduce

HSK 6 | verb | to draw conclusions through reasoning from available evidence

hsk-6vocabularyc1
觉得 (juéde) — to feel, to think (subjectively)

HSK 2 | verb | to feel or think based on personal impression; contrast with 认为 for reasoned opinion

hsk-2vocabularya1
不但 (búdàn) — not only

HSK 3 | conjunction | not only — the first half of the 不但…而且… pattern

hsk-3vocabularya2
空间 (kōngjiān) — space; room; area

HSK 4 | noun | physical space, room, or conceptual space for something

hsk-4vocabularyb1
天气 (tiānqì) — weather

HSK 1 | noun | weather

hsk-1vocabularya1
〜ざるを得ない — JLPT N2 Grammar

Learn 〜ざるを得ない to express unavoidable obligation — you have no choice but to do something, despite reluctance.

japanesegrammarn2jlpt
〜てからというもの — JLPT N2 Grammar

Learn 〜てからというもの to express a fundamental, sustained change that began at a specific turning point.

japanesegrammarn2jlpt
Lesson 19: Technology Ethics

Engage with Chinese discourse on the ethical dimensions of technology, including AI ethics, privacy, data security, and algorithmic bias.

hsk-5lessonb2
社会 (shèhuì) — society

HSK 5 | noun | the aggregate of people living together in a structured community

hsk-5vocabularyb2
此外 (cǐwài) — besides; in addition; furthermore

HSK 3 | conjunction | adds an additional point to what was already stated

hsk-3vocabularya2
树 (shù) — tree

HSK 3 | noun | tree; also used in compounds for planting or establishing

hsk-3vocabularya2
JLPT N4 Lesson 5: Reported Speech and Quoting

Master Japanese reported speech patterns — 〜と言う, 〜と思う, 〜と聞く, 〜によると, 〜そうだ — and learn to convert direct speech to indirect speech with correct plain-form usage before と.

japanesen4jlptlessonlanguage-learning
普通 (pǔtōng) — ordinary / common

HSK 3 | adjective | ordinary, common, average — not special

hsk-3vocabularya2
特别 (tèbié) — especially; particularly; special

HSK 2 | adverb / adjective | intensifier meaning 'especially' or describing something as unique

hsk-2vocabularya1
大概 (dàgài) — approximately

HSK 3 | adverb | approximately, probably, roughly — an estimate rather than exact figure

hsk-3vocabularya2
市场份额 (shìchǎng fèn'é) — market share

HSK 5 | noun phrase | the portion of a market controlled by a company or product

hsk-5vocabularyb2
融合 (rónghé) — to merge, to integrate, fusion

HSK 5 | verb/noun | blending of distinct elements into a unified whole

hsk-5vocabularyb2
引导 (yǐndǎo) — to guide; to lead; to direct

HSK 5 | verb | to show the way or help someone develop in a certain direction

hsk-5vocabularyb2
〜に反して / 〜に反する (contrary to / in violation of)

N1 grammar pattern 〜に反して/〜に反する: expressing that something is contrary to an expectation, rule, principle, or agreement. Legal and formal register.

japanesen1grammarjlptに反してに反する
压力 (yālì) — pressure; stress

HSK 4 | noun | physical force pressing on something, or mental/social stress

hsk-4vocabularyb1
毕竟 (bìjìng) — after all; all in all; when all is said and done

HSK 3 | adverb | after all — points to an underlying truth or fundamental reason

hsk-3vocabularya2
补充 (bǔchōng) — to supplement; to add; to complement

HSK 4 | verb/noun | to add to or fill in what is missing

hsk-4vocabularyb1
特殊 (tèshū) — Special, exceptional, extraordinary

HSK 5 | adjective | different from what is normal; exceptional; having unique qualities

hsk-5vocabularyb2
遗憾 (yíhàn) — regret; to regret; regrettable

HSK 5 | noun/verb/adjective | the feeling of sorrow over something missed or lost

hsk-5vocabularyb2
ずっと (ずっと) — Japanese Vocabulary

ずっと (ずっと / zutto): all along, continuously. N4 level Japanese vocabulary.

japanesevocabularyn4adverb
照 (zhào) — to take a photo / to shine

HSK 3 | verb | to take a photo, to shine on, to reflect, to look after

hsk-3vocabularya2
〜かねる / 〜かねない — JLPT N2 Grammar

Master the critical distinction between 〜かねる (polite refusal/impossibility) and 〜かねない (risk/negative possibility warning).

japanesegrammarn2jlpt
打扰 (dǎrǎo) — to disturb; to bother; to interrupt

HSK 4 | verb | disrupting someone's activity or peace

hsk-4vocabularyb1
拥有 (yōngyǒu) — to possess; to own; to have

HSK 4 | verb | holding something valuable as one's own

hsk-4vocabularyb1
感动 (gǎndòng) — moved / touched

HSK 3 | verb / adjective | to be moved emotionally, touched deeply by something

hsk-3vocabularya2
绿色 (lǜsè) — green; eco-friendly

HSK 5 | noun/adjective | green (colour); eco-friendly, sustainable, clean

hsk-5vocabularyb2
CF 470A - Crystal Ball Sequence

The sequence in this problem comes from counting lattice points inside a growing hexagon on a hexagonal grid. Instead of having to construct the hexagon or count points manually, the problem already gives the formula for the sequence: $$Hn = 3 cdot n cdot (n+1) + 1$$ The input…

codeforcescompetitive-programming*specialimplementation
不好意思 (bù hǎo yìsi) — embarrassed; sorry to trouble you

HSK 3 | adjective/expression | feeling embarrassed, shy, or apologetic; sorry to bother you

hsk-3vocabularya2
Lesson 12: Advanced Listening Analysis

Inferring subtext, reading prosody, and decoding implicature in advanced Chinese spoken discourse — 弦外之音 and the pragmatics of indirect communication

hsk-6lessonc1
週 — JLPT N5 Kanji

週 (shuu/): week. JLPT N5 kanji.

japanesekanjin5jlpt
什么 (shénme) — what

HSK 1 | pronoun | interrogative pronoun asking about things or identity

hsk-1vocabularya1
容纳 (róngnà) — to hold; to accommodate; to contain

HSK 4 | verb | to have capacity for a number of people or things

hsk-4vocabularyb1
CF 460C - Present

We are asked to maximize the minimum height of flowers after a limited number of days of watering. Each flower has an initial height, and on any day we can water a contiguous segment of exactly w flowers, increasing each by one.

codeforcescompetitive-programmingbinary-searchdata-structuresgreedy
演员 (yǎnyuán) — actor / performer

HSK 3 | noun | actor, actress, performer

hsk-3vocabularya2
HSK 7 Vocabulary (~1,800 New Words)

HSK 7 vocabulary reference: advanced C2-level words across specialized professional, academic, and literary domains.

hsk-7vocabulary
运营 (yùnyíng) — to operate; operations

HSK 5 | verb/noun | the operation and management of a business or service

hsk-5vocabularyb2
CF 449E - Jzzhu and Squares

We have all lattice points inside a rectangle of size $n times m$. Any square whose four vertices are lattice points is allowed, even if it is rotated. For every such square, we look at the unit grid cells completely contained inside it. Each contained unit cell receives one dot.

codeforcescompetitive-programmingdpmathnumber-theory
CF 476A - Dreamoon and Stairs

Dreamoon wants to reach the top of a staircase containing n steps. Every move can cover either 1 step or 2 steps. Among all possible ways to reach exactly step n, we need the number of moves used to be divisible by m. The task is not asking for the number of different sequences.

codeforcescompetitive-programmingimplementationmath
揭示 (jiēshì) — to reveal; to uncover

HSK 5 | verb | to reveal; to bring to light; to expose

hsk-5vocabularyb2
旅行 (lǚxíng) — to travel; trip; journey

HSK 3 | verb/noun | to make a journey to another place

hsk-3vocabularya2