Uva 01124, POJ 3062 Celebrity jeopardy

It's hard to construct a problem that's so easy that everyone will get it, yet still difficult enough to be
worthy of some respect. Usually, we err on one side or the other. How simple can a problem really be?


  Here, as in Celebrity Jepoardy, questions and answers are a bit confused, and, because the partici-
pants are celebrities, there's a real need to make the challenges simple. Your program needs to prepare
a question to be solved | an equation to be solved | given the answer. Specically, you have to
write a program which nds the simplest possible equation to be solved given the answer, considering
all possible equations using the standard mathematical symbols in the usual manner. In this context,
simplest can be dened unambiguously several different ways leading to the same path of resolution.
For now, nd the equation whose transformation into the desired answer requires the least effort.


  For example, given the answer X = 2, you might create the equation 9 - X = 7. Alternately, you
could build the system X > 0; X2 = 4. These may not be the simplest possible equations. Solving
these mind-scratchers might be hard for a celebrity.


Input
Each input line contains a solution in the form < symbol > = < value >


Output
For each input line, print the simplest system of equations which would to lead to the provided solution,
respecting the use of space exactly as in the input.


Sample Input
Y = 3
X=9


Sample Output
Y = 3
X=9

======================================================================================================================

  这题是在Steven Halim 的 Competitive Programming 3  的 Uva oj 题目列表中属于 super simple,一开始看题目中也出现各种simple,然而看完题目有点懵。

  大意是输入键值对,对每一行 ,输出符合这个键值对的 最简 代数系统。

  然后我的脑子里全是 贵族 怎么这么笨,代数系统具体是什么东西... 后来查题号,并没有人写了这题,最后查题名,发现POJ也有这一题,有大神给出了解答,但是没有很好地解释原因。

  这题主要在与其背景长,废话多,而且还有example的误导,实质上就是把键值对转化成等式 (键值对是一个等式的另一种形式),根本上就是怎么输入怎么输出。

#include<stdio.h>

int main(){
	char c;
	while( (c = getchar() )!= EOF) printf("%c",c);
	return 0;
} 

  有同学有更好的想法,欢迎邮件ethanxlj@foxmail.com

 

转载于:https://www.cnblogs.com/foxblogs/p/7708067.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值