当前位置:网站首页>枚举问题之匹配对手
枚举问题之匹配对手
2022-06-08 23:39:00 【LLM(-¥-)】
2. 有两队选手每队5人进行一对一的比赛,甲队为A、B、C、D、E,乙队为J、K、L、M、N,经过抽签决定比赛对手名单。规定A不和J比赛, M不和D及E比赛。列出所有可能的比赛名单。
代码实现
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
char a[5]={
'A','B','C','D','E'};
char b[5]={
'J','K','L','M','N'};
int i,j;
for(i=0;i<=4;i++){
for(j=0;j<=4;j++){
if((a[i]!='A'||b[j]!='J')&&(a[i]!='D'||b[j]!='M')&&(a[i]!='E'||b[j]!='M')){
printf("%c %c\n",a[i],b[j]);
}
}
}
return 0;
}
运行结果:
边栏推荐
- 网工必修课中小企业不同VLAN通信及NAT配置
- Epigentek EpiQuik 植物芯片试剂盒方案
- Deployment (12): testing disk performance
- Timing action positioning | data set introduction and download (activitynet, thumos' 14)
- 新技术(1) : 2021
- 网络工程师必修课,DHCP原理详解,工作面试必修
- 云原生技术---kubeadm使用外置etcd集群
- 使用Tensorflow实现EfficientNetV2-S结构
- Accessing the database in jdbcstamp mode
- Sequential action localization 𞓜 background suppression network for weakly supervised temporal action localization
猜你喜欢

Constructors and Destructor

网络工程师必修课,DHCP原理详解,工作面试必修

Epigentek chromaflash chromatin Extraction Kit scheme

Efficientnetv2 structure explanation (smaller models and faster training)

投资金额降低40% 协鑫能科自研换电产品

外包学生管理系统架构文档

Application of electric slip ring in food packaging machine

JDBCTample方式访问数据库

网络工程师必修课路由交换Stelnet的配置

Epigentek epiquik plant chip kit scheme
随机推荐
Description - description of abbexa human histone h3.1 protein
新技术(1) : 2021
Linux之yum安装MySQL
Deployment (10): intranet cluster NTP clock synchronization
Thesis reading | eventmix: an efficient augmentation strategy for event based data
水仙花数100-1000
工具变量与两阶段最小二乘stata
Spark 离线开发框架设计与实现
Implementing efficientnetv2-s structure with tensorflow
小黑刷题:Z变换
The layout potential of Web3, STI is in a value depression
数字IC设计——Makefile脚本(示例)
Electronic Association C language real and simulated questions
说明书丨Abbexa 人 Calsequestrin 1蛋白说明书
时序动作定位 | 数据集介绍及下载(ActivityNet、THUMOS’14)
Shell (31): judge whether the input parameter is empty
网络工程师必修课,DHCP原理详解,工作面试必修
【无标题】
Sequential action localization | weakly supervised temporal action localization using fragment contrast learning
Hong Kong Chinese professor renhongliang recruited talents in robot vision intelligent sensing, postdoctoral, research assistant and visiting scholar