Submission #1092170

# Submission time Handle Problem Language Result Execution time Memory
1092170 2024-09-23T12:27:53 Z onlk97 Ancient Machine 2 (JOI23_ancient2) C++17
37 / 100
65 ms 848 KB
#include "ancient2.h"
#include <string>
#include <vector>
#include <bits/stdc++.h>
using namespace std;

string Solve(int N){
    string ans="";
    for (int i=0; i<500; i++){
        vector <int> a(i+3,0),b(i+3,0);
        for (int j=0; j<i+3; j++) a[j]=b[j]=j;
        for (int j=0; j<i; j++){
            a[j]=j+1; b[j]=j+1;
        }
        a[i]=i+1; b[i]=i+2;
        int tp=Query(i+3,a,b);
        if (tp==i+1) ans+='0';
        else ans+='1';
    }
    for (int i=0; i<500; i++){
        vector <int> a(501,0),b(501,0);
        for (int j=0; j<500; j++) a[j]=b[j]=(j+1)%500;
        a[500]=b[500]=500;
        if (ans[i]=='0') b[i]=500;
        else a[i]=500;
        int tp=Query(501,a,b);
        if (tp==500){
            if (ans[i]=='0') ans+='1';
            else ans+='0';
        } else ans+=ans[i];
    }
    return ans;
}
# Verdict Execution time Memory Grader output
1 Partially correct 48 ms 556 KB Output is partially correct
2 Partially correct 53 ms 344 KB Output is partially correct
3 Partially correct 48 ms 344 KB Output is partially correct
4 Partially correct 55 ms 552 KB Output is partially correct
5 Partially correct 48 ms 344 KB Output is partially correct
6 Partially correct 43 ms 524 KB Output is partially correct
7 Partially correct 46 ms 600 KB Output is partially correct
8 Partially correct 54 ms 600 KB Output is partially correct
9 Partially correct 49 ms 792 KB Output is partially correct
10 Partially correct 42 ms 556 KB Output is partially correct
11 Partially correct 42 ms 600 KB Output is partially correct
12 Partially correct 56 ms 552 KB Output is partially correct
13 Partially correct 45 ms 548 KB Output is partially correct
14 Partially correct 42 ms 548 KB Output is partially correct
15 Partially correct 43 ms 644 KB Output is partially correct
16 Partially correct 43 ms 344 KB Output is partially correct
17 Partially correct 46 ms 848 KB Output is partially correct
18 Partially correct 56 ms 344 KB Output is partially correct
19 Partially correct 49 ms 548 KB Output is partially correct
20 Partially correct 53 ms 552 KB Output is partially correct
21 Partially correct 52 ms 556 KB Output is partially correct
22 Partially correct 46 ms 548 KB Output is partially correct
23 Partially correct 45 ms 552 KB Output is partially correct
24 Partially correct 51 ms 804 KB Output is partially correct
25 Partially correct 54 ms 676 KB Output is partially correct
26 Partially correct 47 ms 600 KB Output is partially correct
27 Partially correct 42 ms 548 KB Output is partially correct
28 Partially correct 53 ms 776 KB Output is partially correct
29 Partially correct 50 ms 552 KB Output is partially correct
30 Partially correct 43 ms 552 KB Output is partially correct
31 Partially correct 44 ms 600 KB Output is partially correct
32 Partially correct 46 ms 552 KB Output is partially correct
33 Partially correct 51 ms 560 KB Output is partially correct
34 Partially correct 51 ms 552 KB Output is partially correct
35 Partially correct 49 ms 344 KB Output is partially correct
36 Partially correct 52 ms 600 KB Output is partially correct
37 Partially correct 42 ms 344 KB Output is partially correct
38 Partially correct 43 ms 548 KB Output is partially correct
39 Partially correct 45 ms 344 KB Output is partially correct
40 Partially correct 50 ms 568 KB Output is partially correct
41 Partially correct 48 ms 548 KB Output is partially correct
42 Partially correct 50 ms 600 KB Output is partially correct
43 Partially correct 50 ms 556 KB Output is partially correct
44 Partially correct 43 ms 548 KB Output is partially correct
45 Partially correct 51 ms 548 KB Output is partially correct
46 Partially correct 60 ms 540 KB Output is partially correct
47 Partially correct 47 ms 724 KB Output is partially correct
48 Partially correct 54 ms 344 KB Output is partially correct
49 Partially correct 42 ms 552 KB Output is partially correct
50 Partially correct 60 ms 600 KB Output is partially correct
51 Partially correct 46 ms 552 KB Output is partially correct
52 Partially correct 46 ms 600 KB Output is partially correct
53 Partially correct 44 ms 344 KB Output is partially correct
54 Partially correct 49 ms 568 KB Output is partially correct
55 Partially correct 55 ms 548 KB Output is partially correct
56 Partially correct 42 ms 552 KB Output is partially correct
57 Partially correct 49 ms 552 KB Output is partially correct
58 Partially correct 60 ms 548 KB Output is partially correct
59 Partially correct 65 ms 556 KB Output is partially correct
60 Partially correct 43 ms 552 KB Output is partially correct
61 Partially correct 45 ms 596 KB Output is partially correct
62 Partially correct 49 ms 740 KB Output is partially correct
63 Partially correct 44 ms 552 KB Output is partially correct