結果
| 問題 |
No.2357 Guess the Function
|
| コンテスト | |
| ユーザー |
jabee
|
| 提出日時 | 2023-06-23 22:59:23 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,775 bytes |
| コンパイル時間 | 4,071 ms |
| コンパイル使用メモリ | 250,320 KB |
| 最終ジャッジ日時 | 2025-02-15 01:27:06 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 9 WA * 1 |
ソースコード
#include<bits/stdc++.h>
#include <math.h>
#include <algorithm>
#include <iostream>
#include <vector>
#include <atcoder/all>
#include <atcoder/dsu>
#include <atcoder/segtree>
#include <atcoder/lazysegtree>
#include <atcoder/modint>
#include <atcoder/scc>
#include <chrono>
#include <random>
#include <cassert>
#ifndef templete
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#include<boost/multiprecision/cpp_int.hpp>
//using namespace boost::multiprecision;
using namespace std;
using namespace atcoder;
//using atmint = modint998244353;
using atmint = modint;
using Graph = vector<vector<int>>;
using P = pair<long long,long long>;
//#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
#endif // templete
//---------------------------------------------------------------------------------------------------
void _main() {
ll x1 = 100;
cout << "? " << x1 << endl;
ll ans1;
cin >> ans1;
ll x2 = x1;
ll v = ans1;
while(v != -1){
x2--;
v--;
}
cout << "? " << x2 << endl;
ll ans2;
cin >> ans2;
rep(a,0,100)rep(b,a+1,101){
if((a+x1)%b == ans1 && (a+x2)%b == ans2){
cout << "! " << a << " " << b << endl;
return;
}
}
}
jabee