7K12 blog

猫でも分かる何か

2023-12-16から1日間の記事一覧

グリッドグラフ変換 LIB::GridGraph

#include <bits/stdc++.h> using namespace std; namespace LIB { using GG=graph<ll>; template<class W, class GG>class GridGraph { using ll=long long; template<class T>using vve=vector<vector<T>>; GG& g; vve<ll> ndtable; public: GridGraph(vve<W>& grid, ll dir, W wall, GG& g):g(g) { vector<pair<ll,ll>> d…</pair<ll,ll></w></ll></vector<t></class></class></ll></bits/stdc++.h>

ABC330 に参加した感想

E問題マルチセットで解けると思ったがTLEになった。 Cで「めぐる式二分探索」が出題される時代なのか…と思いつつ他の解法が思いつかなかったので二分探索で提出。ところで高校数学の典型問題に「2変数関数の最小値は両方を平方完成してと式変形すると且つが…