NOJ1091Black Vienna——人工智能?No...No...No...二分+枚举

基于 Quest 摄像头数据开发的原理介绍【Unity Meta Quest MR 开发教程】 比如想在识别到的现实物体上叠加虚拟物体,需要知道这个现实物体在 Unity 的世界坐标下的哪个位置,是带有 x,y,z 三个轴的数据的。而 WebCamTexture 捕捉到的图像只是个 2D 的平面,没有三维世界的深度信息,我们通过物体识别算法识别到的物体坐标只是在这个 2D 平面上的一个屏幕坐标,可以理解为 Quest 拍摄了一张照片,我们识别到这张照片上的某个像素点为需要识别的现实物体的中心。是不是看起来比较复杂?Quest 的相机访问功能是在安卓的。 阅读详情

Black Vienna

时间限制(普通/Java):1000MS/3000MS          运行内存限制:65536KByte
总提交:49            测试通过:14

描述

This problem is based on the game of Black Vienna. In this version there are three players and 18 cards labeled A-R. Three of the cards are set aside (hidden) and form the "Black Vienna" gang. The remaining cards are shuffled and dealt to the players so that each player has 5 cards. Players never reveal their cards to each other. There is a separate deck of "interrogation cards" which contain three distinct letters in ascending order, like ACG or BHR.  Turns rotate through players 1, 2, and 3.  On each player's turn, that player selects an interrogation card, puts it face up in front of another player, and that other player must indicate the total number of these cards being held, without saying which ones.  All players see the result of the "interrogation". The play continues until a player deduces the three cards in the "gang".     
For example, suppose the cards are distributed as follows, and the game then proceeds:
Player 1: DGJLP; Player 2: EFOQR; Player 3: ACHMN;  Gang: BIK
Turn 1:  Player 1 interrogates player 2 with BJK; answer 0
Turn 2:  Player 2 interrogates player 3 with ABK; answer 1
Turn 3:  Player 3 interrogates player 2 with DEF; answer 2
Turn 4:  Player 1 interrogates player 2 with EIL; answer 1
Turn 5:  Player 2 interrogates player 3 with FIP; answer 0
Turn 6:  Player 3 interrogates player 1 with GMO; answer 1
Turn 7:  Player 1 interrogates player 2 with OQR; answer 3
Turn 8:  Player 2 interrogates player 3 with ADQ; answer 1
Turn 9:  Player 3 interrogates player 1 with EGJ; answer 2
In fact, the game does not need to get to turn 9.  With enough thought, player 1 can deduce after turn 8 that the gang is BIK.  It is your job to analyze records of games and deduce the earliest time that the gang could be determined for sure.

输入

The input will consist of one to twelve data sets, followed by a line containing only 0.   
The first line of a dataset contains the number, t, of turns reported, 2 ≤ t ≤ 15.  
The next line contains four blank separated strings for the hands of players 1, 2, and 3, followed by the cards for the gang.
The remaining t lines of the data set contain the data for each turn in order.  Each line contains three blank separated tokens:  the number of the player interrogated, the string of interrogation letters, and the answer provided.
All letter strings will contain only capital letters from A to R, in strictly increasing alphabetical order.  The same interrogation string may appear in more than one turn of a game.

输出

There is one line of output for each data set.  The line contains the single character "?" if no player can be sure of the gang after all the turns listed.  If a player can determine the gang, the line contains the earliest turn after which one or more players can be sure of the answer.

样例输入

9
DGJLP EFOQR ACHMN BIK
2 BJK 0
3 ABK 1
2 DEF 2
2 EIL 1
3 FIP 0
1 GMO 1
2 OQR 3
3 ADQ 1
1 EGJ 2
3
ABCDE FGHIJ KLMNO PQR
3 BKQ 1
1 ADE 3
2 CHJ 2
0

样例输出

8
?

题目来源

ACM Mid-Central Regional 2009


分析:很好的一道题目。解决了就像人工智能一样。其实细细想想就是枚举。至于更加简洁就是加上了二分法减小复杂度。

具体题解(引用自《ACM国际大学生程序设计竞赛题目与解读》)

>>>>>>>>>>

for each player
枚举3张gang,继续枚举另外2人手里的牌。
只要其中任意一种情况满足询问及答案,那么那3张gang就是可能的,
如果桌上那三张牌有且只有1种可能,则该player能确定gang。

总的复杂度:O(logN*3*C(13,3)*C(10,5)*N)
(N为询问次数)
**************************

#include<iostream>
using namespace std;
#define MAX(x, y) (x) > (y) ? (x) : (y)

const int PLAYERS = 3, MAX_TURNS = 15, HAND = 5, HID = 3, UNK = HID+HAND*(PLAYERS-1); // 13
int turns;

char quest[MAX_TURNS][3+1], // 每次询问的3张牌
	 hand[PLAYERS + 1][5+1], // 实际每人(0 1 2)的牌,hand[3][]代表gang
	 maybe[PLAYERS + 1][HAND+1]; // 枚举另外2个人每人的5张牌和gang的3张牌

char notHave[UNK]; // letters not in one player's hand 某一位玩家没有的13张牌
int who[MAX_TURNS],  // 被询问的人
	matches[MAX_TURNS], // 匹配数
	used[PLAYERS+1]; // amount of maybe hand filled
int solved;  // max turns needed for current player for comb. so far

void solve(int i,char unk[]);
int countConsistent(char choice[][HAND+1]);
int countDups(char a1[],char a2[]);

int main()
{
	//freopen("in.txt","r",stdin);
	int i,j;
	int bestSolved;
	while(scanf("%d",&turns)!=EOF && turns>0)
	{
		for(i=0;i<=PLAYERS;i++)
			scanf("%s",&hand[i]); // 每人实际的牌 + gang(hand[3][])
		int t;
		for(t=0;t<turns;t++)
		{
			scanf("%d",&who[t]); // 1 2 3 
			who[t]--;  // internal 0 based
			scanf("%s",&quest[t]);
			scanf("%d",&matches[t]);
		}
		bestSolved=MAX_TURNS; // 15
		int p;
		char notHave[18-5+1]; // 某位玩家没有的13张牌
		for(p=0;p<PLAYERS;p++) // 对每一位玩家判断
		{
			memset(notHave,'\0',sizeof(notHave));
			for(j=0;j<=PLAYERS;j++){
				if(j!=p)
					strcat(notHave, hand[j]); // 构造玩家p没有的13张牌赋给notHave[]
			}
			strcpy(maybe[p],hand[p]); // player knows own 玩家p知道的牌的情况,自己的肯定是知道的,其他的需要枚举 !!!
			used[p] = HAND; // used[j] = 5/3表示玩家j或者gang(0 1 2 3 4 / 0 1 2)的牌已经确定(这里自己的牌显然是确定的)
			solved = 0; // after recursion max turns to eliminate a maybe 递归最大化消除枚举的错误的可能

			solve(0, notHave); // 判断,如果成功将改变solved的值

			memset(maybe[p],'\0',sizeof(maybe[p]));
			used[p]=0;
			if(solved<bestSolved)
				bestSolved=solved;
		}
		if(bestSolved<turns)
			printf("%d\n",bestSolved+1);
		else
			printf("?\n");
	}

	return 0;
}

// accumulate combinations recursively, check when one is complete
void solve(int i,char notHave[])
{
	if(i == (18-5)){ // p玩家没有的13张牌都已经枚举了,判断是否有且只有一种情况满足条件
		if (maybe[PLAYERS][0] == notHave[i-3]) return; //match end gang char // maybe[3][0] == notHave[i-3](gang!) 最后才成功了
		solved = MAX(solved, countConsistent(maybe)); // MAX!!! 这里会多次运行,注意这里的return先后顺序
	}
	else{
		int j;
		for(j=0;j<=PLAYERS;j++){ // 枚举上场!
			if((j<PLAYERS && used[j]<5) || (j==PLAYERS && used[j]<3)){ //add char to partial hand 枚举另外2个人和gang
				//used[j] 代表第几张牌(players:0 1 2 3 4 / gang:0 1 2)
				maybe[j][used[j]] = notHave[i];
				used[j]++;
				solve(i+1, notHave);
				used[j]--; // undo change before trying next player
			}
		}
	}
}

// return first inconsistent turn (0 based) or total turns if consistent
int countConsistent(char maybe[][HAND+1])
{
	int t=0;
	while(t<turns &&
		countDups(maybe[who[t]],quest[t]) == matches[t]) // 符合询问
		t++;
	return t;
}

int countDups(char a1[],char a2[]) // who[t]玩家的5张牌与询问的3张牌判断是否等于询问中的匹配数match[t]
{
	int i,j;
	int n=0;
	for(i=0;i<5;i++){
		for(j=0;j<3;j++)
			if(a1[i]==a2[j])
				n++;
	}
	return n;
}


将Python爬取的数据导入钉钉多维表 摘要:本文介绍将Python爬取的数据导入钉钉多维表的完整解决方案。首先通过requests库爬取数据并解析为结构化格式,然后使用钉钉开放平台API对接多维表。关键步骤包括获取app_key、app_secret等凭证,通过OAuth2获取access_token,以及批量写入记录。文章详细说明了参数获取位置、字段类型匹配、权限配置等注意事项,并提供了错误处理建议和性能优化方法。适用于需要将网络数据同步到钉钉多维表的开发场景。 阅读详情

相关推荐

华为防火墙USG6600全流量日志配置指南:从流量监控到NAT日志的完整方案

本文详细介绍了华为USG6600防火墙全流量日志配置方案,涵盖流量监控、NAT日志及安全事件溯源等核心功能。通过精细化配置和性能优化技巧,帮助企业构建高效、合规的日志体系,提升网络安全运维效率。文章特别强调了日志采样与字段过滤的实用方法,适用于高流量环境下的资源优化。

gin88的博客 348

【人工智能】— 贝叶斯网络、概率图模型、全局语义、因果链、朴素贝叶斯模型、枚举推理、变量消元

图模型是概率分布的图表表示。它是概率论和图论的结合。也被称为概率图模型(Probabilistic Graphical Models)。它们增强了分析,而不是使用纯代数。

我们都是被分成两半的人,一边热爱生活,一边憎恨生活。面对生活,我们总是在矛盾的两端摇摆,在反复的矛盾和犹豫中,一边踉跄前行,一边重振旗鼓。我渴望改变,渴望变得更好,渴望找到出口……就像一个溺水人的挣扎,就像一个救生圈。我是一个矛盾集合体,想要变得快乐,但是 4601

直流无刷减速电机选型指南:从KV值到霍尔传感器,新手必看的5个关键参数

本文详细解析直流无刷减速电机选型的5个关键参数,包括KV值、转矩、电流与功率、减速比选择以及霍尔传感器配置。通过实战案例和避坑策略,帮助工程师精准匹配电机性能与负载需求,提升工业自动化设备的可靠性和效率。特别强调霍尔传感器在精准控制中的关键作用。

alice7model的博客 620

人工智能的常用十种算法

人工智能的常用十种算法

qq_45357758的博客 150

Agent 操作系统:未来的 Harness 平台

在大模型技术爆发的当下,自主智能体(Agent)已经成为AI原生应用的核心载体,但当前Agent开发面临着碎片化严重、运维难度高、规模化落地难三大核心痛点,就像1970年代没有通用操作系统的裸机编程时代,开发者需要重复造轮子解决底层基础设施问题。本文将深度解析Agent操作系统(Agent OS)作为AI原生时代的底层基础设施的核心定位,以及下一代Harness平台如何将Agent OS与成熟的DevOps、CI/CD、可观测性、成本管理能力深度融合,成为AI原生应用全生命周期管理的统一平台。

软件工程实践的博客 278

微型纵向加密在新能源场站中的实战部署与运维避坑指南

本文详细解析了微型纵向加密在新能源场站中的实战部署与运维技巧。通过国密算法SM4实现数据加密,确保新能源场站通信安全,同时提供非侵入式部署方案和运维避坑指南,帮助提升网络稳定性和运维效率。

weixin_30505225的博客 596

西工大--人工智能程序设计noj--前60道

西工大-人工智能程序设计noj-前60道-2022-秋

weixin_52999035的博客 3923

使用Python爬虫抓取政府网站政务信息:公告、通知的自动化抓取与分析

通过结合Requests、BeautifulSoup、Selenium等技术,你能够高效地抓取政府网站的数据,并通过MySQL存储与Pandas分析这些数据。通过自动化手段抓取这些信息,不仅可以提高数据收集的效率,还能够实时获取最新的政务动态,为政策研究、舆情分析等提供宝贵数据。我们将通过Python的Requests、BeautifulSoup、Selenium等工具,结合最新的技术实现一个完整的爬虫系统,帮助你轻松抓取并分析政务信息。通过爬虫,我们可以自动化地从指定网站上抓取公告、新闻、通知等信息。

2201_76125261的博客 1907

西北工业大学NOJ Python程序设计作业 Python快速入门100题(西北工业大学noj)

前言 由于大三下课程少,修不够15学分,所以选了个python(3学分)来凑学分。恰好1月赶上了疫情,网课期间课也比较少,所以准备把NOJ上的100个题快速过一遍,然后更新一份题解。 不过由于做题的时候比较水,写一份代码就直接提交了,所以有些题WA了好几次,不过也有些确确实实是题意有问题或者数据有点问题。 做完NOJ上的Python程序设计100题大约花了2天多的时间(1.17和1.18,1.19凌晨12:10写完最后一题) NOJ提交情况和运行时间: NOJ-Python程序设计 题解 待更新,稍等。

Phoenix_ZengHao的博客 6761

HFSS实战项目——Ku波段微带发夹线滤波器

保姆级教程!!!看完必会,非常详细!!!Ku频段5阶切比雪夫微带线带通滤波器的仿真实例。首先介绍了滤波器的技术指标和基本理论知识,重点介绍了滤波器的耦合系数和外部品质因数。建立了谐振器的设计模型、耦合系数与谐振器间距的设计模型、外部品质因数与抽头位置的设计模型和滤波器整体电路的模型。详细介绍了谐振器设计模型的建立步骤。

2401_87464239的博客 3041

YOLOv12改进策略【卷积层】| CVPR-2020 利用DynamicConv 动态卷积 结合A2C2f进行二次创新,提高精度

在大规模视觉预训练中,通常模型的性能受到数据、参数和FLOP三个关键因素的影响。一般来说,模型的参数数量越多,FLOP也越高,但在移动设备等对计算资源有限制的场景下,需要低FLOP的模型同时又希望模型能从大规模预训练中受益。传统的方法很难在增加参数的同时保持低FLOP,因此需要一种新的设计来解决这个问题,模块应运而生。

Limiiiing的博客 827

1091-Black Vienna

描述 This problem is based on the game of Black Vienna. In this version there are three players and 18 cards labeled A-R. Three of the cards are set aside (hidden) and form the "Black Vienna" gang. The...

weixin_30706507的博客 213

mediasoup源码分析(二十)服务端架构设计

目录 简介 信令服务(房间服务) 调度服务 媒体服务 简介 流媒体服务器大的方向上可以分为上述三个模块。目前行业内都是分布式服务,独立部署。mediasoup信令与媒体之间虽然可以管道通信。但在行业内,服务之间通过管道通信用的少。 一般是rpc、mq,或者传统的tcp。这块licode架构比较不错,licode是信令和媒体服务通过MQ消息队列解耦。 下面介绍一下这三个服务主要功能,当然文中所说也是一家之言。 信令服务(房间服务) 信令服务也称为房间服务。有的企业把信令和房间分开,信..

lcalqf的专栏 1545

人工智能基础知识点总结2

人工智能基础笔记2

m0_55884698的博客 972

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

南邮 OJ 1091 Black Vienna

Black Vienna 时间限制(普通/Java) : 1000 MS/ 3000 MS          运行内存限制 : 65536 KByte 总提交 : 53            测试通过 : 17  比赛描述 This problem is based on the game of Black Vienna. In this version there are

呈凹的博客 548

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

人工智能程序设计

这里写自定义目录标题人工智能编程新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入 人工智能编程 人工智能编程侧重于三种认知技能: • 学习 • 推理 • 自我纠正 学习过程 AI编程的这一方面着重于获取数据,并创建有关如何将

IT_Beijing_BIT的博客 2739

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

人工智能程序设计(Visual Prolog) 学习笔记

       Visual Prolog支持基于网络的开发、数据库、多媒体、与C语言集成等。具有模式匹配、递归、回溯、对象机制、事实数据库和谓词库等强大功能。非常适合于专家系统、规划和其他AI相关问题的求解。Ch1 Prolog基础       目标子句(goal clause)、事实(facts)、规则(rules)合起来称为Horn子句,因而得名Horn子句逻辑。       Pr

行风 1万+

人工智能基础复习3——知识与推理

07 Logical agents 一些建模范式 - 基于状态的模型:搜索问题,博弈     - 应用:路径搜索,玩游戏等     - 考虑状态、行动和代价 - 基于变量的模型:CSPs,贝叶斯网络     - 应用:调度、医疗诊断等     - 考虑状态和潜力 - 基于逻辑的模型: 命题逻辑、一阶逻辑     - 应用:定理证明、验证、推理     - 考虑逻辑公式和推理规则

Bonjour~ 1万+

什么是枚举,及枚举的特点

定义枚举类要用关键字enum 所有枚举类都是Enum的子类 枚举类的第一行上必须是枚举项,最后一个枚举项后的分号是可以省略的,但是如果枚举类有其他的东西,这个分号就不能省略。建议不要省略。 每个枚举项都是该枚举类的对象! 枚举每个都是静态常量,不允许其他修饰符修饰 枚举类可以有构造方法,但必须是private的,它默认的也是private的。 如果是空参构造,那么枚举项后可以省略(),也可以带上括号 如果是有参构造,那么枚举项后()里面可以加参数; 如果枚举类中有且仅有一个构造方法,还是..

CV_Ming的博客 1113

GYM 101128 B.Black Vienna(并查集)

Description 有A~Z这26张牌,现在从中抽出三张并把剩余23张分给选手1和2,现在有n次查询,每次询问一个选手是否有某两张牌,和选手的回答,回答是说自己有这两张牌中的几张,问拿出的三张牌有多少种方案能够满足这n个条件 Input 第一行一整数n表示查询数,每组查询输入两个字符表示要查询的两张牌,以及要查询的选手编号(1or2),以及选手的回答(0,1,2)表示这两张牌手里有多少张(

ZSQ 841

计算二叉树的高度和结点数

计算二叉树的高度和结点数 时间限制(普通/Java):1000MS/3000MS          运行内存限制:65536KByte 总提交:738            测试通过:220 描述 二叉树是非常重要的树形数据结构,根据该树的先序、中序或后序遍历序列可以建立一棵二叉树。例如输入先序遍历序列A B # D # # C E # # F # #可以建立图1019-1所示的二叉树

我的博客 8858

哈夫曼编码与译码

哈夫曼编码与译码 时间限制(普通/Java):1000MS/3000MS          运行内存限制:65536KByte 总提交:386            测试通过:141 描述 已知电文包括的字符集为{A,C,I,M,N,P,T,U},输入对应权值,对字符集合进行哈夫曼编码,完成电文的哈夫曼编码与译码工作。 输入 共三行: 第一行为对应

我的博客 3899

二叉树复制和左右子树互换

二叉树复制和左右子树互换 时间限制(普通/Java):1000MS/3000MS          运行内存限制:65536KByte 总提交:301            测试通过:193 描述 二叉树是非常重要的树形数据结构。复制一棵二叉树是在另一个存储区存放相同的结构和内容,而一棵二叉树上所有左右子树互换是在原存储区上的运算。   请分别根据先序遍历序列建立两棵的二叉树(

我的博客 3094

五位以内的对称素数

五位以内的对称素数 时间限制(普通/Java):1000MS/3000MS          运行内存限制:65536KByte 总提交:1758            测试通过:382 描述 判断一个数是否为对称且不大于五位数的素数。 输入 输入数据含有不多于50个的正整数(0。 输出 对于每个n,如果该数是不大于五位数的对称素数,则输出“Yes”,否则输出“No”。每个判断

我的博客 2630

ACM 多项式加法

多项式加法 时间限制(普通/Java):1000MS/3000MS          运行内存限制:65536KByte 总提交:1458            测试通过:152 描述 线性表是一种最简单、最基本,也是最常用的数据结构,其用途十分广泛,例如,用带表头结点的单链表求解一元整系数多项式加法和乘法运算。 现给两个一元整系数多项式,请求解两者之和。 输入 两组数据

我的博客 1943

NOJ1051最短路径——计算几何+枚举+边与矩形判断+最短路径

最短路径 时间限制(普通/Java):1000MS/3000MS          运行内存限制:65536KByte 总提交:49            测试通过:14 描述 在一些美国主要城市里,为企业传送文件和小物品的自行车快递长期以来就是流动运输服务的一部分。波士顿的骑车人是不同寻常的一族。他们以超速、不遵守单行道和红绿灯、无视汽车、出租、公交和行人的存在而臭名远扬。快递服务竞

我的博客 1607
上一篇: NOJ1090Rock, Paper, Scissors——水题
下一篇: NOJ1092圆柱体的表面积——水题
tcherry
博客等级 码龄16年 46粉丝 161原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值