結果
| 問題 |
No.2357 Guess the Function
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-23 22:00:51 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,861 bytes |
| コンパイル時間 | 8,159 ms |
| コンパイル使用メモリ | 413,340 KB |
| 最終ジャッジ日時 | 2025-02-15 01:01:32 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 10 |
ソースコード
// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
#include <boost/multiprecision/cpp_int.hpp>
namespace mp = boost::multiprecision;
using Bint = mp::cpp_int;
typedef long long ll;
const ll INF = 1e18;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++)
#define all(v) v.begin(), v.end()
#define llpow(x, y) (ll) pow(x, y)
#define llacumulate(v) accumulate(all(v), 0LL)
// #define endl "\n"
struct Fast
{
Fast()
{
std::cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(15);
}
} fast;
template <typename T>
bool chmax(T &a, const T &b)
{
if (a < b)
{
a = b;
return true;
}
return false;
}
template <typename T>
bool chmin(T &a, const T &b)
{
if (a > b)
{
a = b;
return true;
}
return false;
}
#ifdef LOCAL
#include <library/debug_print.hpp>
#define debug(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__)
#else
#define debug(...) (static_cast<void>(0))
#endif
int main()
{
ll cnt = 0, point = -1, a, b, before = -1;
while (true)
{
cout << "? " << cnt << endl;
ll t;
cin >> t;
if (t == 0)
{
if (point == -1)
point = cnt;
else
{
if (before == -1)
{
point = -1;
continue;
}
else
{
a = before;
b = cnt - point;
break;
}
}
}
cnt++;
before = t;
}
cout << "! " << a << " " << b << endl;
}