Gym - 100623I Important Wires
题目链接:https://vjudge.net/problem/Gym-100623I
题意:给你n个引脚,每个引脚其实就是一行逻辑表达式,让你把所有的引脚通过逻辑运算组合成一条电路,使得这条电路的输出一定是true,其实也就是给你n个变量,让你通过~,|,&,=>,<=>,构成一条逻辑表达式,且这条逻辑表达式一定为真
解析:隐藏水题啊,看到输出那么复杂,以为很难的,看懂题意以后就太简单了,直接用|来构造,只用最后再|多一个前面某一的~,输出就一定为真了
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <map>
using namespace std;
const int maxn = 1e6+100;
const int inf = 0x7fffffff;
char a[15][1005];
int main(void)
{freopen("important.in","r",stdin);freopen("important.out","w",stdout);int n;scanf("%d",&n);getchar();for(int i=0;i<n;i++)gets(a[i]);puts("Yes");for(int i=0;i<n;i++)printf("%c|",a[i][0]);printf("~%c",a[n-1][0]);return 0;
}
Gym - 100623I Important Wires相关推荐
- Gym 100623I Important Wires
题意:给你很多语句,然后让你用这些语句组成一条语句使其值为1, 思路:说了这么多,其实是大水题i,只要输出一个语句或上这条语句的非,其他的随便怎样都行 ac代码: #include <iostr ...
- Codeforces Gym 100623I Problem I. Important Wires
题目传送门:http://codeforces.com/gym/100623/attachments 题解:这道题...说了一大堆没用的....如果你看了题不会做再看代码...你会大喊我去.... C ...
- 【英语学习】【Daily English】U02 Daily Routine L02 I go to the gym every other day
Word Preparation stay fit and healthy:保持健康 You must find another way to stay fit and healthy, if you ...
- CodeForces Gym 101047L Putting plates on the tuk-tuks 快速幂
Putting plates on the tuk-tuks Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d ...
- Codeforces gym 100685 A. Ariel 暴力
A. Ariel Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100685/problem/A Des ...
- Important Programming Concepts (Even on Embedded Systems) Part V: State Machines
Earlier articles in this series: Part I: Idempotence Part II: Immutability Part III: Volatility Part ...
- 计算机核心论文实验数据,WIREs | 校准心脏研究的核心计算机模型
原标题:WIREs | 校准心脏研究的核心计算机模型 通过量身定制的实验和更智能的数据使用方式,科学家们正在开发具有更高预测能力的心脏电活动计算机模型. 每一次心跳都是由穿过心脏的电脉冲传播来协调.当 ...
- Por Costel and the Match Gym - 100923H(经典种类并查集)
Por Costel and the Match Gym - 100923H 题目链接:https://vjudge.net/problem/Gym-100923H 题目: Oberyn Martel ...
- 强化学习(三) - Gym库介绍和使用,Markov决策程序实例,动态规划决策实例
强化学习(三) - Gym库介绍和使用,Markov决策程序实例,动态规划决策实例 1. 引言 在这个部分补充之前马尔科夫决策和动态规划部分的代码.在以后的内容我会把相关代码都附到相关内容的后面.本部 ...
最新文章
- python 调用c++返回char*
- html area图片热点
- [C++11]推荐使用auto的场景
- c语言主函数如何获得子函数的值,子函数中的数组值怎么带回主函数中?
- 通过url判断当前页,动态给导航加样式
- Cinema 4D R25 for mac三维动画设计
- HDU4812 D tree 【点分治 + 乘法逆元】
- 泛型类型(Generic Type)
- 程序员需不需要数学知识?
- 第八章 项目质量管理
- Mac技巧|如何快速显示Mac桌面?Mac桌面快捷操作方式
- 全球海底光缆及我国海底光缆分布
- 12月组队学习——JoyfulPandas第二章思维导图
- 如何在富文本中插入表情,word文档,及数学公式?
- 键盘各个键所对应的键值
- 【转载】专访罗升阳:老罗的Android之旅
- BeautifulSoup 与 Xpath
- 大学生创业之火如何再次燎原
- Android中AlarmManager的使用
- python plt图片保存emf类型_如何获得emf/wmf格式的matplotlib图形?
热门文章
- 第3关:利用栈判断字符串是否为回文串
- php abbyy,ABBYY FineReader 14(OCR文字识别软件) v14.0.101.665 官方试用版
- 轻松插入WordPress页眉页脚代码插件Insert Headers and Footers
- SSM-项目整合简单思路
- 2023年IT行业就业前景分析,准职场人必看!
- 紫光华宇拼音 4.0 (Fourier) 试验版m1内部版 build 5001
- 无人机机械臂爪机器臂爪的安装调试试验。以大疆哪吒为例乐迪T8Fb遥控器。
- 爱智EdgerOS之深入解析在爱智应用中如何使用Socket.IO轻松实现双向通信
- 【python】之字符串格式化'{}'和.format组合使用
- 2021年度软件企业 100 强榜单(附全名单)