QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#667021#7161. Guessing Gamespycoderyt#0 86ms3792kbC++141.3kb2024-10-22 20:46:472024-10-22 20:46:58

Judging History

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

  • [2024-10-22 20:46:58]
  • 评测
  • 测评结果:0
  • 用时:86ms
  • 内存:3792kb
  • [2024-10-22 20:46:47]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
int t,n,x,a,b;
int main() {
    cin>>t>>n;
    if(t==1) {
        cout << 50000 << endl;
        vector<int> used(n);
        for(int i = 0;i<n-2;i++) {
            cin>>x;
            used[x]=1;
            cout << 1 << endl;
        }
        for(int i = 0;i<n;i++){
            if(!used[n]){
                b = a;
                a = i;
            }
        }
        cin>>x;
        if(x==a) cout << b%50000 << endl;
        else cout << a%50000 << endl;
    } else {
        int cnt = 0,id1,id2;
        vector<int> v(n);
        for(int i = 0;i<n;i++) {
            cin>>v[i];
            if(v[i]!=1){
                cnt++;
                b = a;
                a = v[i];
                id2 = id1;
                id1 = i;
            }
        }
        if(cnt==1) {
            cout << a << " " << a+50000 << endl;
        } else {
            // id1 a, id2 b
            cout << id1 << " " << id2 << "\n";
        }
    }
}

/*


For C++ programs, first compile it (e.g. with g++ -g -O2 -std=gnu++17 -static
solution.cpp -o solution.out) and then run:


/usr/bin/g++ -g -O2 -std=gnu++17 brute_d.cpp -o solution.out
python3 testing_tool.py ./solution.out <<<"4 2"




*/

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 30
Acceptable Answer
time: 86ms
memory: 3792kb

input:

1 100000
12606
98679
1143
27998
32709
12689
96311
76575
72650
78703
62559
98406
20833
67597
18721
7007
37493
4265
64463
74773
99034
72638
1056
53975
99258
55401
24025
58380
25917
34732
15691
539
97052
60642
47161
10744
2593
58625
15172
39492
11676
19724
81135
15030
87595
85629
4673
1135
47214
47939
...

output:

50000
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

input:

2 100000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

22274 7507

result:

points 0.3 K = 50000

Test #2:

score: 30
Acceptable Answer
time: 44ms
memory: 3624kb

input:

1 100000
38514
17419
10576
87280
98864
81597
19515
92106
26349
5955
73089
70015
98666
9118
317
71655
22470
75805
77929
78171
65558
28649
2476
38029
91239
9210
60911
18271
53608
7294
40922
28450
77908
77013
22572
2450
46905
93971
2907
65440
47876
37174
39658
56133
32882
74971
50273
17994
43267
53219
...

output:

50000
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

input:

2 100000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

27106 3485

result:

points 0.3 K = 50000

Test #3:

score: 30
Acceptable Answer
time: 60ms
memory: 3660kb

input:

1 100000
80097
34254
41513
34684
86415
6098
85546
71570
49954
7003
87311
87545
16642
3073
97965
230
96895
55391
16777
834
87154
15277
44858
90686
29432
62504
81164
83217
81603
84622
71450
33717
37537
37084
12801
44442
31505
40313
83868
71449
89963
99124
57311
72344
32120
6987
50490
48207
88802
15024...

output:

50000
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

input:

1 100000
80097
34254
41513
34684
86415
6098
85546
71570
49954
7003
87311
87545
16642
3073
97965
230
96895
55391
16777
834
87154
15277
44858
90686
29432
62504
81164
83217
81603
84622
71450
33717
37537
37084
12801
44442
31505
40313
83868
71449
89963
99124
57311
72344
32120
6987
50490
48207
88802
15024...

output:

50000
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

input:

2 100000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

58291 49342

result:

points 0.3 K = 50000

Test #4:

score: 0
Wrong Answer
time: 50ms
memory: 3688kb

input:

1 100000
15878
88688
82336
30139
65268
47239
87781
5051
44568
85085
49085
53807
28588
73238
75394
99402
93799
76397
2599
73078
11774
44597
57292
719
2247
16380
58159
10711
20672
49229
49357
14262
6037
20481
74157
74600
25721
33186
61177
49542
46469
71949
65492
92141
69648
87023
89984
72094
99887
594...

output:

50000
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

input:

1 100000
15878
88688
82336
30139
65268
47239
87781
5051
44568
85085
49085
53807
28588
73238
75394
99402
93799
76397
2599
73078
11774
44597
57292
719
2247
16380
58159
10711
20672
49229
49357
14262
6037
20481
74157
74600
25721
33186
61177
49542
46469
71949
65492
92141
69648
87023
89984
72094
99887
594...

output:

50000
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

input:

2 100000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

49999 99999

result:

wrong answer Token "WA" doesn't correspond to pattern "OK"