QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#782005#9794. ICPC Shenyang in NEU, the Tenth Consecutive YearFuyuki_VilaWA 3ms3708kbC++231.9kb2024-11-25 18:27:472024-11-25 18:27:56

Judging History

你现在查看的是最新测评结果

  • [2024-11-25 18:27:56]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:3708kb
  • [2024-11-25 18:27:47]
  • 提交

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 <= 2023; i++){
        cout << "? " << i << endl;
        int x;
        cin >> x;
        if(x == 1){
            cout << "! " << i << endl;
            return;
        }
    }
}

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: 2ms
memory: 3640kb

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: -100
Wrong Answer
time: 3ms
memory: 3708kb

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:

wrong answer number of queries exceeds the limit: 100 (test case 18)