답안 #126523

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
126523 2019-07-08T03:11:53 Z baluteshih Broken Device (JOI17_broken_device) C++14
0 / 100
44 ms 3344 KB
#include "Annalib.h"
#include <bits/stdc++.h>
#define jizz ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define pb push_back
#define MP make_pair
#define F first
#define S second
#define MEM(i,j) memset(i,j,sizeof i)
#define ALL(v) v.begin(),v.end()
#define ET cout << "\n"
#define DB(a,s,e) {for(int i=s;i<e;++i) cout << a[i] << " ";ET;}
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

void Anna( int N, long long X, int K, int P[] )
{
	bitset<150> bye,use;
	for(int i=0;i<K;++i)
		bye[i]=1;
	for(ll i=0,nw=1;i+1<N&&nw<=X;++i)
		if(!bye[i]&&!bye[i+1])
			if(nw&X)
				use[i]=use[i+1]=1,++i,nw<<=1;
			else
				use[i]=1,++i,nw<<=1;
	for(int i=0;i<N;++i)
		Set(i,use[i]);
}
#include "Brunolib.h"
#include <bits/stdc++.h>
#define jizz ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define pb push_back
#define MP make_pair
#define F first
#define S second
#define MEM(i,j) memset(i,j,sizeof i)
#define ALL(v) v.begin(),v.end()
#define ET cout << "\n"
#define DB(a,s,e) {for(int i=s;i<e;++i) cout << a[i] << " ";ET;}
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;


long long Bruno(int N,int A[])
{
	ll ans=0;
	for(ll i=0,nw=1;i<N;++i)
		if(A[i])
		{
			if(A[i+1]) ans|=nw;
			nw<<=1,++i;
		}
	return ans;
}

Compilation message

Anna.cpp: In function 'void Anna(int, long long int, int, int*)':
Anna.cpp:23:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
   if(!bye[i]&&!bye[i+1])
     ^
# 결과 실행 시간 메모리 Grader output
1 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
2 Incorrect 43 ms 3312 KB Output isn't correct - L* = 0
3 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
4 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
5 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
6 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
7 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
8 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
9 Incorrect 41 ms 3312 KB Output isn't correct - L* = 0
10 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
11 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
12 Incorrect 40 ms 3344 KB Output isn't correct - L* = 0
13 Incorrect 40 ms 3320 KB Output isn't correct - L* = 0
14 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
15 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
16 Incorrect 44 ms 3312 KB Output isn't correct - L* = 0
17 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
18 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
19 Incorrect 43 ms 3312 KB Output isn't correct - L* = 0
20 Incorrect 41 ms 3312 KB Output isn't correct - L* = 0
21 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
22 Incorrect 40 ms 3256 KB Output isn't correct - L* = 0
23 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
24 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
25 Incorrect 41 ms 3240 KB Output isn't correct - L* = 0
26 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
27 Incorrect 43 ms 3312 KB Output isn't correct - L* = 0
28 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
29 Incorrect 41 ms 3056 KB Output isn't correct - L* = 0
30 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
31 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
32 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
33 Incorrect 41 ms 3312 KB Output isn't correct - L* = 0
34 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
35 Incorrect 41 ms 3128 KB Output isn't correct - L* = 0
36 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0
37 Incorrect 40 ms 3096 KB Output isn't correct - L* = 0
38 Incorrect 44 ms 3312 KB Output isn't correct - L* = 0
39 Incorrect 40 ms 3256 KB Output isn't correct - L* = 0
40 Incorrect 40 ms 3312 KB Output isn't correct - L* = 0