답안 #568279

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
568279 2022-05-25T05:34:22 Z zaneyu Broken Device 2 (JOI22_device2) C++17
80 / 100
103 ms 3640 KB
#include "Anna.h"
#include <utility>
#include <bits/stdc++.h>
using namespace std;
namespace {

int variable_example = 0;

}
#define REP(i,n) for(int i=0;i<n;i++)
#define pb push_back
int Declare() {
    return 180;
}

std::pair<std::vector<int>, std::vector<int> > Anna(long long A) {
    vector<int> a,b;
    REP(i,90) a.pb(0),a.pb(1);
    REP(i,60){
        bool bb=(A&(1LL<<i));
        REP(j,3) b.pb(bb);
    }
    return {a,b};
}
#include "Bruno.h"
#include <utility>
#include <bits/stdc++.h>
using namespace std;
namespace {

int variable_example = 0;

}
#define REP(i,n) for(int i=0;i<n;i++)
#define ll long long
long long Bruno(std::vector<int> u) {
    int cur=0;
    ll pw=1,ans=0;
    REP(i,360){
        if(u[i]==0) ++cur;
        else --cur;
        if(cur==3){
            pw*=2,cur-=3;
        }
        else if(cur==-2){
            ans+=pw;
            pw*=2;
            cur+=3;
        }
    }
    return ans;
}

Compilation message

Anna.cpp:7:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
    7 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~

Bruno.cpp:7:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
    7 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 508 KB Output is correct
2 Correct 95 ms 3336 KB Output is correct
3 Correct 78 ms 3308 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 508 KB Output is correct
2 Correct 95 ms 3336 KB Output is correct
3 Correct 78 ms 3308 KB Output is correct
4 Correct 81 ms 3344 KB Output is correct
5 Correct 103 ms 3456 KB Output is correct
6 Correct 85 ms 3336 KB Output is correct
7 Correct 84 ms 3548 KB Output is correct
8 Correct 80 ms 3444 KB Output is correct
9 Correct 84 ms 3388 KB Output is correct
10 Correct 90 ms 3476 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 508 KB Output is correct
2 Correct 95 ms 3336 KB Output is correct
3 Correct 78 ms 3308 KB Output is correct
4 Correct 81 ms 3344 KB Output is correct
5 Correct 103 ms 3456 KB Output is correct
6 Correct 85 ms 3336 KB Output is correct
7 Correct 84 ms 3548 KB Output is correct
8 Correct 80 ms 3444 KB Output is correct
9 Correct 84 ms 3388 KB Output is correct
10 Correct 90 ms 3476 KB Output is correct
11 Correct 80 ms 3344 KB Output is correct
12 Correct 80 ms 3332 KB Output is correct
13 Correct 91 ms 3496 KB Output is correct
14 Correct 86 ms 3484 KB Output is correct
15 Correct 91 ms 3640 KB Output is correct
16 Correct 79 ms 3468 KB Output is correct
17 Correct 86 ms 3556 KB Output is correct
18 Correct 91 ms 3584 KB Output is correct
19 Correct 90 ms 3472 KB Output is correct
20 Correct 81 ms 3336 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 508 KB Output is correct
2 Correct 95 ms 3336 KB Output is correct
3 Correct 78 ms 3308 KB Output is correct
4 Correct 81 ms 3344 KB Output is correct
5 Correct 103 ms 3456 KB Output is correct
6 Correct 85 ms 3336 KB Output is correct
7 Correct 84 ms 3548 KB Output is correct
8 Correct 80 ms 3444 KB Output is correct
9 Correct 84 ms 3388 KB Output is correct
10 Correct 90 ms 3476 KB Output is correct
11 Correct 80 ms 3344 KB Output is correct
12 Correct 80 ms 3332 KB Output is correct
13 Correct 91 ms 3496 KB Output is correct
14 Correct 86 ms 3484 KB Output is correct
15 Correct 91 ms 3640 KB Output is correct
16 Correct 79 ms 3468 KB Output is correct
17 Correct 86 ms 3556 KB Output is correct
18 Correct 91 ms 3584 KB Output is correct
19 Correct 90 ms 3472 KB Output is correct
20 Correct 81 ms 3336 KB Output is correct
21 Correct 91 ms 3336 KB Output is correct
22 Correct 87 ms 3388 KB Output is correct
23 Correct 82 ms 3328 KB Output is correct
24 Correct 84 ms 3420 KB Output is correct
25 Correct 84 ms 3376 KB Output is correct
26 Correct 86 ms 3488 KB Output is correct
27 Correct 81 ms 3496 KB Output is correct
28 Correct 86 ms 3436 KB Output is correct
29 Correct 82 ms 3392 KB Output is correct
30 Correct 80 ms 3556 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 508 KB Output is correct
2 Correct 95 ms 3336 KB Output is correct
3 Correct 78 ms 3308 KB Output is correct
4 Correct 81 ms 3344 KB Output is correct
5 Correct 103 ms 3456 KB Output is correct
6 Correct 85 ms 3336 KB Output is correct
7 Correct 84 ms 3548 KB Output is correct
8 Correct 80 ms 3444 KB Output is correct
9 Correct 84 ms 3388 KB Output is correct
10 Correct 90 ms 3476 KB Output is correct
11 Correct 80 ms 3344 KB Output is correct
12 Correct 80 ms 3332 KB Output is correct
13 Correct 91 ms 3496 KB Output is correct
14 Correct 86 ms 3484 KB Output is correct
15 Correct 91 ms 3640 KB Output is correct
16 Correct 79 ms 3468 KB Output is correct
17 Correct 86 ms 3556 KB Output is correct
18 Correct 91 ms 3584 KB Output is correct
19 Correct 90 ms 3472 KB Output is correct
20 Correct 81 ms 3336 KB Output is correct
21 Correct 91 ms 3336 KB Output is correct
22 Correct 87 ms 3388 KB Output is correct
23 Correct 82 ms 3328 KB Output is correct
24 Correct 84 ms 3420 KB Output is correct
25 Correct 84 ms 3376 KB Output is correct
26 Correct 86 ms 3488 KB Output is correct
27 Correct 81 ms 3496 KB Output is correct
28 Correct 86 ms 3436 KB Output is correct
29 Correct 82 ms 3392 KB Output is correct
30 Correct 80 ms 3556 KB Output is correct
31 Correct 90 ms 3332 KB Output is correct
32 Correct 83 ms 3464 KB Output is correct
33 Correct 80 ms 3548 KB Output is correct
34 Correct 78 ms 3412 KB Output is correct
35 Correct 92 ms 3372 KB Output is correct
36 Correct 91 ms 3416 KB Output is correct
37 Correct 76 ms 3384 KB Output is correct
38 Correct 80 ms 3460 KB Output is correct
39 Correct 86 ms 3444 KB Output is correct
40 Correct 94 ms 3368 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 90 ms 3532 KB Output is partially correct
2 Partially correct 83 ms 3516 KB Output is partially correct
3 Partially correct 80 ms 3408 KB Output is partially correct
4 Partially correct 83 ms 3404 KB Output is partially correct
5 Partially correct 91 ms 3436 KB Output is partially correct
6 Partially correct 84 ms 3608 KB Output is partially correct
7 Partially correct 82 ms 3448 KB Output is partially correct
8 Partially correct 83 ms 3360 KB Output is partially correct
9 Partially correct 88 ms 3624 KB Output is partially correct
10 Partially correct 82 ms 3480 KB Output is partially correct
11 Partially correct 87 ms 3436 KB Output is partially correct
12 Partially correct 95 ms 3528 KB Output is partially correct
13 Partially correct 82 ms 3388 KB Output is partially correct
14 Partially correct 76 ms 3532 KB Output is partially correct
15 Partially correct 81 ms 3436 KB Output is partially correct
16 Partially correct 94 ms 3544 KB Output is partially correct
17 Partially correct 86 ms 3496 KB Output is partially correct
18 Partially correct 86 ms 3504 KB Output is partially correct
19 Partially correct 80 ms 3436 KB Output is partially correct
20 Partially correct 81 ms 3528 KB Output is partially correct