Submission #60993

# Submission time Handle Problem Language Result Execution time Memory
60993 2018-07-25T05:31:00 Z 조민규(#2136) Broken Device (JOI17_broken_device) C++11
41 / 100
100 ms 4520 KB
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <tuple>
#include <iterator>

#include "Annalib.h"

bool chk[200];
int res[200];

void Anna(int N, long long X, int K, int P[])
{
    memset(chk, 0, sizeof chk);
    memset(res, 0, sizeof res);

    for(int i = 0; i < K; i++)
        chk[P[i]] = 1;

    int t = 0;
    for(int i = 0; i < N - 1; i++)
    {
        if(!chk[i] && !chk[i + 1])
        {
            res[i] = 1;
            res[i + 1] = (X >> t++) & 1;
            i++;
            if(t == 60)
                break;
        }
    }

    for(int i = 0; i < N; i++)
        Set(i, res[i]);
}
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <tuple>
#include <iterator>

#include "Brunolib.h"

long long Bruno(int N, int A[])
{
    long long r = 0;
    int t = 0;
    for(int i = 0; i < N - 1; i++)
    {
        if(A[i])
        {
            r += (0LL + A[i + 1]) << t++;
            i++;
            if(t == 60)
                break;
        }
    }

    return r;
}
# Verdict Execution time Memory Grader output
1 Partially correct 58 ms 3056 KB Output is partially correct - L* = 15
2 Partially correct 52 ms 3864 KB Output is partially correct - L* = 15
3 Partially correct 65 ms 4208 KB Output is partially correct - L* = 17
4 Partially correct 64 ms 4232 KB Output is partially correct - L* = 16
5 Partially correct 100 ms 4232 KB Output is partially correct - L* = 15
6 Partially correct 69 ms 4232 KB Output is partially correct - L* = 15
7 Partially correct 66 ms 4280 KB Output is partially correct - L* = 18
8 Partially correct 52 ms 4280 KB Output is partially correct - L* = 18
9 Partially correct 56 ms 4280 KB Output is partially correct - L* = 16
10 Partially correct 72 ms 4520 KB Output is partially correct - L* = 16
11 Partially correct 48 ms 4520 KB Output is partially correct - L* = 17
12 Partially correct 67 ms 4520 KB Output is partially correct - L* = 17
13 Partially correct 56 ms 4520 KB Output is partially correct - L* = 15
14 Partially correct 68 ms 4520 KB Output is partially correct - L* = 15
15 Partially correct 63 ms 4520 KB Output is partially correct - L* = 16
16 Partially correct 61 ms 4520 KB Output is partially correct - L* = 15
17 Partially correct 52 ms 4520 KB Output is partially correct - L* = 17
18 Partially correct 72 ms 4520 KB Output is partially correct - L* = 16
19 Partially correct 66 ms 4520 KB Output is partially correct - L* = 18
20 Partially correct 49 ms 4520 KB Output is partially correct - L* = 15
21 Partially correct 65 ms 4520 KB Output is partially correct - L* = 15
22 Partially correct 59 ms 4520 KB Output is partially correct - L* = 15
23 Partially correct 62 ms 4520 KB Output is partially correct - L* = 15
24 Partially correct 47 ms 4520 KB Output is partially correct - L* = 17
25 Partially correct 47 ms 4520 KB Output is partially correct - L* = 15
26 Partially correct 77 ms 4520 KB Output is partially correct - L* = 16
27 Partially correct 56 ms 4520 KB Output is partially correct - L* = 15
28 Partially correct 51 ms 4520 KB Output is partially correct - L* = 16
29 Partially correct 60 ms 4520 KB Output is partially correct - L* = 15
30 Partially correct 49 ms 4520 KB Output is partially correct - L* = 16
31 Partially correct 46 ms 4520 KB Output is partially correct - L* = 15
32 Partially correct 59 ms 4520 KB Output is partially correct - L* = 16
33 Partially correct 47 ms 4520 KB Output is partially correct - L* = 15
34 Partially correct 48 ms 4520 KB Output is partially correct - L* = 16
35 Partially correct 63 ms 4520 KB Output is partially correct - L* = 15
36 Partially correct 51 ms 4520 KB Output is partially correct - L* = 15
37 Partially correct 59 ms 4520 KB Output is partially correct - L* = 16
38 Partially correct 52 ms 4520 KB Output is partially correct - L* = 17
39 Partially correct 60 ms 4520 KB Output is partially correct - L* = 15
40 Partially correct 56 ms 4520 KB Output is partially correct - L* = 15