Lost Numbers
https://codeforces.com/contest/1167/problem/B
题解:暴力
/*
*@Author: STZG
*@Language: C++
*/
#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<string>
#include<vector>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<cmath>
#include<list>
#include<map>
#include<set>
//#define DEBUG
#define RI register int
#define endl "\n"
using namespace std;
typedef long long ll;
//typedef __int128 lll;
const int N=100000+10;
const int M=100000+10;
const int MOD=1e9+7;
const double PI = acos(-1.0);
const double EXP = 1E-8;
const int INF = 0x3f3f3f3f;
int t,n,m,k,p,l,r,u,v;
int ans,cnt,flag,temp,sum;
int b[10];
char str;
struct node{};
int main()
{
#ifdef DEBUGfreopen("input.in", "r", stdin);//freopen("output.out", "w", stdout);
#endif//ios::sync_with_stdio(false);//cin.tie(0);//cout.tie(0);//scanf("%d",&t);//while(t--){printf("? %d %d\n",1,2);fflush(stdout);scanf("%d",&b[1]);printf("? %d %d\n",2,3);fflush(stdout);scanf("%d",&b[2]);printf("? %d %d\n",4,5);fflush(stdout);scanf("%d",&b[3]);printf("? %d %d\n",5,6);fflush(stdout);scanf("%d",&b[4]);int a[6]={4 , 8, 15, 16, 23, 42};while(1){next_permutation(a, a+6);if(a[0]*a[1]==b[1]&&a[1]*a[2]==b[2]&&a[3]*a[4]==b[3]&&a[4]*a[5]==b[4]){printf("! %d %d %d %d %d %d\n",a[0],a[1],a[2],a[3],a[4],a[5],a[6]);break;}}//}#ifdef DEBUGprintf("Time cost : %lf s\n",(double)clock()/CLOCKS_PER_SEC);
#endif//cout << "Hello world!" << endl;return 0;
}
Lost Numbers相关推荐
- usaco ★Humble Numbers 丑数
★Humble Numbers 丑数 对于一给定的素数集合 S = {p1, p2, ..., pK}, 来考虑那些质因数全部属于 S 的数的集合.这个集合包括,p1, p1p2, p1p1, 和 p ...
- Codeforces Round #FF 446 C. DZY Loves Fibonacci Numbers
參考:http://www.cnblogs.com/chanme/p/3843859.html 然后我看到在别人的AC的方法里还有这么一种神方法,他预先设定了一个阈值K,当当前的更新操作数j<K ...
- iwork11旗舰版 linux,苹果 iWork 11 套件来了,Pages/Numbers/Keynote iOS/macOS 版大升级
IT之家3月24日消息 苹果今天专为 iOS 和 macOS 设备设计的 iWork 应用套件更新到了版本 11,引入了许多新功能和调整,以改善其功能. IT之家获悉,在 iOS 系统上,Pages. ...
- pandas使用extract函数根据正则表达式从dataframe指定数据列的字符串中抽取出数字并生成新的数据列(extract numbers from column)
pandas使用extract函数根据正则表达式从dataframe指定数据列的字符串中抽取出数字并生成新的数据列(extract numbers from column and generate n ...
- pandas创建内容全是0的dataframe、pandas基于随机整数、随机浮点数创建dataframe(random numbers)
pandas创建内容全是0的dataframe.pandas基于随机整数.随机浮点数创建dataframe(random numbers) 目录 pandas创建内容全是0的dataframe.pan ...
- LeetCode 421. Maximum XOR of Two Numbers in an Array--Python解法
LeetCode 421. Maximum XOR of Two Numbers in an Array–C++,Python解法 LeetCode题解专栏:LeetCode题解 我做的所有的Leet ...
- LeetCode 445. Add Two Numbers II--面试算法题--C++,Python解法
题目地址:Add Two Numbers II - LeetCode You are given two non-empty linked lists representing two non-neg ...
- LeetCode 829. Consecutive Numbers Sum--笔试题--C++解法
LeetCode 829. Consecutive Numbers Sum–笔试题–C++解法 LeetCode题解专栏:LeetCode题解 LeetCode 所有题目总结:LeetCode 所有题 ...
- Codeforces Round #181 (Div. 2) C. Beautiful Numbers 排列组合 暴力
C. Beautiful Numbers 题目连接: http://www.codeforces.com/contest/300/problem/C Description Vitaly is a v ...
- SAP 对HU做货物移动报错-Only 0 serial numbers entered instead of 30 -
SAP 对HU做货物移动报错-Only 0 serial numbers entered instead of 30 - 元旦刚过,就收到客户的业务人员报错说,当其对HU做转库(同一个公司代码下工厂到 ...
最新文章
- yum mysql mariadb 目录_CentOS用yum安装、配置MariaDB
- nod32用户名和密码每天更新_忘记登录密码没有U盘怎么办?无U盘重置密码Win7篇
- 走向DBA[MSSQL篇] - 从SQL语句的角度提高数据库的访问性能
- 01.elasticsearch-security_es鉴权机制
- 如何让 dotnetcore 在 Linux 上后台运行?
- 终极JPA查询和技巧列表–第3部分
- LeetCode 1380. 矩阵中的幸运数(set)
- JMETER目录结构详解
- 5G 时代的车联网混战!
- koolshare离线插件下载_还记得那个提速8倍的IDEA插件吗?VS Code版本也发布啦
- 如何统计区域内部公路总长度和绘制数据直方图
- PHPKafka 1.0 发布,支持全部 50 个 API
- vue3.0 音频插件(vue-aplayer)
- 华为模拟器eNSP下载与安装(win10系统)
- 【TJOI 2019】唱、跳、rap和篮球
- 通过cookie绕过验证码登录(绕过验证码)
- 软件调试高级研习班庐山秀峰站(2017-06)
- java reference详解_你不可不知的Java引用类型之——Reference源码解析
- ffmpeg截取一段视频
- 东西方赌王“口水战”升级 措词激烈论“竞争”
热门文章
- c语言 getchar_C语言gets输入问题
- php json与接口的使用,api接口与json
- python图像边缘提取_python通过robert、sobel、Laplace算子实现图像边缘提取详解
- rgb sw 线主板接口在哪_十代至尊i910980XE直接上:技嘉X299X AORUS MASTER主板评测
- java collection join_java – @ElementCollection @CollectionTable在一对多映射中
- qa dataset
- 没学c语言可以学python_学了Python,但是没有学c,直接去学c++是可行的吗?
- mysql startupitem_MySQL数据库之Mac上安装MySQL过程分享
- mysql例题_mysql练习题1
- java 计算器 junit测试_Java中Junit4测试实例