답안 #1007598

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1007598 2024-06-25T08:49:56 Z Unforgettablepl Shopping (JOI21_shopping) C++17
10 / 100
56 ms 1092 KB
#include "Anna.h"
#include <vector>

using namespace std;

namespace {
int L, R;
vector<bool> minima;
}  // namespace

void InitA(int N, int L, int R) {
    ::L = L;
    ::R = R;
    for(int bit=0;bit<18;bit++)SendA(L&(1<<bit));
}

void ReceiveA(bool x) {
    minima.emplace_back(x);
}

int Answer() {
    int last = 0;
    for(int i=0;i<=R-L;i++){
        if(minima[i])last=i;
    }
    return L+last;
}
#include "Bruno.h"
#include <vector>

using namespace std;

namespace {
vector<int> P;
int N;
int cnt;
int L;
}  // namespace

void InitB(int N, std::vector<int> P) {
    ::N = N;
    ::P = P;
}

void ReceiveB(bool y) {
    if(y)L|=1<<cnt;
    cnt++;
    if(cnt==18){
        int currmin = 1e9;
        for(int i=L;i<N;i++){
            if(currmin>P[i]){
                SendB(true);
                currmin = P[i];
            } else SendB(false);
        }
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 664 KB Output is correct
2 Correct 0 ms 664 KB Output is correct
3 Correct 0 ms 664 KB Output is correct
4 Correct 0 ms 664 KB Output is correct
5 Correct 0 ms 664 KB Output is correct
6 Correct 4 ms 664 KB Output is correct
7 Correct 3 ms 664 KB Output is correct
8 Correct 3 ms 664 KB Output is correct
9 Correct 1 ms 664 KB Output is correct
10 Correct 3 ms 664 KB Output is correct
11 Correct 4 ms 664 KB Output is correct
12 Correct 2 ms 664 KB Output is correct
13 Correct 3 ms 664 KB Output is correct
14 Correct 6 ms 664 KB Output is correct
15 Correct 4 ms 664 KB Output is correct
16 Correct 3 ms 664 KB Output is correct
17 Correct 4 ms 664 KB Output is correct
18 Correct 2 ms 664 KB Output is correct
19 Correct 2 ms 664 KB Output is correct
20 Correct 4 ms 664 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 664 KB Output is correct
2 Correct 0 ms 664 KB Output is correct
3 Correct 0 ms 664 KB Output is correct
4 Correct 0 ms 664 KB Output is correct
5 Correct 0 ms 664 KB Output is correct
6 Correct 4 ms 664 KB Output is correct
7 Correct 3 ms 664 KB Output is correct
8 Correct 3 ms 664 KB Output is correct
9 Correct 1 ms 664 KB Output is correct
10 Correct 3 ms 664 KB Output is correct
11 Correct 4 ms 664 KB Output is correct
12 Correct 2 ms 664 KB Output is correct
13 Correct 3 ms 664 KB Output is correct
14 Correct 6 ms 664 KB Output is correct
15 Correct 4 ms 664 KB Output is correct
16 Correct 3 ms 664 KB Output is correct
17 Correct 4 ms 664 KB Output is correct
18 Correct 2 ms 664 KB Output is correct
19 Correct 2 ms 664 KB Output is correct
20 Correct 4 ms 664 KB Output is correct
21 Correct 24 ms 916 KB Output is correct
22 Correct 41 ms 732 KB Output is correct
23 Correct 35 ms 840 KB Output is correct
24 Correct 19 ms 664 KB Output is correct
25 Correct 44 ms 1092 KB Output is correct
26 Correct 56 ms 844 KB Output is correct
27 Correct 13 ms 664 KB Output is correct
28 Correct 38 ms 664 KB Output is correct
29 Correct 47 ms 896 KB Output is correct
30 Correct 29 ms 836 KB Output is correct
31 Correct 13 ms 840 KB Output is correct
32 Correct 51 ms 904 KB Output is correct
33 Correct 22 ms 664 KB Output is correct
34 Correct 30 ms 840 KB Output is correct
35 Correct 3 ms 852 KB Output is correct
36 Correct 8 ms 664 KB Output is correct
37 Correct 33 ms 664 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 392 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -