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


相关推荐
8Qi827 分钟前
LeetCode 23. 合并 K 个升序链表 —— 小顶堆(PriorityQueue)
数据结构·算法·leetcode·链表·
QiLinkOS1 小时前
《打破“用爱发电”:一种基于 Gitee 与时间戳的开源权益分配机制探索》
c语言·数据结构·c++·科技·算法·gitee·开源
松间听晚1 小时前
Agentic RL 环境和代码学习:以HGPO为例
算法
智者知已应修善业1 小时前
【51单片机用T0定时器方式1,实现0.5S的时间间隔实现第一次一个灯亮、第二次二个灯亮,直到全部灯亮,然后重复整个过程】2023-12-29
c++·经验分享·笔记·算法·51单片机
小许同学记录成长2 小时前
几何体编辑与布尔运算
算法·无人机
fanged2 小时前
简单看看3A算法2(TODO)
算法
智者知已应修善业2 小时前
【51单片机4位静态数码管显示1234】2023-11-14
c++·经验分享·笔记·算法·51单片机
♡すぎ♡2 小时前
镜面 IBL 预过滤贴图的计算
算法·计算机图形学·贴图·pbr
Lsk_Smion2 小时前
力扣实训 _ [200].岛屿数量
算法·leetcode·深度优先
Boom_Shu3 小时前
长方形的关系
数据结构·c++·算法