QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#137778#3097. ShoppingMohammed_Atalah0 4ms3884kbC++201.2kb2023-08-10 17:31:432023-08-10 17:31:46

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-08-10 17:31:46]
  • 评测
  • 测评结果:0
  • 用时:4ms
  • 内存:3884kb
  • [2023-08-10 17:31:43]
  • 提交

Anna

#include "Anna.h"
#include <vector>
#include <bits/stdc++.h>
using namespace std;
namespace {

int N, L, R;
int cnt;
vector<int> status;
int res;
}  // namespace

void InitA(int N, int L, int R) {
  ::N = N;
  ::L = L;
  ::R = R;
  res  = L;
  cnt  = 0;
  int l = L;
  for (int i  = 0; i <= 15; i ++) {
    if (l >> i) {
      SendA(1);
    } else {
      SendA(0);
    }
  }
}


void getans() {
  for (int i = L; i <= R; i ++) {
    if (status[i]) {
      res = i;
    }
  }
}
void ReceiveA(bool x) {
  // cout << x << ' ';
  status.push_back(x);
  cnt++;
  if (cnt == N) {
    getans();
  }
}

int Answer() {
  return res;
}

Bruno

#include "Bruno.h"
#include <vector>
#include <bits/stdc++.h>
using namespace std;

namespace {
int N;
vector<int> nums;
int cnt = 0;
int L = 0;
}

void minel() {

  for (int i  = 0; i < L; i ++) {
    SendB(0);
  }

  int mn = nums[L];
  SendB(1);
  for (int i = L + 1; i < N; i ++) {
    if (nums[i] < mn) {
      mn = nums[i];
      SendB(1);
    } else {
      SendB(0);
    }
  }
}

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

void ReceiveB(bool y) {
  if (y)
    L += pow(2, cnt);
  cnt++;
  if (cnt == 16) {
    minel();
  }
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 1
Accepted
time: 0ms
memory: 3416kb

input:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-1
-1
-1

output:

-1
1
-1
-1

input:


output:

Accepted: 16 1

result:

ok 

Test #2:

score: 1
Accepted
time: 1ms
memory: 3740kb

input:

1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-1
-1
-1

output:

-1
0
1
-1
-1

input:


output:

Accepted: 16 2

result:

ok 

Test #3:

score: 1
Accepted
time: 0ms
memory: 3624kb

input:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-1
-1
-1

output:

-1
1
1
0
-1
-1

input:


output:

Accepted: 16 3

result:

ok 

Test #4:

score: 1
Accepted
time: 1ms
memory: 3568kb

input:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-1
-1
-1

output:

-1
1
1
1
0
-1
-1

input:


output:

Accepted: 16 4

result:

ok 

Test #5:

score: 1
Accepted
time: 0ms
memory: 3884kb

input:

1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-1
-1
-1

output:

-1
0
0
0
1
1
-1
-1

input:


output:

Accepted: 16 5

result:

ok 

Test #6:

score: 1
Accepted
time: 4ms
memory: 3864kb

input:

1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
-1
-1
-1

output:

-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
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
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0...

input:


output:

Accepted: 16 977

result:

ok 

Test #7:

score: 1
Accepted
time: 4ms
memory: 3804kb

input:

1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
-1
-1
-1

output:

-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
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
1...

input:


output:

Accepted: 16 978

result:

ok 

Test #8:

score: 0
Wrong Answer
time: 1ms
memory: 3776kb

input:

1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
-1
-1
-1

output:

-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
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...

input:


output:

Wrong Answer [2]

result:

wrong answer 

Subtask #2:

score: 0
Skipped

Subtask #3:

score: 0
Skipped