QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#782013 | #9794. ICPC Shenyang in NEU, the Tenth Consecutive Year | Fuyuki_Vila | AC ✓ | 25ms | 3632kb | C++23 | 2.0kb | 2024-11-25 18:29:25 | 2024-11-25 18:29:26 |
Judging History
answer
#define GKD std::cin.tie(nullptr)->std::ios::sync_with_stdio(false)
#define clr(a, b) memset(a, b, sizeof(a))
#define cpy(a, b) memcpy(a, b, sizeof(a))
// #define _DEBUG
// #define PRIME
#include <bits/stdc++.h>
#ifdef _DEBUG
#define dbg(x...) \
do { \
std::cout << #x << " -> "; \
err(x); \
} while (0)
void err() { std::cout << std::endl; }
template <class T, class... Ts>
void err(T arg, Ts &...args) {
std::cout << arg << ' ';
err(args...);
}
#else
#define dbg(x...) 114514;
#endif
using namespace std;
using ll = long long;
using ull = unsigned long long;
constexpr int INF = 0x3f3f3f3f;
ll mod = 0;
inline ll qpow(ll _a, ll _n, ll _mod = mod) {
ll ans = 1;
while (_n) {
if (_n & 1) ans *= _a;
_n >>= 1;
_a *= _a;
if (_mod > 0) {
ans %= _mod;
_a %= _mod;
}
}
return ans;
}
#ifdef PRIME
namespace prime {
const int N = 1e7 + 100;
vector<int> minp(N);
vector<int> primes;
bitset<N> st;
void get_primes(int n) {
for (int i = 2; i <= n; i++) {
if (!st[i]) minp[i] = i, primes.emplace_back(i);
for (int j = 0; primes[j] * i <= n; j++) {
int t = primes[j] * i;
st[t] = true;
minp[t] = primes[j];
if (i % primes[j] == 0) break;
}
}
}
} // namespace prime
#endif
inline void init() {
/*Init Here*/
mod = 1e9 + 7;
}
void idol_produce(int testCase) {
for(int i = 1923; i <= 2022; i++){
cout << "? " << i << endl;
int x;
cin >> x;
if(x == 1){
cout << "! " << i << endl;
return;
}
}
cout << "! " << 2023 << endl;
}
signed main() {
// GKD;
init();
int T = 1;
cin >> T;
for (int i = 1; i <= T; i++) {
idol_produce(i);
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3632kb
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...
result:
ok correct! (1 test case)
Test #2:
score: 0
Accepted
time: 25ms
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 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 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 ...
output:
? 1923 ? 1924 ? 1925 ? 1926 ? 1927 ? 1928 ? 1929 ? 1930 ? 1931 ? 1932 ? 1933 ? 1934 ? 1935 ? 1936 ? 1937 ? 1938 ? 1939 ? 1940 ? 1941 ? 1942 ? 1943 ? 1944 ! 1944 ? 1923 ? 1924 ? 1925 ? 1926 ? 1927 ? 1928 ? 1929 ? 1930 ? 1931 ? 1932 ? 1933 ? 1934 ? 1935 ? 1936 ? 1937 ? 1938 ? 1939 ? 1940 ? 1941 ? 1942...
result:
ok correct! (100 test cases)
Extra Test:
score: 0
Extra Test Passed