I didn't know the formula until after the game 256 ride 1024 ride 1024 ride 8 divide 32, Tear avalanche ==
#include<bits/stdc++.h> using namespace std; int num[10]; bool check(int n) {
while(n>0) { if(num[n%10]==0) return false; num[n%10]--; n/=10; } return true; }
int main() { fill(num,num+10,2021); for(int i=1;1;i++) { if(!check(i)) { cout<<i
-1<<endl; return 0; } } return 0; }
Answer note minus 1, Tear avalanche

The straight line formula is used in the competition kx+b of k and b Saved it , However, very unfriendly floating-point numbers , Woo woo , Questions to be completed

The weak do not deserve to speak , Notes only
#include<bits/stdc++.h> using namespace std; long long num=2021041820210418;
long long yin[100000005]; int cnt=0; int main() { int j=0; for(long long i=1;i<=
sqrt(num);i++) { if(num%i==0) { yin[j++]=i; yin[j++]=num/i; // Pay attention to this step , Didn't notice during the game , I am weak
} } for(int i=0;i<j;i++) for(int n1=0;n1<j;n1++) for(int n2=0;n2<j;n2++)
// Easy to see , Length, width and height must be the multiplication of factors , Factor only 128 individual ,3 Re cycling is simple { if(yin[i]*yin[n1]*yin[n2]==num) { cnt++
; } } cout<<cnt<<endl; }

#include<bits/stdc++.h> #define INF 2147483647 using namespace std; const int
maxn= 1e4 + 5; const int inf = 0x3f3f3f3f; bool vis[maxn]; int dis[maxn]; int c1
, c2; struct node { int u, w; //u Is the starting point ,w Value , with vector The subscript of the array is used as the starting point node(int x, int y):u
(x), w(y) {} bool operator < (const node& r)const // Operator reset , Used to make the priority queue press w The values of are listed from small to large {
return w > r.w; } }; vector<node>e[maxn]; void add_edge(int u, int v, int w) { e
[u].push_back(node(v, w)); } void dij(int st) //st Is the starting point , Shortest path template { fill(vis, vis +
maxn, false); //fill Functions are similar to memset, however memset Is used to set ascii Code fill(dis, dis + maxn, inf);
priority_queue<node>pque; dis[st] = 0; pque.push(node(st, 0)); while (!pque.
empty()) { node t = pque.top(); pque.pop(); int u = t.u; if (vis[u]) continue;
vis[u] = true; for (int i = 0; i < e[u].size(); i++) { int v = e[u][i].u;
// Press the minimum edge into the priority queue each time int w = e[u][i].w; if (!vis[v] && dis[v] > dis[u] + w) { dis[v]
= dis[u] + w; pque.push(node(v, dis[v])); } } } } int main() { for (int i = 1; i
< 2021; i++) for(int j = i+1; j-i <= 21&&j<=2021 ; j++) { add_edge(i , j , i/
__gcd(i,j)*j); // Calculation formula of least common multiple add_edge(j , i , i/__gcd(i,j)*j); } dij(1); cout<<
dis[2021]<<endl; }

Technology