답안 #681905

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
681905 2023-01-14T19:51:23 Z elkernos Broken Device 2 (JOI22_device2) C++17
80 / 100
96 ms 3668 KB
#include "Anna.h"
#include <utility>
#include <vector>

const int nax = 60;

int Declare() { return nax * 3; }

std::pair<std::vector<int>, std::vector<int>> Anna(long long A)
{
    std::vector<int> one, two;
    for (int i = 1; i <= nax * 3; i++)
        two.push_back(i % 2);
    for (int i = 0; i < nax; i++) {
        one.push_back((A & (1ll << i)) != 0);
        one.push_back((A & (1ll << i)) != 0);
        one.push_back((A & (1ll << i)) != 0);
    }
    return make_pair(one, two);
}
#include "Bruno.h"
#include <iostream>
#include <utility>
#include <vector>

long long Bruno(std::vector<int> u)
{
    long long ret = 0;
    long long cur_power = 1;
    int where = 0;
    for (int i = 0; i < (int)u.size(); i++) {
        // std::cerr << i << " == " << u[i] << std::endl;
        // std::cerr << where << " " << ret << std::endl;
        where += (u[i] == 1 ? +1 : -1);
        if (where == 3) {
            ret += cur_power;
            cur_power *= 2;
            where -= 3;
        }
        if (where == -2) {
            ret;
            cur_power *= 2;
            where += 3;
        }
    }
    std::cerr << ret << std::endl;
    return ret;
    //[0, 1] [3, 4] ... doesnt matter
}

Compilation message

Bruno.cpp: In function 'long long int Bruno(std::vector<int>)':
Bruno.cpp:21:13: warning: statement has no effect [-Wunused-value]
   21 |             ret;
      |             ^~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 512 KB Output is correct
2 Correct 74 ms 3364 KB Output is correct
3 Correct 78 ms 3376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 512 KB Output is correct
2 Correct 74 ms 3364 KB Output is correct
3 Correct 78 ms 3376 KB Output is correct
4 Correct 83 ms 3424 KB Output is correct
5 Correct 89 ms 3376 KB Output is correct
6 Correct 77 ms 3512 KB Output is correct
7 Correct 76 ms 3412 KB Output is correct
8 Correct 77 ms 3360 KB Output is correct
9 Correct 77 ms 3384 KB Output is correct
10 Correct 81 ms 3408 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 512 KB Output is correct
2 Correct 74 ms 3364 KB Output is correct
3 Correct 78 ms 3376 KB Output is correct
4 Correct 83 ms 3424 KB Output is correct
5 Correct 89 ms 3376 KB Output is correct
6 Correct 77 ms 3512 KB Output is correct
7 Correct 76 ms 3412 KB Output is correct
8 Correct 77 ms 3360 KB Output is correct
9 Correct 77 ms 3384 KB Output is correct
10 Correct 81 ms 3408 KB Output is correct
11 Correct 79 ms 3520 KB Output is correct
12 Correct 75 ms 3428 KB Output is correct
13 Correct 79 ms 3400 KB Output is correct
14 Correct 75 ms 3448 KB Output is correct
15 Correct 76 ms 3580 KB Output is correct
16 Correct 74 ms 3412 KB Output is correct
17 Correct 72 ms 3380 KB Output is correct
18 Correct 84 ms 3428 KB Output is correct
19 Correct 92 ms 3496 KB Output is correct
20 Correct 75 ms 3608 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 512 KB Output is correct
2 Correct 74 ms 3364 KB Output is correct
3 Correct 78 ms 3376 KB Output is correct
4 Correct 83 ms 3424 KB Output is correct
5 Correct 89 ms 3376 KB Output is correct
6 Correct 77 ms 3512 KB Output is correct
7 Correct 76 ms 3412 KB Output is correct
8 Correct 77 ms 3360 KB Output is correct
9 Correct 77 ms 3384 KB Output is correct
10 Correct 81 ms 3408 KB Output is correct
11 Correct 79 ms 3520 KB Output is correct
12 Correct 75 ms 3428 KB Output is correct
13 Correct 79 ms 3400 KB Output is correct
14 Correct 75 ms 3448 KB Output is correct
15 Correct 76 ms 3580 KB Output is correct
16 Correct 74 ms 3412 KB Output is correct
17 Correct 72 ms 3380 KB Output is correct
18 Correct 84 ms 3428 KB Output is correct
19 Correct 92 ms 3496 KB Output is correct
20 Correct 75 ms 3608 KB Output is correct
21 Correct 76 ms 3472 KB Output is correct
22 Correct 80 ms 3508 KB Output is correct
23 Correct 75 ms 3556 KB Output is correct
24 Correct 82 ms 3520 KB Output is correct
25 Correct 81 ms 3592 KB Output is correct
26 Correct 74 ms 3440 KB Output is correct
27 Correct 83 ms 3432 KB Output is correct
28 Correct 81 ms 3508 KB Output is correct
29 Correct 77 ms 3416 KB Output is correct
30 Correct 78 ms 3476 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 512 KB Output is correct
2 Correct 74 ms 3364 KB Output is correct
3 Correct 78 ms 3376 KB Output is correct
4 Correct 83 ms 3424 KB Output is correct
5 Correct 89 ms 3376 KB Output is correct
6 Correct 77 ms 3512 KB Output is correct
7 Correct 76 ms 3412 KB Output is correct
8 Correct 77 ms 3360 KB Output is correct
9 Correct 77 ms 3384 KB Output is correct
10 Correct 81 ms 3408 KB Output is correct
11 Correct 79 ms 3520 KB Output is correct
12 Correct 75 ms 3428 KB Output is correct
13 Correct 79 ms 3400 KB Output is correct
14 Correct 75 ms 3448 KB Output is correct
15 Correct 76 ms 3580 KB Output is correct
16 Correct 74 ms 3412 KB Output is correct
17 Correct 72 ms 3380 KB Output is correct
18 Correct 84 ms 3428 KB Output is correct
19 Correct 92 ms 3496 KB Output is correct
20 Correct 75 ms 3608 KB Output is correct
21 Correct 76 ms 3472 KB Output is correct
22 Correct 80 ms 3508 KB Output is correct
23 Correct 75 ms 3556 KB Output is correct
24 Correct 82 ms 3520 KB Output is correct
25 Correct 81 ms 3592 KB Output is correct
26 Correct 74 ms 3440 KB Output is correct
27 Correct 83 ms 3432 KB Output is correct
28 Correct 81 ms 3508 KB Output is correct
29 Correct 77 ms 3416 KB Output is correct
30 Correct 78 ms 3476 KB Output is correct
31 Correct 76 ms 3500 KB Output is correct
32 Correct 79 ms 3488 KB Output is correct
33 Correct 78 ms 3460 KB Output is correct
34 Correct 81 ms 3360 KB Output is correct
35 Correct 77 ms 3380 KB Output is correct
36 Correct 74 ms 3368 KB Output is correct
37 Correct 73 ms 3364 KB Output is correct
38 Correct 79 ms 3476 KB Output is correct
39 Correct 96 ms 3412 KB Output is correct
40 Correct 75 ms 3428 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 82 ms 3588 KB Output is partially correct
2 Partially correct 79 ms 3456 KB Output is partially correct
3 Partially correct 77 ms 3648 KB Output is partially correct
4 Partially correct 77 ms 3492 KB Output is partially correct
5 Partially correct 78 ms 3484 KB Output is partially correct
6 Partially correct 82 ms 3620 KB Output is partially correct
7 Partially correct 79 ms 3604 KB Output is partially correct
8 Partially correct 79 ms 3568 KB Output is partially correct
9 Partially correct 79 ms 3500 KB Output is partially correct
10 Partially correct 77 ms 3652 KB Output is partially correct
11 Partially correct 78 ms 3668 KB Output is partially correct
12 Partially correct 76 ms 3512 KB Output is partially correct
13 Partially correct 76 ms 3488 KB Output is partially correct
14 Partially correct 73 ms 3592 KB Output is partially correct
15 Partially correct 78 ms 3564 KB Output is partially correct
16 Partially correct 78 ms 3568 KB Output is partially correct
17 Partially correct 78 ms 3468 KB Output is partially correct
18 Partially correct 78 ms 3600 KB Output is partially correct
19 Partially correct 77 ms 3456 KB Output is partially correct
20 Partially correct 77 ms 3656 KB Output is partially correct