QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#776947 | #9794. ICPC Shenyang in NEU, the Tenth Consecutive Year | Sound_Medium | TL | 0ms | 0kb | C++23 | 598b | 2024-11-23 21:51:21 | 2024-11-23 21:51:21 |
answer
#include <bits/stdc++.h>
#define int long long
#define double long double
using namespace std;
int n, m;
int ask (int t) {
cout << "? " << t << endl;
int x;
cin >> x;
return x;
}
int print (int x) {
cout << "! " << x << endl;
}
void solve () {
for (int i = 1923; i < 2023; i ++) {
if (ask (i) == 1) {
print (i);
return;
}
}
print (2023);
}
signed main () {
int T = 1;
std::ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
cin>>T;
while (T --) solve ();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Time Limit Exceeded
input:
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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
output:
? 1923 ? 1924 ? 1925 ? 1926 ? 1927 ? 1928 ? 1929 ? 1930 ? 1931 ? 1932 ? 1933 ? 1934 ? 1935 ? 1936 ? 1937 ? 1938 ? 1939 ? 1940 ? 1941 ? 1942 ? 1943 ? 1944 ? 1945 ? 1946 ? 1947 ? 1948 ? 1949 ? 1950 ? 1951 ? 1952 ? 1953 ? 1954 ? 1955 ? 1956 ? 1957 ? 1958 ? 1959 ? 1960 ? 1961 ? 1962 ? 1963 ? 1964 ? 1965...