awang11's blog

By awang11, history, 6 weeks ago, In English
Trophy Presentations — Asuka Ota, Ryo Nagamatsu, Mario Kart Wii

UPD 1: added hints, problem credits, more specific acknowledgements and some remarks. Implementations are on the way, sorry for making y'all wait!

UPD 2: Implementations are finally here.

2207A - 1-1

Author: awang11

Preparers: awang11, IceSerpent

Analysis: awang11

Hint 1
Solution
Rate the problem!
Implementation

2207B - Одна ночь у Фредди

Author: awang11

Preparers: awang11, IceSerpent

(Cool) analysis: awesomeguy856

Hint 1
Hint 2
Hint 3
Solution
Implementation
Rate the problem!

2207C - Где моя вода?

Author: awang11

Preparer: IceSerpent

Analysis: IceSerpent

Hint 1
Hint 2
Hint 3
Solution
Implementation
Rate the problem!
Remark 1
Remark 2

2207D - Как килька в банке

Author: awang11

Preparers: awang11, IceSerpent

Analysis: awang11

Hint 1
Hint 2
Hint 3
Hint 4
Solution
Implementation
Rate the problem!

2207E1 - N-MEX (Конструктивная версия)

Author: awang11

Preparers: awang11, IceSerpent

Analysis: awang11

Hint 1
Hint 2
Solution
Implementation
Rate the problem!

2207E2 - N-MEX (Версия для подсчета)

Same credits as E1.

Hint 1
Hint 2
Solution
Implementation
Rate the problem!

2207F - Ханаби

Author: IceSerpent

Preparers: awang11, IceSerpent

Analysis: awang11, IceSerpent

Hint 1
Hint 2
Hint 3
Hint 4
Solution
Implementation
Rate the problem!
Remark 1
Remark 2

2207G - Беззубик

Author: awang11

Preparer: awang11

Analysis: awang11

Hint 1
Hint 2
Hint 3
Solution
Implementation
Rate the problem!
Remark / Conjecture

2207H1 - Замок Баузера (Легкая версия)

Author: awang11

Preparer: awang11, IceSerpent

Analysis: awang11, IceSerpent

Hint 1
Hint 2
Hint 3
Solution
Implementation
Rate the problem!

2207H2 - Замок Баузера (Средняя версия)

Same credits as H1, main solution due to 244mhq.

Hint 1
Hint 2
Hint 3
Hint 4
Solution
Implementation
Rate the problem!
Remark

2207H3 - Замок Баузера (Сложная версия)

Same credits as H1, main solution inspired by IceSerpent and awesomeguy856.

Hint 1
Hint 2
Hint 3
Hint 4
Hint 5
Hint 6
Solution

Implementation

include <bits/stdc++.h>

define f first

define s second

define pb push_back

typedef long long int ll; typedef unsigned long long int ull; using namespace std; typedef pair<int,int> pii;

define INF 1e9

int get_int() { int x; cin >> x; if (x == -1) { cout << "Wrong answer" << endl; exit(0); } return x; }

int ask(vector Q) { cout << "? "; int clip = 100000; for (int i = 1; i < Q.size(); i++) cout << max(-clip, min(clip, Q[i])) + clip + 1 << " "; cout << endl; cout.flush(); return get_int() — clip — 1; }

struct MMT { int L, R; // range of variables acted on vector<MMT*> subdivisions; // subfamilies bool up, leaf; // type int evals; MMT(int L, int R, vector<MMT*> subdivisions, bool up) { this->L = L; this->R = R; this->subdivisions = subdivisions; this->up = up; this->evals = 0; this->leaf = (L == R); } string vis() { if (leaf) return "x"+to_string(L); else { string ret; if (up) ret += "max"; else ret += "min"; ret += "("; for (int i = 0; i < subdivisions.size(); i++) { ret += subdivisions[i]->vis(); if (i != subdivisions.size() — 1) ret += ", "; } ret += ")"; return ret; } return "error"; } int eval(const vector& x) { ++evals; if (leaf) return x[L]; int ret; if (up) ret = -INF; else ret = INF; for (auto f : subdivisions) { if (up) ret = max(ret, f->eval(x)); else ret = min(ret, f->eval(x)); } return ret; } void flatten() { if (leaf) return; vector<MMT*> new_subdivisions; for (auto f : subdivisions) { f->flatten(); if (f->up == up && !f->leaf) { for (auto x : f->subdivisions) { new_subdivisions.push_back(x); } } else { new_subdivisions.push_back(f); } } subdivisions = new_subdivisions; } };

MMT* mimic_smart(int L, int R, vector defaults) { /** Returns nullptr if invalid Otherwise returns an MMT reconstruction defined on indices L..R **/

/// Step 1: find the thing
// if only one index remains there is nothing to do
if (L == R) return new MMT(L, R, vector<MMT*>(), 0);

// get representative
vector<int> Q(defaults.begin(), defaults.end());
for (int i = L; i <= R; i++) Q[i] = i;
int cut = ask(Q);

if (cut == R) {
    vector<int> new_defaults = defaults;
    new_defaults

Full text and comments »

  • Vote: I like it
  • +146
  • Vote: I do not like it

By awang11, history, 6 weeks ago, In English
Gusty Garden Galaxy — Mahito Yokota, Super Mario Galaxy

Hello, Codeforces!

IceSerpent and I are pleased to invite you to Codeforces Round 1085 (Div. 1 + Div. 2) on Mar/08/2026 17:35 (Moscow time)! While some of us will be turning our clocks an hour forward for daylight savings, our theme will turn it way back to the 2010s.

You will be given $$$8$$$ problems to solve in $$$3$$$ hours. Note that some of these problems are further divided into subtasks. Some of the problems may be interactive, so please read the guide for interactive problems if you are not familiar with them. The scoring distribution is as follows:

$$$\ \ \ \,$$$ $$$\ $$$ $$$\ \,$$$ $$$\,$$$ $$$\quad\ \ \ \ \,$$$ $$$\quad\ \ \ \ \ \,$$$ $$$\ \ $$$ $$$\qquad\ \ \ \ \ \ \ \,$$$ $$$\qquad\quad\ \ \ \ \ \ \ \ $$$

$$$750 - 1250 - 1500 - 2250 - (1750 + 1000) - 3250 - 3750 - (3250 + 1000 + 1500)$$$

The problems of this round were authored by IceSerpent and myself, awang11. In addition, we would like to thank:

UPD 1: The scoring distribution has been released!

UPD 2: Editorial is released at https://mirror.codeforces.com/blog/entry/151886. Hope you enjoyed the round!

UPD 3: The results!

Div. 1 + 2

  1. ecnerwala

  2. ksun48

  3. tourist

  4. turmax

  5. hitonanode

  6. jiangly

  7. Elysion

  8. Kapt

  9. tickcross.y

  10. StarSilk

First clears

A. LeonVir, 00:01

B. ksun48, 00:09

C. Golovanov399, 00:11

D. PelicanPilot, 00:16

E1. liaoyanxu, 00:14

E2. Ayush79, 00:33

F. littleju, 00:34

G. ainta, 01:25

H1 + H2 + H3. ecnerwala, 02:31

Full text and comments »

  • Vote: I like it
  • +425
  • Vote: I do not like it

By awang11, 15 months ago, In English

Hope you enjoyed the problems!

UPD 1: Added implementations!

UPD 2: It seems my wording for the solution to C is not the best, and it is causing some confusion. I've updated it to be better!

UPD 3: Implementation links didn't work for some reason, so I've just added the code directly.

2055A - Two Frogs

Hint 1
Solution
Implementation

2055B - Crafting

Hint 1
Solution
Implementation

2055C - The Trail

Hint 1
Hint 2
Hint 3
Solution
Implementation

2055D - Scarecrow

Hint 1
Hint 2
Hint 3
Hint 4
Hint 5
Solution
Implementation

2055E - Haystacks

Hint 1
Hint 2
Hint 3
Hint 4
Solution
Implementation

2055F - Cosmic Divide

Hint 1
Hint 2
Hint 3
Hint 4
Hint 5
Solution
Implementation

Full text and comments »

  • Vote: I like it
  • +142
  • Vote: I do not like it

By awang11, 15 months ago, In English

Hello, Codeforces!

I'm pleased to invite you to open up the new year with Codeforces Round 996 (Div. 2) on Jan/12/2025 17:35 (Moscow time)! You will assist Florida Man through his whimsical adventures with $$$6$$$ tasks in the span of $$$2$$$ hours. The score distribution is as follows:

$$$\ \ \ \,$$$ $$$\ \ \ \,$$$ $$$\ \ \ \,$$$ $$$\quad\,$$$ $$$\quad\ $$$ $$$\ \ \ $$$

$$$500-1000-1500-2250-3000-3500.$$$

The problems were written and prepared by me, awang11. However, this round would not have been possible without:

We hope you find that the problems are interesting, and that you earn your desired rating gains! or losses, if you somehow want that

UPD 1: The editorial is up! Hope you enjoyed the contest!

UPD 2: Congrats to the top 5!

Div. 1 + 2

  1. Forested

  2. maspy

  3. potato167

  4. A_G

  5. Otomachi_Una

Div. 2

  1. loK10

  2. turgon314

  3. BINYU

  4. -ian

  5. _Enana

First clears

A. aryan12, 00:00

B. ankan.2526, 00:03 (Div. 1 + 2: arvindf232, 00:03)

C. Sunflower233, 00:11 (Div. 1 + 2: DE_aemmprty, 00:07)

D. agaforces, 00:32 (Div. 1 + 2: Survivor_winner, 00:18)

E. myheartwaing, 01:50 (Div. 1 + 2: tute7627, 00:37)

F. N/A (Div. 1 + 2: maspy, 01:04)

Full text and comments »

  • Vote: I like it
  • +366
  • Vote: I do not like it