답안 #921558

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
921558 2024-02-04T06:34:03 Z Darren0724 Shopping (JOI21_shopping) C++17
1 / 100
49 ms 4516 KB
#include "Anna.h"
#include <bits/stdc++.h>
using namespace std;

namespace {

int n, l, r;
int cnt=0;
const int INF=1e9;
vector<int> v;
}  // namespace

void InitA(int N, int L, int R) {
    n = N;
    l = L;
    r = R;
    v.resize(n);
}

void ReceiveA(bool x) {
    int x1=x;
    int p=cnt/10;
    int p1=cnt%10;
    v[p]+=(x1<<p1);
    cnt++;
}   

int Answer() {
    int ans=l;
    for(int i=l+1;i<=r;i++){
        ans=(v[ans]<v[i]?ans:i);
    }
    return ans;
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;

namespace {

int n;
vector<int> v(1000000);
int count;



}  // namespace

void InitB(int N, vector<int> P) {
    v=P;
    n=N;
    for(int i=0;i<N;i++){
        for(int j=0;j<10;j++){
            SendB((v[i]>>j)&1);
        }
    }
}

void ReceiveB(bool y) {
  
}

Compilation message

Bruno.cpp:9:5: warning: '{anonymous}::count' defined but not used [-Wunused-variable]
    9 | int count;
      |     ^~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4504 KB Output is correct
2 Correct 2 ms 4504 KB Output is correct
3 Correct 1 ms 4504 KB Output is correct
4 Correct 1 ms 4504 KB Output is correct
5 Correct 1 ms 4504 KB Output is correct
6 Correct 41 ms 4504 KB Output is correct
7 Correct 43 ms 4504 KB Output is correct
8 Correct 42 ms 4504 KB Output is correct
9 Correct 37 ms 4504 KB Output is correct
10 Correct 37 ms 4504 KB Output is correct
11 Correct 37 ms 4504 KB Output is correct
12 Correct 36 ms 4516 KB Output is correct
13 Correct 39 ms 4504 KB Output is correct
14 Correct 36 ms 4504 KB Output is correct
15 Correct 43 ms 4504 KB Output is correct
16 Correct 43 ms 4504 KB Output is correct
17 Correct 36 ms 4504 KB Output is correct
18 Correct 49 ms 4504 KB Output is correct
19 Correct 40 ms 4504 KB Output is correct
20 Correct 40 ms 4504 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4504 KB Output is correct
2 Correct 2 ms 4504 KB Output is correct
3 Correct 1 ms 4504 KB Output is correct
4 Correct 1 ms 4504 KB Output is correct
5 Correct 1 ms 4504 KB Output is correct
6 Correct 41 ms 4504 KB Output is correct
7 Correct 43 ms 4504 KB Output is correct
8 Correct 42 ms 4504 KB Output is correct
9 Correct 37 ms 4504 KB Output is correct
10 Correct 37 ms 4504 KB Output is correct
11 Correct 37 ms 4504 KB Output is correct
12 Correct 36 ms 4516 KB Output is correct
13 Correct 39 ms 4504 KB Output is correct
14 Correct 36 ms 4504 KB Output is correct
15 Correct 43 ms 4504 KB Output is correct
16 Correct 43 ms 4504 KB Output is correct
17 Correct 36 ms 4504 KB Output is correct
18 Correct 49 ms 4504 KB Output is correct
19 Correct 40 ms 4504 KB Output is correct
20 Correct 40 ms 4504 KB Output is correct
21 Incorrect 0 ms 332 KB Wrong Answer [4]
22 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 2 ms 4248 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -