結果

問題 No.2357 Guess the Function
ユーザー aoblue2547aoblue2547
提出日時 2023-06-23 22:06:09
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 2,431 bytes
コンパイル時間 4,062 ms
コンパイル使用メモリ 229,732 KB
実行使用メモリ 23,952 KB
平均クエリ数 3.00
最終ジャッジ日時 2023-09-13 17:07:17
合計ジャッジ時間 5,238 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
23,580 KB
testcase_01 WA -
testcase_02 AC 25 ms
23,568 KB
testcase_03 WA -
testcase_04 AC 25 ms
23,604 KB
testcase_05 WA -
testcase_06 AC 25 ms
23,484 KB
testcase_07 AC 26 ms
23,580 KB
testcase_08 WA -
testcase_09 AC 25 ms
23,580 KB
testcase_10 AC 26 ms
23,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//テンプレート
//Visual Studio用
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
template<class T> bool chmin(T& a, T b) {return a > b ? a = b, true : false;}
template<class T> bool chmax(T& a, T b) {return a < b ? a = b, true : false;}
template<class T> vector<T> cumulate(vector<T>& a) {
	const int n = (int)a.size();
	vector<T> res(n + 1);
	a.emplace_back(0);
	exclusive_scan(a.begin(), a.end(), res.begin(), 0ll);
	a.pop_back();
	return res;
}
template<class T>istream& operator>>(istream& is, vector<T>& v) { for (auto& e : v)is >> e; return is; }
template<class T>ostream& operator<<(ostream& os, vector<T>& v) { for (auto& e : v)os << e << " "; return os; }
using ll = long long;
using ull = unsigned long long;
using uint = unsigned int;
struct Edge {
	int to;
	ll weight;
	Edge(int t, ll w) :to(t), weight(w) {}
	bool operator==(Edge e) {
		return this->to == e.to and this->weight == e.weight;
	}
	bool operator<(Edge e) {
		if (this->to < e.to) {
			return this->weight <= e.weight;
		}
		else return false;
	}
};
ostream& operator<<(ostream& os, Edge e) { cout << e.to; return os; }
using graph_ = vector<vector<Edge>>;
class Graph {
	graph_ g;
public:
	Graph(int n) :g(n) {}
	graph_::iterator begin() { return g.begin(); }
	graph_::const_iterator begin() const { return g.begin(); }
	graph_::iterator end() { return g.end(); }
	graph_::const_iterator end() const { return g.end(); }
	vector<Edge>& operator [](int v) {
		return g[v];
	}
	const graph_& data() { return g; }
	void add(int u, int v, ll w = 1) {
		g[u].emplace_back(Edge{ v,w });
	}
	void wadd(int u, int v, ll w = 1) {
		add(u, v, w);
		add(v, u, w);
	}
};

//Atcoder Library
/**/
#include <atcoder/all>
using namespace atcoder;
using mint = modint998244353;
//using mint = modint1000000007;
//using mint0 = dynamic_modint<0>;
//using mint = modint;
//mint::set_mod();
istream& operator>>(istream& is, mint& x) { ll r; cin >> r; x = r; return is; }
ostream& operator<<(ostream& os, mint& x) { cout << x.val(); return os; }
/**/
//debug用
#define SHOW(n) cout << #n << " = " << n << endl;

/*
ここまでテンプレート
*/


int main() {
	/**/
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	/**/

	cout << "? " << 100 << endl;

	int x;
	cin >> x;

	cout << "? " << 100 - x - 1 << endl;

	int y;
	cin >> y;

	int b = y + 1;
	int a = b - (100 - x) % b;

	cout << "! " << a << ' ' << b << endl;
	


	return 0;
}

0