Submission #814873

# Submission time Handle Problem Language Result Execution time Memory
814873 2023-08-08T10:52:03 Z konstantys Broken Device 2 (JOI22_device2) C++17
80 / 100
88 ms 3720 KB
#include "Anna.h"
#include <utility>
#include <vector>
#include<iostream>
using namespace std;
namespace {

int variable_example = 0;

}

int Declare() {
    variable_example++;
    return 180;
}

std::pair<std::vector<int>, std::vector<int> > Anna(long long A) {
    //cerr<<A<<"\n";
    vector<int> v1;
    vector<int> v2;
    for(int i=0;i<60;i++){
        if((1LL<<i)&A){
            v1.push_back(1);
            v1.push_back(1);
            v1.push_back(1);
        }else{
            v1.push_back(0);
            v1.push_back(0);
            v1.push_back(0);
        }
        v2.push_back(i&1);
        v2.push_back((i^1)&1);
        v2.push_back(i&1);
    }
    return {v1,v2};
}
#include "Bruno.h"
#include <utility>
#include <vector>
#include<iostream>
#define ll long long
using namespace std;
namespace {

int variable_example = 0;

}

long long Bruno(std::vector<int> u) {
    ll it=1,z=0,j=0,wyn=0;
    for(auto i:u){
       // cerr<<i<<" ";
        if(i==0) z++; else j++;
        if(z>=j+3){
            z-=3;
            it<<=1;
           // cerr<<" nowe zero ";
        }
        if(j>=z+2){
            j-=3;
            wyn|=it;
            it<<=1;
           // cerr<<" nowe jeden ";
        }
    }
    //cerr<<wyn<<"\n";
    return wyn;
}

Compilation message

Bruno.cpp:9:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
    9 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 512 KB Output is correct
2 Correct 77 ms 3372 KB Output is correct
3 Correct 66 ms 3388 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 512 KB Output is correct
2 Correct 77 ms 3372 KB Output is correct
3 Correct 66 ms 3388 KB Output is correct
4 Correct 78 ms 3504 KB Output is correct
5 Correct 73 ms 3720 KB Output is correct
6 Correct 79 ms 3500 KB Output is correct
7 Correct 70 ms 3476 KB Output is correct
8 Correct 74 ms 3496 KB Output is correct
9 Correct 68 ms 3452 KB Output is correct
10 Correct 68 ms 3588 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 512 KB Output is correct
2 Correct 77 ms 3372 KB Output is correct
3 Correct 66 ms 3388 KB Output is correct
4 Correct 78 ms 3504 KB Output is correct
5 Correct 73 ms 3720 KB Output is correct
6 Correct 79 ms 3500 KB Output is correct
7 Correct 70 ms 3476 KB Output is correct
8 Correct 74 ms 3496 KB Output is correct
9 Correct 68 ms 3452 KB Output is correct
10 Correct 68 ms 3588 KB Output is correct
11 Correct 81 ms 3480 KB Output is correct
12 Correct 80 ms 3500 KB Output is correct
13 Correct 68 ms 3388 KB Output is correct
14 Correct 69 ms 3468 KB Output is correct
15 Correct 83 ms 3628 KB Output is correct
16 Correct 73 ms 3492 KB Output is correct
17 Correct 66 ms 3500 KB Output is correct
18 Correct 71 ms 3448 KB Output is correct
19 Correct 67 ms 3508 KB Output is correct
20 Correct 77 ms 3352 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 512 KB Output is correct
2 Correct 77 ms 3372 KB Output is correct
3 Correct 66 ms 3388 KB Output is correct
4 Correct 78 ms 3504 KB Output is correct
5 Correct 73 ms 3720 KB Output is correct
6 Correct 79 ms 3500 KB Output is correct
7 Correct 70 ms 3476 KB Output is correct
8 Correct 74 ms 3496 KB Output is correct
9 Correct 68 ms 3452 KB Output is correct
10 Correct 68 ms 3588 KB Output is correct
11 Correct 81 ms 3480 KB Output is correct
12 Correct 80 ms 3500 KB Output is correct
13 Correct 68 ms 3388 KB Output is correct
14 Correct 69 ms 3468 KB Output is correct
15 Correct 83 ms 3628 KB Output is correct
16 Correct 73 ms 3492 KB Output is correct
17 Correct 66 ms 3500 KB Output is correct
18 Correct 71 ms 3448 KB Output is correct
19 Correct 67 ms 3508 KB Output is correct
20 Correct 77 ms 3352 KB Output is correct
21 Correct 68 ms 3380 KB Output is correct
22 Correct 73 ms 3332 KB Output is correct
23 Correct 69 ms 3460 KB Output is correct
24 Correct 80 ms 3424 KB Output is correct
25 Correct 88 ms 3492 KB Output is correct
26 Correct 77 ms 3412 KB Output is correct
27 Correct 79 ms 3424 KB Output is correct
28 Correct 75 ms 3548 KB Output is correct
29 Correct 78 ms 3456 KB Output is correct
30 Correct 70 ms 3432 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 512 KB Output is correct
2 Correct 77 ms 3372 KB Output is correct
3 Correct 66 ms 3388 KB Output is correct
4 Correct 78 ms 3504 KB Output is correct
5 Correct 73 ms 3720 KB Output is correct
6 Correct 79 ms 3500 KB Output is correct
7 Correct 70 ms 3476 KB Output is correct
8 Correct 74 ms 3496 KB Output is correct
9 Correct 68 ms 3452 KB Output is correct
10 Correct 68 ms 3588 KB Output is correct
11 Correct 81 ms 3480 KB Output is correct
12 Correct 80 ms 3500 KB Output is correct
13 Correct 68 ms 3388 KB Output is correct
14 Correct 69 ms 3468 KB Output is correct
15 Correct 83 ms 3628 KB Output is correct
16 Correct 73 ms 3492 KB Output is correct
17 Correct 66 ms 3500 KB Output is correct
18 Correct 71 ms 3448 KB Output is correct
19 Correct 67 ms 3508 KB Output is correct
20 Correct 77 ms 3352 KB Output is correct
21 Correct 68 ms 3380 KB Output is correct
22 Correct 73 ms 3332 KB Output is correct
23 Correct 69 ms 3460 KB Output is correct
24 Correct 80 ms 3424 KB Output is correct
25 Correct 88 ms 3492 KB Output is correct
26 Correct 77 ms 3412 KB Output is correct
27 Correct 79 ms 3424 KB Output is correct
28 Correct 75 ms 3548 KB Output is correct
29 Correct 78 ms 3456 KB Output is correct
30 Correct 70 ms 3432 KB Output is correct
31 Correct 70 ms 3592 KB Output is correct
32 Correct 83 ms 3460 KB Output is correct
33 Correct 77 ms 3456 KB Output is correct
34 Correct 82 ms 3472 KB Output is correct
35 Correct 86 ms 3532 KB Output is correct
36 Correct 66 ms 3456 KB Output is correct
37 Correct 72 ms 3540 KB Output is correct
38 Correct 74 ms 3412 KB Output is correct
39 Correct 76 ms 3404 KB Output is correct
40 Correct 80 ms 3548 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 72 ms 3396 KB Output is partially correct
2 Partially correct 69 ms 3480 KB Output is partially correct
3 Partially correct 73 ms 3368 KB Output is partially correct
4 Partially correct 69 ms 3500 KB Output is partially correct
5 Partially correct 71 ms 3532 KB Output is partially correct
6 Partially correct 80 ms 3456 KB Output is partially correct
7 Partially correct 69 ms 3516 KB Output is partially correct
8 Partially correct 69 ms 3524 KB Output is partially correct
9 Partially correct 70 ms 3380 KB Output is partially correct
10 Partially correct 77 ms 3400 KB Output is partially correct
11 Partially correct 69 ms 3456 KB Output is partially correct
12 Partially correct 75 ms 3436 KB Output is partially correct
13 Partially correct 69 ms 3504 KB Output is partially correct
14 Partially correct 71 ms 3468 KB Output is partially correct
15 Partially correct 70 ms 3608 KB Output is partially correct
16 Partially correct 75 ms 3420 KB Output is partially correct
17 Partially correct 69 ms 3456 KB Output is partially correct
18 Partially correct 79 ms 3444 KB Output is partially correct
19 Partially correct 75 ms 3452 KB Output is partially correct
20 Partially correct 76 ms 3468 KB Output is partially correct