答案:20312088;
#include <iostream>
#include <cstring>
#include <algorithm>
#include <queue>
using namespace std;
int mp[7000][7000];
bool vis[7000][7000];
int dx[4] = { -1, 0, 1, 0 }, dy[4] = { 0, 1, 0, -1 };
int main()
{
mp[2020][2020] = 1;
mp[4040][2031] = 1;
mp[2031][2034] = 1;
mp[4020][4020] = 1;
vis[2020][2020] = 1;
vis[4040][2031] = 1;
vis[2031][2034] = 1;
vis[4020][4020] = 1;
int ans = 4;
queue<pair<int, int>>q;
q.push({ 2020,2020 });
q.push({ 4040,2031 });
q.push({ 2031,2034 });
q.push({ 4020,4020 });
int t = 0;
int k = 4;
int m = 0;
while (q.size())
{
if (t == 2020)break;
auto [a,b]= q.front();
q.pop();
for (int i = 0; i < 4; i++)
{
int x = a + dx[i], y = b + dy[i];
if (!vis[x][y])
{
q.push({ x,y });
vis[x][y] = 1;
ans++;
m++;
}
}
k--;
if (k == 0)
{
k = m;
m = 0;
t++;
}
}
cout << ans;
return 0;
}