답안 #852154

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
852154 2023-09-21T10:27:44 Z Rafi22 Broken Device (JOI17_broken_device) C++14
0 / 100
38 ms 2812 KB
#include <bits/stdc++.h>
#include "Annalib.h"

#define ll long long
#define ld long double
#define endl '\n'
#define st first
#define nd second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
using namespace std;
//int inf=1000000007;
//int mod=1000000007;
//int mod1=998244353;

bool bad[157];
int res[157];

void Anna(int n,ll x,int k,int P[])
{
    srand(2137);
    vector<int>ord;
    for(int i=0;i<150;i++) ord.pb(i);
    random_shuffle(all(ord));
    for(int i=0;i<150;i++)
    {
        res[i]=0;
        bad[i]=0;
    }
    for(int i=0;i<k;i++) bad[P[i]]=1;
    for(int i=0;i<150;i+=2)
    {
        if(bad[ord[i]]||bad[ord[i+1]]) continue;
        if(x%3==0||x%3==2) res[ord[i]]=1;
        if(x%3==1||x%3==2) res[ord[i+1]]=1;
        x/=3;
    }
    for(int i=0;i<150;i++) Set(i,res[i]);
}
#include <bits/stdc++.h>
#include "Brunolib.h"

#define ll long long
#define ld long double
#define endl '\n'
#define st first
#define nd second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
using namespace std;
//int inf=1000000007;
//int mod=1000000007;
//int mod1=998244353;

ll Bruno(int n,int a[])
{
    srand(2137);
    vector<int>ord;
    for(int i=0;i<150;i++) ord.pb(i);
    ll wyn=0,p=1;
    for(int i=0;i<150;i+=2)
    {
        if(a[ord[i]]==0&&a[ord[i+1]]==0) continue;
        if(a[ord[i]]==0&&a[ord[i+1]]==1) wyn+=p;
        if(a[ord[i]]==1&&a[ord[i+1]]==1) wyn+=2*p;
        p*=3;
    }
    return wyn;
}

# 결과 실행 시간 메모리 Grader output
1 Partially correct 31 ms 2372 KB Output isn't correct - L* = 0
2 Partially correct 31 ms 2480 KB Output isn't correct - L* = 0
3 Partially correct 31 ms 2812 KB Output isn't correct - L* = 0
4 Partially correct 31 ms 2660 KB Output isn't correct - L* = 0
5 Partially correct 31 ms 2372 KB Output isn't correct - L* = 0
6 Partially correct 31 ms 2340 KB Output isn't correct - L* = 0
7 Partially correct 31 ms 2368 KB Output isn't correct - L* = 0
8 Partially correct 32 ms 2796 KB Output isn't correct - L* = 0
9 Partially correct 36 ms 2556 KB Output isn't correct - L* = 0
10 Partially correct 31 ms 2488 KB Output isn't correct - L* = 0
11 Partially correct 32 ms 2536 KB Output isn't correct - L* = 0
12 Partially correct 30 ms 2404 KB Output isn't correct - L* = 0
13 Partially correct 33 ms 2368 KB Output isn't correct - L* = 0
14 Partially correct 32 ms 2404 KB Output isn't correct - L* = 0
15 Partially correct 32 ms 2480 KB Output isn't correct - L* = 0
16 Partially correct 32 ms 2676 KB Output isn't correct - L* = 0
17 Partially correct 30 ms 2396 KB Output isn't correct - L* = 0
18 Partially correct 31 ms 2396 KB Output isn't correct - L* = 0
19 Partially correct 31 ms 2392 KB Output isn't correct - L* = 0
20 Partially correct 34 ms 2392 KB Output isn't correct - L* = 0
21 Partially correct 30 ms 2564 KB Output isn't correct - L* = 0
22 Partially correct 33 ms 2400 KB Output isn't correct - L* = 0
23 Partially correct 31 ms 2396 KB Output isn't correct - L* = 0
24 Partially correct 38 ms 2372 KB Output isn't correct - L* = 0
25 Partially correct 32 ms 2404 KB Output isn't correct - L* = 0
26 Partially correct 36 ms 2372 KB Output isn't correct - L* = 0
27 Partially correct 31 ms 2540 KB Output isn't correct - L* = 0
28 Partially correct 31 ms 2408 KB Output isn't correct - L* = 0
29 Partially correct 31 ms 2640 KB Output isn't correct - L* = 0
30 Partially correct 31 ms 2660 KB Output isn't correct - L* = 0
31 Partially correct 31 ms 2468 KB Output isn't correct - L* = 0
32 Partially correct 31 ms 2412 KB Output isn't correct - L* = 0
33 Partially correct 34 ms 2372 KB Output isn't correct - L* = 0
34 Partially correct 30 ms 2396 KB Output isn't correct - L* = 0
35 Partially correct 31 ms 2396 KB Output isn't correct - L* = 0
36 Partially correct 31 ms 2392 KB Output isn't correct - L* = 0
37 Partially correct 31 ms 2396 KB Output isn't correct - L* = 0
38 Partially correct 30 ms 2396 KB Output isn't correct - L* = 0
39 Partially correct 32 ms 2636 KB Output isn't correct - L* = 0
40 Partially correct 30 ms 2380 KB Output isn't correct - L* = 0