답안 #959085

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
959085 2024-04-07T13:16:02 Z De3b0o Broken Device (JOI17_broken_device) C++14
41 / 100
50 ms 2932 KB
#include "Annalib.h"
#include<bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define in insert
#define pb push_back
#define ppb pop_back()
#define d3 ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define cans cout << ans << "\n";
#define yes cout << "Yes" << "\n";
#define no cout << "No" << "\n";
#define pll pair<ll,ll>
#define lin cout << "\n";
#define sqr 340
#define mod 1000000007
#define mid ((l+r)/2)
#define lc (2*n)
#define rc (2*n+1)

using namespace std;

void Anna(int N, long long X, int K, int P[])
{
    ll b = 1;
    map<ll,bool> mp;
    for(int i = 0 ; K>i ; i++)
        mp[P[i]]=1;
    for(int i = 0 ; 150>i ; i+=2)
    {
        if(b&X)
        {
            if(mp[i]==1||mp[i+1]==1)
            {
                Set(i,0);
                Set(i+1,0);
                continue;
            }
            Set(i,1);
            Set(i+1,1);
            b*=2;
        }
        else
        {
            if(mp[i]==1&&mp[i+1]==1)
            {
                Set(i,0);
                Set(i+1,0);
                continue;
            }
            if(mp[i]==1||mp[i+1]==1)
            {
                Set(i,1);
                Set(i+1,1);
                b*=2;
                continue;
            }
            Set(i,1);
            Set(i+1,0);
            b*=2;
        }
    }
}
#include "Brunolib.h"
#include<bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define in insert
#define pb push_back
#define ppb pop_back()
#define d3 ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define cans cout << ans << "\n";
#define yes cout << "Yes" << "\n";
#define no cout << "No" << "\n";
#define pll pair<ll,ll>
#define lin cout << "\n";
#define sqr 340
#define mod 1000000007
#define mid ((l+r)/2)
#define lc (2*n)
#define rc (2*n+1)

using namespace std;

long long Bruno( int N, int A[] )
{
    ll b = 1;
    ll ans = 0;
    for(int i = 0 ; 150>i ; i+=2)
    {
        ll c = 0;
        if(A[i]==1)
            c++;
        if(A[i+1]==1)
            c++;
        if(c==0)
            continue;
        if(c==2)
            ans+=b;
        b*=2;
    }
    return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 34 ms 2776 KB Output is partially correct - L* = 17
2 Partially correct 38 ms 2676 KB Output is partially correct - L* = 16
3 Partially correct 41 ms 2636 KB Output is partially correct - L* = 18
4 Partially correct 36 ms 2656 KB Output is partially correct - L* = 17
5 Partially correct 37 ms 2756 KB Output is partially correct - L* = 17
6 Partially correct 50 ms 2644 KB Output is partially correct - L* = 17
7 Partially correct 36 ms 2736 KB Output is partially correct - L* = 18
8 Partially correct 34 ms 2776 KB Output is partially correct - L* = 18
9 Partially correct 36 ms 2752 KB Output is partially correct - L* = 18
10 Partially correct 38 ms 2780 KB Output is partially correct - L* = 16
11 Partially correct 38 ms 2796 KB Output is partially correct - L* = 17
12 Partially correct 34 ms 2640 KB Output is partially correct - L* = 17
13 Partially correct 34 ms 2756 KB Output is partially correct - L* = 18
14 Partially correct 46 ms 2720 KB Output is partially correct - L* = 18
15 Partially correct 43 ms 2888 KB Output is partially correct - L* = 16
16 Partially correct 39 ms 2612 KB Output is partially correct - L* = 17
17 Partially correct 37 ms 2620 KB Output is partially correct - L* = 17
18 Partially correct 36 ms 2888 KB Output is partially correct - L* = 16
19 Partially correct 38 ms 2668 KB Output is partially correct - L* = 18
20 Partially correct 42 ms 2696 KB Output is partially correct - L* = 15
21 Partially correct 34 ms 2840 KB Output is partially correct - L* = 17
22 Partially correct 41 ms 2844 KB Output is partially correct - L* = 16
23 Partially correct 34 ms 2860 KB Output is partially correct - L* = 15
24 Partially correct 37 ms 2628 KB Output is partially correct - L* = 17
25 Partially correct 37 ms 2680 KB Output is partially correct - L* = 17
26 Partially correct 36 ms 2692 KB Output is partially correct - L* = 16
27 Partially correct 36 ms 2676 KB Output is partially correct - L* = 18
28 Partially correct 37 ms 2840 KB Output is partially correct - L* = 17
29 Partially correct 49 ms 2664 KB Output is partially correct - L* = 16
30 Partially correct 38 ms 2844 KB Output is partially correct - L* = 20
31 Partially correct 41 ms 2716 KB Output is partially correct - L* = 17
32 Partially correct 36 ms 2720 KB Output is partially correct - L* = 18
33 Partially correct 36 ms 2688 KB Output is partially correct - L* = 17
34 Partially correct 37 ms 2668 KB Output is partially correct - L* = 18
35 Partially correct 36 ms 2752 KB Output is partially correct - L* = 16
36 Partially correct 45 ms 2776 KB Output is partially correct - L* = 15
37 Partially correct 37 ms 2932 KB Output is partially correct - L* = 16
38 Partially correct 38 ms 2776 KB Output is partially correct - L* = 18
39 Partially correct 39 ms 2740 KB Output is partially correct - L* = 17
40 Partially correct 34 ms 2816 KB Output is partially correct - L* = 15