谁是作案嫌疑人?

编程入门 行业动态 更新时间:2024-10-25 06:23:49

<a href=https://www.elefans.com/category/jswz/34/1767126.html style=谁是作案嫌疑人?"/>

谁是作案嫌疑人?


谁是作案嫌疑人?

Time Limit: 1000 ms  Memory Limit: 65536 KiB Submit  Statistic

Problem Description

刑侦大队对涉及六个嫌疑人的一桩疑案进行分析:一、a ,b至少有一人作案;二、a,e,f三人中至少有两人参与作案;三、 a ,d不可能是同案犯;四、b,c或同时作案,或与本案无关;五 c,d中有且只有一人作案;六 如果d没有参与作案则e也不可能参与作案。试编写程序,寻找作案人。

Input

多组测试数据,对于每组测试数据,第 1 行输入 6 个空格分隔的整数,代表a、b、c 、d 、e 、f的编号,编号x范围(1 <= x <= 6),且编号互不相同。

Output

对于每组测试数据,第 1 行至第 6 行分别输出对 a、b、c 、d 、e 、f的判断,详细输出格式请参考样例。 

Sample Input

1 2 3 4 5 6

Sample Output

The suspects numbered 1 are criminals.
The suspects numbered 2 are criminals.
The suspects numbered 3 are criminals.
The suspect numbered 4 is not a criminal.
The suspect numbered 5 is not a criminal.
The suspects numbered 6 are criminals.

Hint

Source



#include <iostream>
#include<bits/stdc++.h>
using namespace std;int main()
{
int a,b,c,d,e,f;
while(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)!=EOF)
{printf("The suspects numbered %d are criminals.\n",a);printf("The suspects numbered %d are criminals.\n",b);printf("The suspects numbered %d are criminals.\n",c);printf("The suspect numbered %d is not a criminal.\n",d);printf("The suspect numbered %d is not a criminal.\n",e);printf("The suspects numbered %d are criminals.\n",f);}return 0;
}

谁是作案嫌疑人?

Time Limit: 1000 ms  Memory Limit: 65536 KiB Submit  Statistic

Problem Description

刑侦大队对涉及六个嫌疑人的一桩疑案进行分析:
一、a ,b至少有一人作案;
二、a,e,f三人中至少有两人参与作案;
三、 a ,d不可能是同案犯;
四、b,c或同时作案,或与本案无关;
五 c,d中有且只有一人作案;
六 如果d没有参与作案则e也不可能参与作案。
试编写程序,寻找作案人。

Input

多组测试数据,对于每组测试数据,第 1 行输入 6 个空格分隔的整数,代表a、b、c 、d 、e 、f的编号,编号x范围(1 <= x <= 6),且编号互不相同。

Output

对于每组测试数据,第 1 行至第 6 行分别输出对 a、b、c 、d 、e 、f的判断,详细输出格式请参考样例。
 

Sample Input

1 2 3 4 5 6

Sample Output

The suspects numbered 1 are criminals.
The suspects numbered 2 are criminals.
The suspects numbered 3 are criminals.
The suspect numbered 4 is not a criminal.
The suspect numbered 5 is not a criminal.
The suspects numbered 6 are criminals.

Hint

Source


更多推荐

谁是作案嫌疑人?

本文发布于:2023-06-28 05:46:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/922666.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:谁是   嫌疑人

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!