Public
Edited
Jan 4, 2023
ЕГЭ по Информатике. Вариант №01092023, 2023г. Составил Евгений Джобс.ЕГЭ по Информатике. Вариант №16012023, 2023г. Составил Марат Ишимов.Оптимизация перебораDynamic Programming NotesAutomatic Recursive MemoizationProblem with recursion and memoizationОрграф для задачи №13 ЕГЭ по информатике.Dependencies in a dynamic-programming problemГраф для задачи №1 ЕГЭ по информатике.
ЕГЭ по Информатике. Демоверсия ФИПИ 2023. Исходный код на JavaScript.
Sorting AlgorithmsMerge SortКак работает сортировка слияниемРешаем задачу коммивояжёра простым переборомЗадача № 13 из демоверсии ЕГЭ 2022Tower of HanoiЗадача про охрану периметраЕГЭ по Информатике. Задача №25. Обработка целочисленных данных. Поиск делителей. №3160 с сайта К.Ю. Полякова.Rabbit in the HoleПробный вариант ЕГЭ от /dev/infНекрыловские вариантыGraphs: breadth-first searchEfficient Graph SearchTowers of HanoiЕГЭ по Информатике Пробный вариант от /dev/infЕГЭ по Информатике. Задача №24. Обработка символьной информации. Демоверсия ФИПИ 2022.ЕГЭ по Информатике. Задача №3. Базы данных. Демоверсия ФИПИ 2022.ЕГЭ по Информатике. Задача №9. Обработка чисел в электронных таблицах. №4709 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №9. Обработка чисел в электронных таблицах. №4346 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №9. Обработка чисел в электронных таблицах. №4338 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №9. Обработка чисел в электронных таблицах. №4342 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №9. Обработка чисел в электронных таблицах. №4337 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №9. Обработка чисел в электронных таблицах. Демоверсия ФИПИ 2022.ЕГЭ по Информатике. Задача №15. Истинность логического выражения. №377 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №15. Истинность логического выражения. №3835 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №15. Истинность логического выражения. №2986 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №15. Истинность логического выражения. №2238 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №15. Истинность логического выражения. №4027 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №15. Истинность логического выражения. №1069 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №15. Истинность логического выражения. №3480 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №15. Истинность логического выражения. Демоверсия ФИПИ 2022.ЕГЭ по Информатике. Задача №24. Обработка символьной информации. Демоверсия ФИПИ 2022.ЕГЭ по Информатике. Задача №23. Динамическое программирование. Демоверсия ФИПИ 2022.Рекурсия. Задача Фибоначчи о кроликах.ЕГЭ по Информатике. Задача №16. Рекурсивные алгоритмы. Демоверсия ФИПИ 2022.Canvas to GIF для исполнителя «Редактор» из ЕГЭ по ИнформатикеЕГЭ по Информатике. Задача №2. Таблицы истинности логических выражений. №1627 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №4. Двоичное кодирование, условие Фано. №1670 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №2. Таблицы истинности логических выражений. №1613 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №4. Двоичное кодирование, условие Фано. №119 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №12. Исполнитель «Редактор». Демоверсия ФИПИ 2022.ЕГЭ по Информатике. Задача №12. Исполнитель «Редактор». №4163 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №12. Исполнитель «Редактор». №3463 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №12. Исполнитель «Редактор». №3838 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №12. Исполнитель «Редактор». №4632 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №12. Исполнитель «Редактор». №3424 с сайта К.Ю. Полякова.ЕГЭ по Информатике. Задача №12. Исполнитель «Редактор». №4491 с сайта К.Ю. Полякова.
Insert cell
Insert cell
toc("h2:not(.not-in-toc)")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
logicalFunction = (x, y, z, w) => !(y <= x) || z <= w || !z
Insert cell
function solve(f) {
const result = [];
for (let x of [0, 1]) {
for (let y of [0, 1]) {
for (let z of [0, 1]) {
for (let w of [0, 1]) {
if (!f(x, y, z, w)) {
result.push([+x, +y, +z, +w]);
}
}
}
}
}
return result;
}
Insert cell
solve(logicalFunction)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
answer3 = krahmal_moves_from_zarechny
.map(
(k) =>
k["Количество упаковок"] *
(k["Тип операции"] === "Поступление" &&
k["Дата"] >= new Date("2021-06-01") &&
k["Дата"] <= new Date("2021-06-08")
? krahmal["Количество в упаковке"]
: 0)
)
.reduce((a, b) => a + b, 0)
Insert cell
krahmal_moves_from_zarechny = data["Движение товаров"].filter(
(product) =>
shop_ids_from_zarechny.includes(product["ID магазина"]) &&
krahmal["Артикул"] == product["Артикул"]
)
Insert cell
shop_ids_from_zarechny = data["Магазин"]
.filter((shop) => shop["Район"] === "Заречный")
.map((shop) => shop["ID магазина"])
Insert cell
krahmal = data["Товар"].find((product) =>
product["Наименование"]?.includes("Крахмал картофельный")
)
Insert cell
data = ({
"Движение товаров": data3.sheet("Движение товаров", { headers: true }),
Товар: data3.sheet("Товар", { headers: true }),
Магазин: data3.sheet("Магазин", { headers: true })
})
Insert cell
data3 = FileAttachment("3.xlsx").xlsx()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
answer4 = 3 * 1 + 2 * 2 + 1 * 3 + 1 * 4
Insert cell
Insert cell
Insert cell
Insert cell
answer5 = f5(40)
Insert cell
f5 = (bottomLimit) => {
for (let n = 0; n < 100; ++n) {
const b = d2b(n);
const r = b2d(
sumDigits(b) % 2 ? "11" + (b + "1").slice(2) : "10" + (b + "0").slice(2)
);
if (r > bottomLimit) {
return n;
}
}
return Infinity;
}
Insert cell
d2b = (d) => d.toString(2)
Insert cell
b2d = (b) => parseInt(b, 2)
Insert cell
sumDigits = (n) => ((n - 1) % 9) + 1
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
logo`
to grid :n
setpensize 0.05
setpencolor "red
for [ x 0 10 :n ] [pu setxy :x 0 seth 0 pd fd 10]
for [ y 0 10 :n ] [pu setxy 0 :y seth 90 pd fd 10]
end

hideturtle
setpensize 0.1
setscrunch 24 24

repeat 7 [ fd 10 rt 120 ]

grid 1
`
Insert cell
Insert cell
answer6a = Infinity
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
logo`
to grid :n
setpensize 0.3
setpencolor "red
for [ x 0 100 :n ] [pu setxy :x 0 seth 0 pd fd 100]
for [ y 0 100 :n ] [pu setxy 0 :y seth 90 pd fd 100]
end

hideturtle
setpensize 1
setscrunch 2.5 2.5

repeat 2 [fd 10 rt 90 fd 20 rt 90]
pu
fd 3 rt 90 fd 5 lt 90
pd
repeat 2 [fd 70 rt 90 fd 80 rt 90]

grid 10
`
Insert cell
Insert cell
answer6b = Infinity
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
answer7 = 3.5 * 28
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
answer8 = 0
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
answer9 = rows_of_numbers.filter((row) => {
const counted = count(row);
const dubbles = Object.keys(counted).filter((key) => counted[key] === 2);
const uniques = Object.keys(counted).filter((key) => counted[key] === 1);
return (
dubbles.length === 1 &&
uniques.length === 4 &&
uniques.reduce((a, b) => a + Number(b), 0) / 4 <= 2 * Number(dubbles[0])
);
}).length
Insert cell
count = (row) =>
row.reduce(
(acc, rec, index) =>
typeof acc[rec] !== "undefined"
? { ...acc, [rec]: acc[rec] + 1 }
: { ...acc, [rec]: 1 },
{}
)
Insert cell
rows_of_numbers = d3.dsvFormat(";").parseRows(data9)
Insert cell
data9 = (await FileAttachment("9.csv").text()).replace(/\r/g, "")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
answer10 = (data10.match(/теперь/g) || []).length
Insert cell
data10 = new TextDecoder("cp1251")
.decode(await FileAttachment("10.txt").arrayBuffer())
.replace(/\r/g, "")
Insert cell
Insert cell
Insert cell
Insert cell
answer11 = (Math.ceil((Math.ceil(Math.log2(10 + 1650)) * 250) / 8) * 65536) /
1024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
answer13 = count13("Е", "Е")
Insert cell
function count13(a, b, way = b) {
return a == b && way.length > 1
? 1
: way.includes(a)
? adjacencyList[a].reduce((acc, v) => acc + count13(v, b, way + v), 0)
: 0;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
answer14 = {
for (let x = 0; x < 15; ++x) {
const e = expr(x, 15);
if (e % 14 === 0) {
return e / 14;
}
}
}
Insert cell
expr = (x, base) =>
1 * base ** 4 +
2 * base ** 3 +
3 * base ** 2 +
x * base +
5 +
1 * base ** 4 +
x * base ** 3 +
2 * base ** 2 +
3 * base +
3
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
f = (x, a) => del(x, 2) <= !del(x, 3) || x + a >= 100
Insert cell
del = (a,b) => a % b === 0
Insert cell
answer15 = {
for (let a = 99; a >= 1; --a) {
for (let x = 1; x + a < 100; ++x) {
if (!f(x, a)) return a + 1;
}
}
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
10000000000000000 === 10000000000000001
Insert cell
Insert cell
f16 = (n) => {
const f = new Array(n + 1).fill(1);
for (let n = 1; n < f.length; ++n) {
f[n] = n * f[n - 1];
}
return f[n];
}
Insert cell
answer16 = f16(2023) / f16(2020)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
sumOfSquares = (a, b) => a ** 2 + b ** 2
Insert cell
Insert cell
allGoodPairs = (data) => {
const pairs = [];
for (let i = 0; i < data.length - 1; ++i) {
if (
!(data[i].endedByThree === data[i + 1].endedByThree) &&
sumOfSquares(data[i].number, data[i + 1].number) >= maxFromGoodSquared
) {
pairs.push([data[i].number, data[i + 1].number]);
}
}
return pairs;
}
Insert cell
goodPairs = allGoodPairs(mapedData)
Insert cell
answer17a = goodPairs.length
Insert cell
answer17b = Math.max(...goodPairs.map((p) => sumOfSquares(p[0], p[1])))
Insert cell
maxFromGoodSquared = Math.max(
...mapedData.filter((n) => n.endedByThree).map((n) => n.number)
) ** 2
Insert cell
mapedData = data17.map((n) => ({
number: +n,
endedByThree: n.slice(-1) === "3"
}))
Insert cell
data17 = (await FileAttachment("17.txt").text()).replace(/\r/g, "").split("\n")
Insert cell
Insert cell
Insert cell
Insert cell
data18 = FileAttachment("18.xlsx").xlsx()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
mermaid`${gantt(data22)}`
Insert cell
gantt = (data) =>
`gantt
dateFormat s
axisFormat %S
title Диаграмма Ганта
todayMarker off\n\n` +
data
.map(
(p) =>
`${p["ID процесса B"]} : ${p["ID процесса B"]}, ${parseA(
p["ID процесса (ов) A"]
)}, ${p["Время выполнения процесса B (мс)"]}s`
)
.join("\n")
Insert cell
parseA = (s) => {
const l = s.toString().split("; ");
if (l.length === 1) {
if (l[0] === "0") {
return "0";
} else {
return `after ${l[0]}`;
}
} else {
return `after ${l.join(" ")}`;
}
}
Insert cell
data22 = (await FileAttachment("22.xlsx").xlsx()).sheet("Лист1", {
headers: true
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function f23(start, stop, flag = 0, through = 10, avoid = 17) {
flag += start === through;
if (start === avoid) return 0;
if (start >= stop) return (start === stop) * flag;
return f23(start + 1, stop, flag) + f23(start * 2, stop, flag);
}
Insert cell
answer23 = f23(1, 35)
Insert cell
Insert cell
Insert cell
Insert cell
data24 = Array.from(await FileAttachment("24.txt").text())
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
answer26a = 0
Insert cell
answer26b = 0
Insert cell
data26 = (await FileAttachment("26.txt").text()).replace(/\r/g, "")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
answer27a = 0
Insert cell
answer27b = 0
Insert cell
data27a = (await FileAttachment("27_A.txt").text()).replace(/\r/g, "")
Insert cell
data27b = (await FileAttachment("27_B.txt").text()).replace(/\r/g, "")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more