QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#718873#9577. Ah? It's Not Yesterday Once More?Suhy#AC ✓3ms3864kbC++14358b2024-11-06 21:39:192024-11-06 21:39:22

Judging History

This is the latest submission verdict.

  • [2024-11-06 21:39:22]
  • Judged
  • Verdict: AC
  • Time: 3ms
  • Memory: 3864kb
  • [2024-11-06 21:39:19]
  • Submitted

answer

#include <bits/stdc++.h>
#define ll long long

const int maxn = 505;

using namespace std;

int t;

int main()
{
    cin>>t;
    while(t --)
    {
        int x = 0;
        scanf("%d %d", &x, &x);
        printf("? 1\n");
        fflush(stdout);
        scanf("%d", &x);
        printf("! %d\n", x + 1);
        fflush(stdout);
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3860kb

input:

2
20 25
20
100 200
158

output:

? 1
! 21
? 1
! 159

result:

ok OK (2 test cases)

Test #2:

score: 0
Accepted
time: 2ms
memory: 3864kb

input:

100
167959139 481199252
183291049
336470888 634074578
482693002
642802746 740396295
685126670
579721198 773386884
711109281
396628655 503722503
468540029
202647942 971207868
874657454
2087506 268792718
32340192
46761498 443917727
399206275
16843338 125908043
33683045
691952768 717268783
707040448
15...

output:

? 1
! 183291050
? 1
! 482693003
? 1
! 685126671
? 1
! 711109282
? 1
! 468540030
? 1
! 874657455
? 1
! 32340193
? 1
! 399206276
? 1
! 33683046
? 1
! 707040449
? 1
! 261201327
? 1
! 529073882
? 1
! 761200937
? 1
! 700304753
? 1
! 387514062
? 1
! 441968636
? 1
! 157466184
? 1
! 382927608
? 1
! 14562643...

result:

ok OK (100 test cases)

Test #3:

score: 0
Accepted
time: 3ms
memory: 3808kb

input:

100
361667059 361667062
361667059
966088223 966088226
966088224
776686324 776686326
776686325
963822972 963822973
963822971
909032609 909032613
909032609
354392326 354392327
354392325
719792919 719792920
719792918
114234328 114234332
114234330
396337755 396337758
396337754
11308832 11308832
11308831...

output:

? 1
! 361667060
? 1
! 966088225
? 1
! 776686326
? 1
! 963822972
? 1
! 909032610
? 1
! 354392326
? 1
! 719792919
? 1
! 114234331
? 1
! 396337755
? 1
! 11308832
? 1
! 920744015
? 1
! 35937909
? 1
! 949718872
? 1
! 736407742
? 1
! 166967811
? 1
! 208717700
? 1
! 262242206
? 1
! 456287329
? 1
! 87744390...

result:

ok OK (100 test cases)