cf 9a Die Roll

【信息科学与工程学】【制造工程】第三十六篇 机械工程与自动化101 本系统通过多模型集成、知识增强、主动学习和持续优化等关键技术,实现了高效、高质量的自动化文本语料标注。系统采用模块化设计,支持灵活扩展,能够处理不同类型的文本数据,适应多样的标注需求。 阅读详情
#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;
}

【信息科学与工程学】【解决方案体系】第一篇 黑灯工厂解决方案03 方程类别方程名称数学表达式参数说明物理意义应用场景晶体结构与对称性​布拉维格子平移矢量T=ua1​+va2​+wa3​a1​,a2​,a3​: 基矢; u,v,w: 整数晶体周期性平移对称性晶格定义, 倒格子计算晶面间距(立方晶系)dhkl​=h2+k2+l2​a​a: 晶格常数; (hkl): 晶面指数相邻平行晶面间的距离X射线衍射, 晶向计算晶面间距(六方晶系)dhkil​=34​(h2+hk+k2)+(ca​)2l2​a​a,c: 六方晶格常数; (hkil): 四指数晶面六方晶体(如4H-SiC)晶 阅读详情

相关推荐

从驱动编译到数据传输:RK3588与FPGA的PCIe通信实战解析

本文详细解析了RK3588与FPGA通过PCIe通信的实战过程,涵盖驱动编译、数据传输及性能优化等关键步骤。通过XDMA驱动实现高效DMA传输,适用于视频处理、数据采集等高性能场景,帮助开发者快速掌握嵌入式系统中的PCIe通信技术。

weixin_29214691的博客 523

算法成长之路------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

m0_51507612的博客 521

树莓派5安装ROS2小白指南避坑攻略

手把手教你如何在树莓派5上顺利安装ROS2,避开常见问题与陷阱,提升配置效率。针对树莓派5安装ros2过程中的依赖冲突、源配置错误等高频难题提供解决方案,适合新手快速上手。

weixin_35754962的博客 1005

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

无知的我 1741

新装Win10/Win11后VMware虚拟机连不上网?手把手教你排查‘网络信息不可用’(从服务检查到网段配置)

本文详细介绍了在Windows 10/11系统上安装VMware Workstation后虚拟机无法联网的排查方法。从检查VMware NAT Service、DHCP Service等关键服务状态,到重置虚拟网络编辑器配置,再到内核设备驱动问题解决,手把手教你解决‘网络信息不可用’问题。特别针对VMCI驱动故障提供了实用解决方案,帮助用户快速恢复虚拟机网络连接。

weixin_28736335的博客 770

FAST_LIO_ROS2 可以用gazebo仿真吗?

摘要:FAST_LIO_ROS2可与Gazebo仿真环境兼容,通过订阅Gazebo模拟的激光雷达和IMU数据实现SLAM建图。已有开源项目(如pb_rm_simulation)验证了该方案,支持导航模式切换与真实机器人移植。关键步骤包括环境配置、传感器话题匹配及参数调试,需注意版本兼容性与数据噪声处理。相关教程提供了从环境搭建到三维建图的完整流程。

专注 激光SLAM, 目标检测, 欢迎关注, 分享交流! 1138

CF 2023/4/1

现在鲍勃不得不邮寄他的照片,但由于世界经济危机和高油价,他想寄出他的作品,但要尽可能少花钱。Yakko,Wakko和Dot,世界着名的动漫狂人,决定休息一下演动画片,请假去旅行一下。这就是为什么最聪明的Yakko想出了一个真正天才的想法:让三人每人掷出一个普通的六面骰子,得分最高的那个将成为赢家,并将其他两个带到他/她梦想的地方。以“A/B”格式的不可约分数的形式输出所需的概率,其中 A — 分子,B — 分母。众所周知,雅子和华子是真正的绅士,这就是为什么如果他们与多特有相同的积分,他们就会让多特获胜。

weixin_73793099的博客 263

零基础入门simulink1000例--第112例:在 Simulink 中构建一个基本的相控阵雷达波束形成系统仿真模型

摘要:本文详细介绍了使用Simulink实现相控阵雷达波束形成技术的完整流程。从创建Simulink模型、设计天线阵列、信号生成,到波束形成算法实现和结果可视化,涵盖了关键步骤。文章重点讲解了均匀线性阵列的设计、线性调频信号生成、相位偏移计算等核心技术,并提供了MATLAB代码示例。通过Scope或ArrayPlot模块进行结果分析,最终可导出为嵌入式代码部署。该系统展现了电子扫描波束的技术优势,为雷达系统设计提供了有效的仿真方法。

amy_mhd的博客 211

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

永恒国度 697

【DaVinci Developer专题】-41-APP SWC如何读取写入NVM Block数据

APP SWC Port如何Read读取/Write写入NVM Block数据; DaVinci Developer中的Calibration Parameter/Per-Instance Memory/Service Need如何配置。

「汽车电子助手」的博客 4469

ML.NET在工业上位机中的深度应用:如何用C#实现10ms级预测推理?

模型要“够用就好”:工业场景的规律往往不复杂,别迷信深度学习,FastTree、线性模型足够应付80%的场景,且速度快3-5倍;预处理“能省就省”:离线做90%的特征工程,实时只处理动态变化的10%,这是突破10ms的关键;代码“贴近硬件”:用struct、数组池、SIMD等“非托管技巧”写C#,避免GC成为实时性瓶颈;测试“模拟极端”:在目标工控机上用100%负载(同时跑PLC通信、运动控制、视觉检测)测试推理延迟,确保极端情况下仍达标。

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 742

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

qq_62079079的博客 248

《UDS协议从入门到精通》系列——图解0x14:清除诊断信息

图解0x14:清除诊断信息,简洁易懂,迅速上手!

车载系统攻城狮 4825

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

老鼠 949

复分析 阿尔福斯(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

WORK HARD IN SILENCE LET SUCCESS MAKE THE NOISE 561

深度学习工具包 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&#39;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(&#39;DeepLearnToolbox&#39;));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(&#39;state&#39;,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&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,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 = &#39;sigm&#39;;%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, &#39;Too big error&#39;);```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(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;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)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;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, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% 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&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 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, &#39;Too big error&#39;);```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(&#39;state&#39;,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, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,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, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,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, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % 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, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % 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, &#39;Too big error&#39;);%% 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(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % 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, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

CodeForces刷题:Theatre Square、Watermelon、Chat Server‘s Outgoing Traffic、Triangle、Die Roll

记录Codeforces刷题QAQ。

林一百二十八的博客 992

最新的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):负责集群管理 关键技术特性 事件日志系统记录集群活动 检查点机制确保数据持

OceanWaves1993的博客 756

CF#320 Div.2 总结

比赛网址:cf#320 Div.2 晚上11点开始的比赛,持续2个半小时。结束时有两道题题过了预测数据,分时是A题和C题。 比赛开始的时候,理所当然地从A题开始看起。A题比较容易,稍微分析一下就可以看出是一道10进制转2进制的题目,虽然题目比较简单,但是由于敲代码不够熟练,并且还要测试一些数据的原因,当我提交时已经有接近2000人A了此题。 然后我开始看B题,B题题意比较容易理解,而且我觉得

Stool_Monster的专栏 859

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++)

Stool_Monster的专栏 758

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

Stool_Monster的专栏 661

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;

Stool_Monster的专栏 658

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

Stool_Monster的专栏 653

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

Stool_Monster的专栏 604

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

Stool_Monster的专栏 594

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) {

Stool_Monster的专栏 584
上一篇: cf 8a Train and Peter
下一篇: cf 10a Power Consumption Calculation
StoolMonster
博客等级 码龄12年 11粉丝 70原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值