【day60】

  有n(2≤n≤20)块芯片,有好有坏,已知好芯片比坏芯片多。

  每个芯片都能用来测试其他芯片。用好芯片测试其他芯片时,能正确给出被测试芯片是好还是坏。而用坏芯片测试其他芯片时,会随机给出好或是坏的测试结果(即此结果与被测试芯片实际的好坏无关)。

  给出所有芯片的测试结果,问哪些芯片是好芯片。

cpp 复制代码
#include<iostream>
#include<vector>
using namespace std;
vector<int>ans;
int n;
int a[20][20];
bool found;
bool rightchip(int row) {
	if (ans.empty())return true;
	for (int i = 0; i < n; i++) {
			if (a[ans[0]][i] != a[row][i])return false;
	}
	return true;
}
void dfs(int cur,int target) {
	if (found)return;
	if (target == 0) {
		for (int c : ans)cout << c+1 << " ";
		cout << endl;
		found = true;
		return;
	}
	//1、剩余的芯片小于还需要达成的目标数
	//2、最后一块芯片已经检查完了
	if (n - cur < target || cur == n)return;
	//不选
	if (!found)dfs(cur + 1, target);
	//选
	if (rightchip(cur)) {
		ans.push_back(cur);
		dfs(cur + 1, target - 1);
		ans.pop_back();
	}
}
int main() {
	cin >> n;
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			cin >> a[i][j];
		}
	}
	for (int i = n; i > n / 2; i--) {
		ans.clear();
		found = false;
		dfs(0, i);
		if (found)break;
	}
	return 0;
}

Generative artificial intelligence refers to a class of AI technologies that can generate new content such as text, images, and audio. Unlike traditional discriminative models, generative models learn the distribution of data and produce new samples based on learned patterns. In recent years, with the advancement of deep learning techniques, generative models have achieved significant progress in many fields. For instance, generative adversarial networks and large language models are capable of producing high-quality images and natural language text. These technologies have broad application prospects in areas such as content creation, intelligent assistants, and virtual reality. However, generative AI also introduces challenges such as the spread of misinformation and copyright protection issues. Therefore, how to strengthen regulation while promoting technological development has become an important research topic.

生成式人工智能是AI科技的一种分类,能生成新内容,比如文本、图像和音频。与传统分类模型不同,生成式模型学习数据的分布情况,然后生成以已学习的模式为基础的新样本。在近些年,随着深度学习技术的进步,生成式模型在许多领域已达到非凡的成就。生成式对抗网络和大型语言模型能生成高质量图像和自然语言文本。这些技术拓宽了许多领域的应用前景,比如文本创造、智能助手和虚拟现实。生成式AI同样带来许多挑战,比如不实信息的扩散和版权保护议题。因此,如何去加强。管理当推动科技进步已经成为重要的研究主题。


相关推荐
residual_fan40 分钟前
持续对比强化学习(Continual Contrastive Reinforcement Learning)论文分享
人工智能·算法·数据挖掘·数据分析
s_w.h1 小时前
【 计网 】序列化与反序列化
linux·服务器·网络·算法·bash
信奥卷王1 小时前
2025年09月GESPC++五级真题解析(含视频)
算法
白狐_7981 小时前
408 数据结构|外部排序:流程与 k 路归并
数据结构·算法
闻缺陷则喜何志丹1 小时前
【动态规划】P3609 [USACO17JAN] Hoof, Paper, Scissor G
c++·算法·动态规划·洛谷
leihefeng2 小时前
手写数字识别:KNN vs 逻辑回归实战
python·算法·机器学习·逻辑回归·scikit-learn
全栈技术负责人2 小时前
DeepSeek Harness 业务工具权限插件 dsh-tool-permission设计思路
网络·算法·ai·ai编程
mmmmath_33 小时前
面试题 02.07. 链表相交
算法·链表
residual_fan3 小时前
特征级SMOTE(Feature-level SMOTE)论文分享
人工智能·算法·数据挖掘·数据分析
xxwxx__3 小时前
深入理解 C++ STL:stack、queue 与 deque 从使用到底层实现全解析
开发语言·c++·算法