QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#777068 | #9794. ICPC Shenyang in NEU, the Tenth Consecutive Year | SkySummer | AC ✓ | 5ms | 3632kb | C++20 | 869b | 2024-11-23 22:32:50 | 2024-11-23 22:32:51 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define de(a) cout << #a << " = " << a << "\n"
#define deg(a) cout << #a << " = " << a << " "
const long double pi = acos(-1);
constexpr long double eps = 1e-12;
constexpr long long inf = 0x3f3f3f3f3f3f3f3f;
constexpr long long mod = 998244353;
constexpr int N = 1e6 + 10;
constexpr int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
void solve() {
for (int i = 2023; i > 1923; i--) {
cout << "? " << i << endl;
int x;
cin >> x;
if (x) {
cout << "! " << i << endl;
return;
}
}
cout << "! 1923" << endl;
}
signed main() {
ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
int T = 1;
cin >> T, cin.get();
while (T--) {
solve();
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3608kb
input:
1 0 0 0 0 0 0 0 0 0 1
output:
? 2023 ? 2022 ? 2021 ? 2020 ? 2019 ? 2018 ? 2017 ? 2016 ? 2015 ? 2014 ! 2014
result:
ok correct! (1 test case)
Test #2:
score: 0
Accepted
time: 5ms
memory: 3632kb
input:
100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
output:
? 2023 ? 2022 ? 2021 ? 2020 ? 2019 ? 2018 ? 2017 ? 2016 ? 2015 ? 2014 ? 2013 ? 2012 ? 2011 ? 2010 ? 2009 ? 2008 ? 2007 ? 2006 ? 2005 ? 2004 ? 2003 ? 2002 ? 2001 ? 2000 ? 1999 ? 1998 ? 1997 ? 1996 ? 1995 ? 1994 ? 1993 ? 1992 ? 1991 ? 1990 ? 1989 ? 1988 ? 1987 ? 1986 ? 1985 ? 1984 ? 1983 ? 1982 ? 1981...
result:
ok correct! (100 test cases)
Extra Test:
score: 0
Extra Test Passed