【每日一题 | 2025】3.3 ~ 3.9

在这里插入图片描述

个人主页:Guiat
归属专栏:每日一题

在这里插入图片描述

正文

1. 【3.3】10387 [蓝桥杯 2024 省 A] 训练士兵

题目链接:https://www.luogu.com.cn/problem/P10387

【AC_Code】

#include <iostream>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);

using namespace std;
using ll = long long;

const int N = 1e6 + 10;
ll n, S, p[N], c[N], cnt[N], now, sum, Sum;

void solve()
{
	cin >> n >> S;
	for (int i = 1; i <= n; i ++)
	{
		cin >> p[i] >> c[i]; cnt[c[i]] += p[i]; now += p[i]; sum += p[i] * c[i];
	}
	for (int i = 1; i <= N; i ++)
	{
		if (now < S) break;
		Sum += S; sum -= now; now -= cnt[i];
	}
	cout << Sum + sum << '\n';
}

int main()
{
	IOS; solve();
	
	return 0;
}

2. 【3.4】P8601 [蓝桥杯 2013 省 A] 剪格子

题目链接:https://www.luogu.com.cn/problem/P8601

【AC_Code】

#include <iostream>
#include <algorithm>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);

using namespace std;

int m, n, ff, a[15][15], dis[15][15], sum = 1, num = 0, b, c,
dx[5] = { 0, 1, -1, 0, 0 }, dy[5] = { 0, 0, 0, -1, 1 };

void DFS(int x, int y)
{
    if (2 * num > b) return ;
    if (b - num == num) { cout << sum; ff = 1; return ; }
    for (int i = 1; i <= 4; i ++)
    {
        int ux = x + dx[i], uy = y + dy[i];
        if (dis[ux][uy] == 0 && ux >= 1 && ux <= n && uy >= 1 && uy <= m)
        {
            dis[ux][uy] = 1; num += a[ux][uy]; sum ++;
            DFS(ux, uy);
            dis[ux][uy] = 0; num -= a[ux][uy]; sum --;
            if (ff) return ;
        }
    }	
    return ;
}

void solve()
{
    cin >> m >> n;
    for (int i = 1; i <= n; i ++) for (int j = 1; j <= m; j ++)
    {
        cin >> a[i][j]; b += a[i][j]; c = max(c, a[i][j]);
    }
    if (2 * c == b)
    {
        if (a[1][1] == c) cout << 1 << '\n';
        else cout << n * m - 1 << '\n';
        return ;
    }
    dis[1][1] = 1; num = a[1][1]; DFS(1, 1);
    if (!ff) cout << 0 << '\n';
}

int main()
{
    IOS; solve();
    
    return 0;
}

3. 【3.5】P9241 [蓝桥杯 2023 省 B] 飞机降落

题目链接:https://www.luogu.com.cn/problem/P9241

【AC_Code】

#include <iostream>
#include <algorithm>
#include <cstring>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);

using namespace std;

int t, N, T[15], D[15], L[15], a[15];

bool DFS(int deep, int time)
{
	if (deep > N) return true;
	for (int i = 1; i <= N; i ++)
	{
		if (a[i] || T[i] + D[i] < time) continue;
		a[i] = 1;
		if (DFS(deep + 1, max(time, T[i]) + L[i])) { a[i] = 0; return 1; }
		a[i] = false;
	}
	return false;
}

void solve()
{
	cin >> t;
	while (t --)
	{
		cin >> N; for (int i = 1; i <= N; i ++) cin >> T[i] >> D[i] >> L[i];
		memset(a, 0, sizeof a);
		if (DFS(1, 0)) cout << "YES\n";
		else cout << "NO\n";
	}
}

int main()
{
	IOS; int _ = 1; while(_ --) solve();
	
	return 0;
}

4. 【3.6】P10578 [蓝桥杯 2024 国 A] 旋转九宫格

题目链接:https://www.luogu.com.cn/problem/P10578

【AC_Code】

#include <iostream>
#include <queue>
#include <map>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);

using namespace std;

int T; string s, tar = "123456789"; char c;
map<string, int> mp; queue<string> q;

void BFS()
{
	q.push(tar); mp[tar] = 1;
	while (q.size())
	{
		string u = q.front(); q.pop(); string v[4] = { u, u, u, u };
		v[0][0] = u[1], v[0][1] = u[4], v[0][3] = u[0], v[0][4] = u[3];
		v[1][1] = u[2], v[1][2] = u[5], v[1][4] = u[1], v[1][5] = u[4];
		v[2][3] = u[4], v[2][4] = u[7], v[2][6] = u[3], v[2][7] = u[6];
		v[3][4] = u[5], v[3][5] = u[8], v[3][7] = u[4], v[3][8] = u[7];
		for (int i = 0; i < 4; i ++)
		{
			if (!mp[v[i]])
			{
				mp[v[i]] = mp[u] + 1;
				if (v[i] == tar) break;
				q.push(v[i]);
			}
		}
	}
}

void solve()
{
	cin >> T; BFS();
	while (T --)
	{
		s.clear();
		for (int i = 0; i < 9; i ++) cin >> c, s += c;
		cout << mp[s] - 1 << '\n';
	}
	
}

int main()
{
	IOS; solve();
	
	return 0;
}

5. 【3.7】P8642 [蓝桥杯 2016 国 AC] 路径之谜

题目链接:https://www.luogu.com.cn/problem/P8642

【AC_Code】

#include <iostream>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);

using namespace std;

const int N = 25; bool vis[N][N];
int n, a[N], b[N], dx[4] = { 0, 1, 0, -1 }, dy[4] = { 1, 0, -1, 0 }, len, ans[410];

inline void DFS(int x, int y)
{
	if (x < 1 || x > n || y < 1 || y > n || vis[x][y]) return ;
	for (int i = 1; i <= n; i ++) if (a[i] < 0 || b[i] < 0) return ;
	vis[x][y] = true; a[y] --; b[x] --; ans[++ len] = (x - 1) * n + y - 1;
	if (x == n && y == n)
	{
		for (int i = 1; i <= n; i ++)
		{
			if (a[i] != 0 || b[i] != 0) break;
			if (i == n) for (int i = 1; i <= len; i ++) cout << ans[i] << ' ';
		}
	}
	else for (int i = 0; i < 4; i ++) DFS(x + dx[i], y + dy[i]);
	a[y] ++; b[x] ++; vis[x][y] = false; len --;
}

inline void solve()
{
	cin >> n; for (int i = 1; i <= n; i ++) cin >> a[i]; for (int i = 1; i <= n; i ++) cin >> b[i];
	DFS(1, 1);
}

int main()
{
	IOS; solve(); cout << '\n';
	
	return 0;
}

6. 【3.8】P8694 [蓝桥杯 2019 国 AC] 估计人数

题目链接:https://www.luogu.com.cn/problem/P8694

【AC_Code】

#include <iostream>
#include <vector>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);

using namespace std;

const int N = 500; vector<int> g[N]; char c;
int n, m, sum, len, vis[N], f[N][N], M[N];
struct node { int x, y; } p[N];

void add(int a, int b) { g[a].push_back(b); g[b].push_back(a); }

bool go(int a)
{
	for (auto n : g[a])
	{
		if (vis[n]) continue;
		vis[n] = 1;
		if ( !M[n] || go(M[n]) ) { M[n] = a; return true; }
	}
	return false;
}

void solve()
{
	cin >> n >> m;
	for (int i = 1; i <= n; i ++) for (int j = 1; j <= m; j ++)
	{
		cin >> c; if (c == '1') p[++ len] = { i, j };
	}
	for (int i = 1; i <= len; i ++) for (int j = i + 1; j <= len; j ++)
	{
		if
		(
			p[i].x == p[j].x && p[i].y + 1 == p[j].y
			||
			p[i].x + 1 == p[j].x && p[i].y == p[j].y
		) f[i][j] = 1;
	}
	for (int k = 1; k <= len; k ++) for (int i = 1; i <= len; i ++) for (int j = 1; j <= len; j ++)
	{
		f[i][j] |= (f[i][k] & f[k][j]);
	}
	for (int i = 1; i <= len; i ++) for (int j = i + 1; j <= len; j ++) if (f[i][j]) add(i, j + len);
	for (int i = 1; i <= len; i ++)
	{
		fill(vis, vis + 1 + len * 2, 0); if (go(i)) sum ++;
	}
	cout << len - sum << '\n';
}

int main()
{
	IOS; solve();
	
	return 0;
}

7. 【3.9】数字接龙

题目链接:https://www.lanqiao.cn/problems/19712/learning/?page=1&first_category_id=1&name=%E6%95%B0%E5%AD%97%E6%8E%A5%E9%BE%99

【AC_Code】

#include <iostream>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);

using namespace std;

const int N = 15;
int n, k, nums[N][N],
dx[8] = { -1, -1, 0, 1, 1, 1, 0, -1 },
dy[8] = { 0, 1, 1, 1, 0, -1, -1, -1 };
string nber; bool vis[N][N], check[N][N][N][N];

bool dfs(int a, int b)
{
	if (a == n - 1 && b == n - 1) return nber.size() == n * n - 1;
	vis[a][b] = true;
	for (int i = 0; i < 8; i ++)
	{
		int x = a + dx[i], y = b + dy[i];
		if (x < 0 || x >= n || y < 0 || y >= n) continue;
		if (vis[x][y]) continue;
		if (nums[x][y] != (nums[a][b] + 1) % k) continue;
		if (i % 2 && (check[a][y][x][b] || check[x][b][a][y])) continue;
		check[a][b][x][y] = true; nber += i + '0';
		if (dfs(x, y)) return true;
		nber.pop_back(); check[a][b][x][y] = false;
	}
	vis[a][b] = false;
	return false;
}

void solve()
{
	cin >> n >> k;
	for (int i = 0; i < n; i ++) for (int j = 0; j < n; j ++) cin >> nums[i][j];
	if (!dfs(0, 0)) cout << -1 << '\n';
	else cout << nber << '\n';
}

int main()
{
	IOS; solve();
	
	return 0;
}

结语
感谢您的阅读!期待您的一键三连!欢迎指正!

在这里插入图片描述

基于TROPOMI高光谱遥感仪器获取的大气成分观测资料,本研究聚焦于大气污染物一氧化氮(NO₂)的空间分布与浓度定量反演问题。NO₂作为影响空气质量的关键指标,其精确监测对环境保护与大气科学研究具有显著价值。当前,利用卫星遥感数据结合先进算法实现NO₂浓度的高精度反演已成为该领域的重要研究方向。 本研究构建了一套以深度学习为核心的技术框架,整合了来自TROPOMI仪器的光谱辐射信息、观测几何参数以及辅助气象数据,形成多维度特征数据集。该数据集充分融合了不同来源的观测信息,为深入解析大气中NO₂的时空变化规律提供了数据基础,有助于提升反演模型的准确性与环境预测的可靠性。 在模型架构方面,项目设计了一种多分支神经网络,用于分别处理光谱特征与气象特征等多模态数据。各分支通过独立学习提取代表性特征,并在深层网络中进行特征融合,从而综合利用不同数据的互补信息,显著提高了NO₂浓度反演的整体精度。这种多源信息融合策略有效增强了模型对复杂大气环境的表征能力。 研究过程涵盖了系统的数据处理流程。前期预处理包括辐射定标、噪声抑制及数据标准化等步骤,以保障输入特征的质量与一致性;后期处理则涉及模型输出的物理量转换与结果验证,确保反演结果符合实际大气浓度范围,提升数据的实用价值。 此外,本研究进一步对不同功能区域(如城市建成区、工业带、郊区及自然背景区)的NO₂浓度分布进行了对比分析,揭示了人类活动与污染物空间格局的关联性。相关结论可为区域环境规划、污染管控政策的制定提供科学依据,助力大气环境治理与公共健康保护。 综上所述,本研究通过融合TROPOMI高光谱数据与多模态特征深度学习技术,发展了一套高效、准确的大气NO₂浓度遥感反演方法,不仅提升了卫星大气监测的技术水平,也为环境管理与决策支持提供了重要的技术工具。 资源来源于网络分享,仅用于学习交流使用,请勿用于商业,如有侵权请联系我删除!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

【Air】

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值