Submission #44444

# Submission time Handle Problem Language Result Execution time Memory
44444 2018-04-02T07:38:58 Z khohko Broken Device (JOI17_broken_device) C++17
0 / 100
5 ms 2872 KB
#include <bits/stdc++.h>
//#include "grader.cpp"
#include "Annalib.h"
//#include "Brunolib.h"

#pragma GCC optimize("O3")
using namespace std;
#define ll long long
#define lol long long
#define pb push_back
//#define mp make_pair
#define fr first
#define sc second
#define MAX ((lol)(1e9+100))
#define MX ((lol)(4e9+100))
#define ARRS ((lol)(1e6+100))
#define MOD ((lol)(1e9+7))
#define EP ((double)(1e-9))
#define EPS ((double)(1e-8))
#define pb push_back
#define PI ((double)3.141592653)
#define LG 21




void Anna( int N, long long X, int K, int P[] ){
    int f[300];
    for(int i=0; i<N; i++)f[i]=0;
    for(int i=0; i<K; i++)
        f[P[i]]=1;
    f[N]=1;
    for(int i=0; i<N; i++){
      //  cout<<X<<endl;
        if(X){
            if(X&1){
                if(!f[i]&&!f[i+1]){
                    Set(i,1);
                    Set(i+1,1);
                    X>>=1ll;
                    i++;
                    continue;
                }
            }
            else {
                if(!f[i]){
                    Set(i,1);
                    X>>=1;
                    i++;
                    Set(i,0);
                    continue;
                }
            }
            if(f[i])Set(i,0);
        }
        else Set(i,0);
    }
   // cout<<X<<endl;
}



#include <bits/stdc++.h>
//#include "grader.cpp"
#include "Brunolib.h"

#pragma GCC optimize("O3")
using namespace std;
#define ll long long
#define lol long long
#define pb push_back
//#define mp make_pair
#define fr first
#define sc second
#define MAX ((lol)(1e9+100))
#define MX ((lol)(4e9+100))
#define ARRS ((lol)(1e6+100))
#define MOD ((lol)(1e9+7))
#define EP ((double)(1e-9))
#define EPS ((double)(1e-8))
#define pb push_back
#define PI ((double)3.141592653)
#define LG 21



long long Bruno( int N, int A[] ){
    ll p=0;
    ll k=1;
    for(int i=0; i<N; i++){
        if(A[i]&&A[i+1])p+=k,k*=2ll,i++;
        else if(A[i])k*=2ll;
    }
  //  cout<<p<<endl;
    return p;
}


//
//int main(){
//    #ifdef KHOKHO
//        freopen("in.in","r",stdin);
//        freopen("out.out","w",stdout);
//    #endif // KHOKHO
//    cin>>n;
//
//}
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 624 KB Wrong Answer [4]
2 Incorrect 4 ms 1112 KB Wrong Answer [4]
3 Incorrect 5 ms 1132 KB Wrong Answer [4]
4 Incorrect 5 ms 1272 KB Wrong Answer [1]
5 Incorrect 4 ms 1336 KB Wrong Answer [4]
6 Incorrect 4 ms 1504 KB Wrong Answer [4]
7 Incorrect 4 ms 1560 KB Wrong Answer [4]
8 Incorrect 5 ms 1624 KB Wrong Answer [4]
9 Incorrect 4 ms 1700 KB Wrong Answer [4]
10 Incorrect 4 ms 1728 KB Wrong Answer [4]
11 Incorrect 4 ms 1832 KB Wrong Answer [4]
12 Incorrect 4 ms 1864 KB Wrong Answer [4]
13 Incorrect 4 ms 1928 KB Wrong Answer [4]
14 Incorrect 4 ms 1960 KB Wrong Answer [4]
15 Incorrect 4 ms 2056 KB Wrong Answer [4]
16 Incorrect 4 ms 2344 KB Wrong Answer [4]
17 Incorrect 4 ms 2344 KB Wrong Answer [4]
18 Incorrect 4 ms 2344 KB Wrong Answer [4]
19 Incorrect 4 ms 2344 KB Wrong Answer [4]
20 Incorrect 4 ms 2344 KB Wrong Answer [4]
21 Incorrect 4 ms 2344 KB Wrong Answer [4]
22 Incorrect 4 ms 2344 KB Wrong Answer [4]
23 Incorrect 4 ms 2344 KB Wrong Answer [4]
24 Incorrect 4 ms 2368 KB Wrong Answer [4]
25 Incorrect 4 ms 2384 KB Wrong Answer [1]
26 Incorrect 4 ms 2408 KB Wrong Answer [1]
27 Incorrect 4 ms 2440 KB Wrong Answer [4]
28 Incorrect 4 ms 2472 KB Wrong Answer [1]
29 Incorrect 4 ms 2520 KB Wrong Answer [1]
30 Incorrect 4 ms 2536 KB Wrong Answer [4]
31 Incorrect 4 ms 2568 KB Wrong Answer [1]
32 Incorrect 4 ms 2616 KB Wrong Answer [4]
33 Incorrect 4 ms 2632 KB Wrong Answer [4]
34 Incorrect 4 ms 2664 KB Wrong Answer [4]
35 Incorrect 5 ms 2708 KB Wrong Answer [1]
36 Incorrect 4 ms 2720 KB Wrong Answer [4]
37 Incorrect 4 ms 2744 KB Wrong Answer [4]
38 Incorrect 4 ms 2744 KB Wrong Answer [4]
39 Incorrect 4 ms 2832 KB Wrong Answer [4]
40 Incorrect 4 ms 2872 KB Wrong Answer [4]