【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同样带来许多挑战,比如不实信息的扩散和版权保护议题。因此,如何去加强。管理当推动科技进步已经成为重要的研究主题。


相关推荐
2601_954526753 小时前
【工业传感与算法实战】温漂补偿与零点抗漂破局:基于二阶多项式拟合的 C/C++ 边缘校准算法,深度拆解“压力变送器什么牌子好”的技术硬指标
c语言·c++·算法
叩码以求索4 小时前
浅谈:算法萌新如何高效刷题应对面试(一)
算法·面试·职场和发展
c238566 小时前
把 C++ 内存分配拆透:new 与 malloc 的三层血缘
开发语言·c++·算法
aaaameliaaa7 小时前
指针之总结
c语言·笔记·算法
宵时待雨7 小时前
优选算法专题9:哈希表
数据结构·算法·散列表
txzrxz7 小时前
最短路问题——Dijkstra 算法
数据结构·c++·算法·最短路·优先队列
gwf2167 小时前
磨损均衡算法(Wear Leveling)——SSD如何让每块闪存“公平退休“?
运维·数据库·人工智能·python·嵌入式硬件·算法·智能硬件
noipp8 小时前
推荐题目:洛谷 P6231 [JSOI2013] 公交系统
c语言·数据结构·c++·算法·游戏·洛谷·luogu
c238568 小时前
C/C++每日一练6
c语言·c++·算法
AI小码8 小时前
把动作「画」给视频世界模型,跨本体双向推演,李飞飞参与
大数据·人工智能·算法·ai·大模型·音视频·编程