Poj 3062 celebrity Jeopardy

Source: Internet
Author: User

1. Link:

Http://poj.org/problem? Id = 3062

2. content:

Celebrity Jeopardy
Time limit:1000 ms   Memory limit:65536 K
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 participates ipants 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 cocould 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 wocould to lead to the provided solution, respecting the use of space exactly as in the input.

Sample Input

Y = 3X=9

Sample output

Y = 3X=9

Source

Southeastern Europe 2006

3. Method:

4. Code:

1 #include<iostream>2 #include <cstdio>3 using namespace std;4 int main()5 {6     char a[100];7     while(gets(a))    puts(a);8     return 0;9 }

 

5. Reference:

Poj 3062 celebrity Jeopardy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.