TJU Problem 2548 Celebrity jeopardy
下次不要被长题目吓到,其实不一定难。
先看输入输出,再揣测题意。
原文:
2548. Celebrity jeopardy
Time Limit: 1.0 Seconds Memory Limit: 65536K
Total Runs: 1306 Accepted Runs: 898
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的更多相关文章
- Poj 3062 Celebrity jeopardy
1.Link: http://poj.org/problem?id=3062 2.Content: Celebrity jeopardy Time Limit: 1000MS Memory Lim ...
- Problem C: Celebrity Split
题目描写叙述 Problem C: Celebrity Split Jack and Jill have decided to separate and divide their property e ...
- 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 2101 Bullseye
注意代码中: result1 << " to " << result2 << ", PLAYER 1 WINS."<& ...
- TJU Problem 2857 Digit Sorting
原题: 2857. Digit Sorting Time Limit: 1.0 Seconds Memory Limit: 65536KTotal Runs: 3234 Accepted ...
- TJU Problem 1015 Gridland
最重要的是找规律. 下面是引用 http://blog.sina.com.cn/s/blog_4dc813b20100snyv.html 的讲解: 做这题时,千万不要被那个图给吓着了,其实这题就是道简 ...
- TJU Problem 1065 Factorial
注意数据范围,十位数以上就可以考虑long long 了,断点调试也十分重要. 原题: 1065. Factorial Time Limit: 1.0 Seconds Memory Limit ...
- TJU Problem 1100 Pi
注: 1. 对于double计算,一定要小心,必要时把与double计算相关的所有都变成double型. 2. for (int i = 0; i < N; i++) //N 不 ...
- TJU Problem 2520 Quicksum
注意: for (int i = 1; i <= aaa.length(); i++) 其中是“ i <= ",注意等号. 原题: 2520. Quicksum Time L ...
随机推荐
- 【转】JavaScript => TypeScript 入门
几个月前把 ES6 的特性都过了一遍,收获颇丰.现在继续来看看 TypesScript(下文简称为 “TS”).限于经验,本文一些总结如有不当,欢迎指正. 官网有这样一段描述: TypeScript ...
- php企业建站源码
php企业建站源码 <?php session_start(); include "./admin/config.php"; include "./right/sq ...
- China’s movie heroes 《红海行动》展现中国英雄本色
Recent years have seen a trend for big military movies. Whether it was last year’s British hit Dunki ...
- JS--script标签注意细节
1)在使用<script>标签嵌入js代码时,记住不要在代码中的任何地方出现</script>字符串.例如: <script type="text/javasc ...
- git开发过程的配置和使用
git开发过程的使用 1.创建仓库 2.新建项目,填写项目名称等信息 3.初始化仓库,创建git仓库 git init 4.配置个人信息(配置过可忽略) git config --global use ...
- python全栈开发笔记---------基本数据类型
基本数据类似包括: 字符串(str) 数字(int) 列表(list) 元祖(tuple) 字典(dict) 布尔值(bool) 字符串(引号): name = "我是某某某" n ...
- sqlalchemy 模型中添加根据身份证号计算性别和年龄
class Users(Base, BaseMixin): username = Column(String(24)) id_Num = Column(String(18) ) # 身份证号码 @pr ...
- xStream解析生成xml文件学习资料
参考链接: http://www.cnblogs.com/hoojo/archive/2011/04/22/2025197.html
- Spring Boot + Druid 监控数据库(三)
Druid可以做什么? 1) 可以监控数据库访问性能,Druid内置提供了一个功能强大的StatFilter插件,能够详细统计SQL的执行性能,这对于线上分析数据库访问性能有帮助. 2) 替换DBC ...
- (C/C++学习笔记) 二十一. 异常处理
二十一. 异常处理 ● 异常的概念 程序的错误通常包括:语法错误.逻辑错误.运行异常. 语法错误指书写的程序语句不合乎编译器的语法规则,这种错误在编译.连接时由编译器指出. 逻辑错误是指程序能顺利运行 ...