下次不要被长题目吓到,其实不一定难。

先看输入输出,再揣测题意。

原文:

2548.   Celebrity jeopardy


Time Limit: 1.0 Seconds   Memory Limit: 65536K
Total Runs: 1306   Accepted Runs: 898

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 participants 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. Specifically, you have to write a
program which finds 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 defined
unambiguously several different ways leading to the same path of resolution. For
now, find 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; X^2 = 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

Source: Southeastern
European 2006

源代码:

 #include <iostream>
#include <string>
using namespace std; int main() {
string aaa;
while (getline(cin, aaa)) {
cout << aaa << endl;
}
return ;
}

TJU Problem 2548 Celebrity jeopardy的更多相关文章

  1. Poj 3062 Celebrity jeopardy

    1.Link: http://poj.org/problem?id=3062 2.Content: Celebrity jeopardy Time Limit: 1000MS   Memory Lim ...

  2. Problem C: Celebrity Split

    题目描写叙述 Problem C: Celebrity Split Jack and Jill have decided to separate and divide their property e ...

  3. 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 enoug ...

  4. TJU Problem 2101 Bullseye

    注意代码中: result1 << " to " << result2 << ", PLAYER 1 WINS."<& ...

  5. TJU Problem 2857 Digit Sorting

    原题: 2857.   Digit Sorting Time Limit: 1.0 Seconds   Memory Limit: 65536KTotal Runs: 3234   Accepted ...

  6. TJU Problem 1015 Gridland

    最重要的是找规律. 下面是引用 http://blog.sina.com.cn/s/blog_4dc813b20100snyv.html 的讲解: 做这题时,千万不要被那个图给吓着了,其实这题就是道简 ...

  7. TJU Problem 1065 Factorial

    注意数据范围,十位数以上就可以考虑long long 了,断点调试也十分重要. 原题: 1065.   Factorial Time Limit: 1.0 Seconds   Memory Limit ...

  8. TJU Problem 1100 Pi

    注: 1. 对于double计算,一定要小心,必要时把与double计算相关的所有都变成double型. 2. for (int i = 0; i < N; i++)         //N 不 ...

  9. TJU Problem 2520 Quicksum

    注意: for (int i = 1; i <= aaa.length(); i++) 其中是“ i <= ",注意等号. 原题: 2520.   Quicksum Time L ...

随机推荐

  1. SecureCRT修改显示行数

    Scrollback buffer应该是保留的行数,初始值500,修改成自己想要的数值保存即可. 参考:http://blog.csdn.net/w410589502/article/details/ ...

  2. Transactional参数说明

     参数  说明 readOnly 该属性用于设置当前事务是否为只读事务,设置为true表示只读,false则表示可读写,默认值为false.例如:@Transactional(readOnly=tru ...

  3. 常用的flex知识 ,比起float position 好用不少

      flex布局具有便捷.灵活的特点,熟练的运用flex布局能解决大部分布局问题,这里对一些常用布局场景做一些总结. web页面布局(topbar + main + footbar) 示例代码   要 ...

  4. 基于bootstrap的后台左侧导航菜单和点击二级菜单刷新二级页面时候菜单展开显示当前菜单

    本文使用的框架版本为: bootstrap3,Jquery2.1.0  (其他jquery可能会报错,菜单项不执行 效果如下: 1.在项目中引入框架: <link rel="style ...

  5. linux下grep命令详解

    参数: -a 或 --text : 不要忽略二进制的数据. -A<显示行数> 或 --after-context=<显示行数> : 除了显示符合范本样式的那一列之外,并显示该行 ...

  6. 重绘(Repaint)和回流(Reflow)

    重绘(Repaint)和回流(Reflow) 1.回流和重绘只是渲染步骤的一小节,是怎么做到影响性能的? css 会影响 javascrip 执行时间导致 javascript 脚本变慢 浏览器渲染一 ...

  7. 逆袭之旅DAY17.东软实训.Oracle.存储过程

    2018-07-13 09:08:36

  8. 尚学堂java 答案解析 第六章

    本答案为本人个人编辑,仅供参考,如果读者发现,请私信本人或在下方评论,提醒本人修改 一.选择题 1.C 解析:对void下的函数,可以使用"return;"表示结束之意,但不能&q ...

  9. vue中的axios

    数据的获取最常用的就是用ajax,但在vue框架中,axios则更为方便.它是基于es6的promise 以下内容引用自[最骚的就是你] 不再继续维护vue-resource,并推荐大家使用 axio ...

  10. zTree入门实例(一眼就看会)

    zTree 是一个依靠 jQuery 实现的多功能 “树插件”. 下载地址:https://gitee.com/zTree/zTree_v3 待会将上面划的三个文件复制到Java的Web工程下即可 先 ...