Poj 3062 Celebrity jeopardy
1.Link:
http://poj.org/problem?id=3062
2.Content:
Celebrity jeopardy
Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 15015 Accepted: 8471 Description
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 elebrities, 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=9Sample Output
Y = 3
X=9Source
3.Method:
4.Code:
#include<iostream>
#include <cstdio>
using namespace std;
int main()
{
char a[];
while(gets(a)) puts(a);
return ;
}
5.Reference:
Poj 3062 Celebrity jeopardy的更多相关文章
- 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 ...
- TJU Problem 2548 Celebrity jeopardy
下次不要被长题目吓到,其实不一定难. 先看输入输出,再揣测题意. 原文: 2548. Celebrity jeopardy Time Limit: 1.0 Seconds Memory Lim ...
- POJ - 3062 Borg Maze
题目链接:http://poj.org/problem?id=3026 Svenskt Masterskap我程序员/ Norgesmesterskapet 2001 Description The ...
- 【POJ 3062】Party(2-SAT、tarjan)
2-SAT的入门题. a,a',b,b'分别表示两对夫妇,如果a,b有矛盾,那么a要来,就只能来b',b要来,就只能来a'.于是建了两条边(a,b'),(b,a'). 用tarjan强连通分量缩点染色 ...
- 【转】POJ百道水题列表
以下是poj百道水题,新手可以考虑从这里刷起 搜索1002 Fire Net1004 Anagrams by Stack1005 Jugs1008 Gnome Tetravex1091 Knight ...
- POJ解题经验交流
感谢范意凯.陈申奥.庞可.杭业晟.王飞飏.周俊豪.沈逸轩等同学的收集整理. 题号:1003 Hangover求1/2+1/3+...1/n的和,问需多少项的和能超过给定的值 类似于Zerojudg ...
- 算法之路 level 01 problem set
2992.357000 1000 A+B Problem1214.840000 1002 487-32791070.603000 1004 Financial Management880.192000 ...
- HDU 3062 && HDU 1824 && POJ 3678 && BZOJ 1997 2-SAT
一条边<u,v>表示u选那么v一定被选. #include <iostream> #include <cstring> #include <cstdio> ...
- 【转载】图论 500题——主要为hdu/poj/zoj
转自——http://blog.csdn.net/qwe20060514/article/details/8112550 =============================以下是最小生成树+并 ...
随机推荐
- 4.Maven概念模型,maven的生命周期,Maven坐标,依赖管理(依赖范围,依赖声明),仓库管理,私服概念
1 maven概念模型 2 maven的生命周期,项目构建过程 watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdG90b3R1enVvcXVhbg== ...
- Android Camera
Android调用系统api使用照相机功能,实现拍照获取图片以及从照相机库中获取指定图片的功能. 下面是演示样例代码: <?xml version="1.0" encodin ...
- IOS使用APNS推送Payload字节数限制导致推送不成功
这2天须要在推送上加上脚本,找到了badge方法能够加脚本.加上后可是怎么推送也不成功.郁闷了好久.在网上查找相关资料. 最终被我找到原因: "Payload--最多256bytes. &q ...
- u检验、t检验、F检验、X2检验 (转)
http://blog.renren.com/share/223170925/14708690013 常用显著性检验 1.t检验 适用于计量资料.正态分布.方差具有齐性的两组间小样本比较.包括配对资料 ...
- 利用 Composer 一步一步构建自己的 PHP 框架(三)——设计 MVC
终于可以 “一次编写,到处发布” 了,泪流满面! 今天凌晨我从一点多开始搞了四个小时到 5:20,终于搞出了个 Emlog 的 MarkDown 插件!欢迎 Emloger 尝试! 本教程示例代码见 ...
- Linux编程之《进程/线程绑定CPU》
Intro----- 通常我们在编写服务器代码时,可以通过将当前进程绑定到固定的CPU核心或者线程绑定到固定的CPU核心来提高系统调度程序的效率来提高程序执行的效率,下面将完整代码贴上. /***** ...
- Spring 事务管理高级应用难点剖析--转
第 1 部分 http://www.ibm.com/search/csass/search/?q=%E4%BA%8B%E5%8A%A1&sn=dw&lang=zh&cc=CN& ...
- Toad for Oracle 12.1下载地址
32 位版: http://us-downloads.quest.com/Repository/support.quest.com/Toad for Oracle/12.1/Software/Toad ...
- Linux 内核模块设计
一. 内核模块 1. 头文件 Linux/init.h 和 Linux/module.h 2. 装载内核 insmod 对应的转载函数 module_init(); 3. 卸载内核 rmm ...
- px和em之间的转换
很多网页设计者在写css时都是在通用选择器中就设置了字体的大小,中文情况下一般为12px.然而IE浏览器却无法调整那些使用px作为单位的字体大小.其实使用em作为单位是可以避免这一情况的. 一.em和 ...