#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int a,b;
scanf("%d%d",&a,&b);
a=max(a,b);
if(a==1)
printf("1/1\n");
else if(a==2)
printf("5/6\n");
else if(a==3)
printf("2/3\n");
else if(a==4)
printf("1/2\n");
else if(a==5)
printf("1/3\n");
else if(a==6)
printf("1/6\n");
return 0;
}相关推荐
从驱动编译到数据传输:RK3588与FPGA的PCIe通信实战解析
本文详细解析了RK3588与FPGA通过PCIe通信的实战过程,涵盖驱动编译、数据传输及性能优化等关键步骤。通过XDMA驱动实现高效DMA传输,适用于视频处理、数据采集等高性能场景,帮助开发者快速掌握嵌入式系统中的PCIe通信技术。
算法成长之路------CF9A Die Roll
学习目标:算法学习-Day9 题库: 洛谷题库 每天保持发布一篇Java或C算法题解! 题目: 小Y,小W和小D进行扔骰子(六面)游戏,谁投出的点数最大算谁胜利,现在已知小Y和小W的得分,请你帮小D求出她获胜的概率 注意: 1.以"分子/分母"输出,特别的,若不可能获胜输出"0/1",100%获胜输出"1/1" 2.小Y和小W非常绅士,如果小D的得分和他们一样,他们也会算作小D获胜 样例 1 : 输入: 4 2 输出: 1/2 思路: 小D获胜的情况有两种: 1.掷骰子的点数大于小Y和小W 2
树莓派5安装ROS2小白指南避坑攻略
手把手教你如何在树莓派5上顺利安装ROS2,避开常见问题与陷阱,提升配置效率。针对树莓派5安装ros2过程中的依赖冲突、源配置错误等高频难题提供解决方案,适合新手快速上手。
A. Die Roll
time limit per test 1 second memory limit per test 64 megabytes input standard input output standard output Yakko, Wakko and Dot, world-famous animaniacs, decided to rest fro
新装Win10/Win11后VMware虚拟机连不上网?手把手教你排查‘网络信息不可用’(从服务检查到网段配置)
本文详细介绍了在Windows 10/11系统上安装VMware Workstation后虚拟机无法联网的排查方法。从检查VMware NAT Service、DHCP Service等关键服务状态,到重置虚拟网络编辑器配置,再到内核设备驱动问题解决,手把手教你解决‘网络信息不可用’问题。特别针对VMCI驱动故障提供了实用解决方案,帮助用户快速恢复虚拟机网络连接。
FAST_LIO_ROS2 可以用gazebo仿真吗?
摘要:FAST_LIO_ROS2可与Gazebo仿真环境兼容,通过订阅Gazebo模拟的激光雷达和IMU数据实现SLAM建图。已有开源项目(如pb_rm_simulation)验证了该方案,支持导航模式切换与真实机器人移植。关键步骤包括环境配置、传感器话题匹配及参数调试,需注意版本兼容性与数据噪声处理。相关教程提供了从环境搭建到三维建图的完整流程。
CF 2023/4/1
现在鲍勃不得不邮寄他的照片,但由于世界经济危机和高油价,他想寄出他的作品,但要尽可能少花钱。Yakko,Wakko和Dot,世界着名的动漫狂人,决定休息一下演动画片,请假去旅行一下。这就是为什么最聪明的Yakko想出了一个真正天才的想法:让三人每人掷出一个普通的六面骰子,得分最高的那个将成为赢家,并将其他两个带到他/她梦想的地方。以“A/B”格式的不可约分数的形式输出所需的概率,其中 A — 分子,B — 分母。众所周知,雅子和华子是真正的绅士,这就是为什么如果他们与多特有相同的积分,他们就会让多特获胜。
零基础入门simulink1000例--第112例:在 Simulink 中构建一个基本的相控阵雷达波束形成系统仿真模型
摘要:本文详细介绍了使用Simulink实现相控阵雷达波束形成技术的完整流程。从创建Simulink模型、设计天线阵列、信号生成,到波束形成算法实现和结果可视化,涵盖了关键步骤。文章重点讲解了均匀线性阵列的设计、线性调频信号生成、相位偏移计算等核心技术,并提供了MATLAB代码示例。通过Scope或ArrayPlot模块进行结果分析,最终可导出为嵌入式代码部署。该系统展现了电子扫描波束的技术优势,为雷达系统设计提供了有效的仿真方法。
codeforces_9A Die Roll
题目链接:http://codeforces.com/problemset/problem/9/A 题目大意:抛掷两次骰子得点数 a, b, 再抛掷一次骰子,求出现的点数大于等于 a 和 b 的概率 //C++代码 #include using namespace std; int main(){ int n,m; cin>>n>>m; if(n<m) n=m; if(n==1
【DaVinci Developer专题】-41-APP SWC如何读取写入NVM Block数据
APP SWC Port如何Read读取/Write写入NVM Block数据; DaVinci Developer中的Calibration Parameter/Per-Instance Memory/Service Need如何配置。
ML.NET在工业上位机中的深度应用:如何用C#实现10ms级预测推理?
模型要“够用就好”:工业场景的规律往往不复杂,别迷信深度学习,FastTree、线性模型足够应付80%的场景,且速度快3-5倍;预处理“能省就省”:离线做90%的特征工程,实时只处理动态变化的10%,这是突破10ms的关键;代码“贴近硬件”:用struct、数组池、SIMD等“非托管技巧”写C#,避免GC成为实时性瓶颈;测试“模拟极端”:在目标工控机上用100%负载(同时跑PLC通信、运动控制、视觉检测)测试推理延迟,确保极端情况下仍达标。
cf9A Codeforces Beta Round #9 (Div. 2 Only)
A. Die Rolltime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputYakko, Wakko and Dot, world-famous animaniacs, decided to rest from acting in cartoons, and take a leave to travel a bit. Yakko dreamt to go to P
《UDS协议从入门到精通》系列——图解0x14:清除诊断信息
图解0x14:清除诊断信息,简洁易懂,迅速上手!
CF 9A. Die Roll
Yakko, Wakko and Dot, world-famous animaniacs, decided to rest from acting in cartoons, and take a leave to travel a bit. Yakko dreamt to go to Pennsylvania, his Motherland and the Motherland of his a
复分析 阿尔福斯(Ahlfors) 第三版答案 英文
答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案
大中型超市收银系统(可直接运行)
光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开
CF 9A Die Roll
水的要死 像我一开始玩rv 一样 #include #include using namespace std; int main() { int a,b; while(cin>>a>>b) { if(a<b) swap(a,b); if(a == 1) cout<<"1/1"<<endl; if(a == 2) c
深度学习工具包 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');```[](https://bitdeli.com/free "Bitdeli Badge")
CodeForces刷题:Theatre Square、Watermelon、Chat Server‘s Outgoing Traffic、Triangle、Die Roll
记录Codeforces刷题QAQ。
最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版
Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。
linux安装mysql ndb cluster
本文介绍了在CentOS 6.9系统上安装MySQL NDB Cluster 7.5.17的准备工作及核心概念。主要内容包括: 版本信息 操作系统:CentOS 6.9 x86_64 MySQL NDB Cluster版本:7.5.17 提供了官方下载链接和校验值 NDB Cluster核心组件 数据节点(Data Node):存储实际数据 SQL节点(SQL Node):提供数据访问接口 管理节点(Management Node):负责集群管理 关键技术特性 事件日志系统记录集群活动 检查点机制确保数据持
CF#320 Div.2 总结
比赛网址:cf#320 Div.2 晚上11点开始的比赛,持续2个半小时。结束时有两道题题过了预测数据,分时是A题和C题。 比赛开始的时候,理所当然地从A题开始看起。A题比较容易,稍微分析一下就可以看出是一道10进制转2进制的题目,虽然题目比较简单,但是由于敲代码不够熟练,并且还要测试一些数据的原因,当我提交时已经有接近2000人A了此题。 然后我开始看B题,B题题意比较容易理解,而且我觉得
cf 598A Tricky Sum
#include using namespace std; #define LL long long const LL MAXN=1000000000; LL a[30]={1}; LL b[30]={1}; int main() { for(int i=1;i<=30;i++) a[i]=2*a[i-1]; for(int i=1;i<30;i++)
cf 20a BerOS file system
#include #include using namespace std; int main() { string s; cin>>s; bool flag=false; int p=s.length()-1; while(s[p]=='/') p--; if(p==-1) s="/"; else
cf 88b Keyboard
#include #include #include using namespace std; #define del(a,b) memset(a,b,sizeof(a)) struct node { int x,y; }nn[900]; int aa[130]; bool flag; int n,m,x,q,ans,snum; char kb[33][33]; string s;
cf #327 Div.2 Problem B Rebranding
#include #include #include using namespace std; int n,m; char aa[30]={'a'}; char s[200005]; char *ss[200005]; char a,b; int main() { for(int i=1;i<26;i++) aa[i]=aa[i-1]+1; scanf("%d
cf#320 Div.2 Problem C A Problem about Polyline
#include #include #include using namespace std; double ans,a; int x,y; int main(){ scanf("%d%d",&x,&y); if(y==x){ printf("%.12lf\n",(double)x); } else if(x<y){ print
cf 2a Winner
#include #include #include using namespace std; string ss[1005]; int x[1005]; int main() { int N; string win; int maxn=0; cin>>N; map M; for(int i=0;i<N;i++) { c
cf 8a Train and Peter
#include #include #include using namespace std; int main() { string s,s1,s2; bool f1=false,f2=false; cin>>s>>s1>>s2; int a,b; a=s.find(s1); if(a!=std::string::npos) {
523



被折叠的 条评论
为什么被折叠?



