답안 #126524

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
126524 2019-07-08T03:13:53 Z baluteshih Broken Device (JOI17_broken_device) C++14
0 / 100
42 ms 3848 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[P[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;
	DB(use,0,N)
	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 Execution timed out 40 ms 3568 KB Time limit exceeded (wall clock)
2 Execution timed out 40 ms 3568 KB Time limit exceeded (wall clock)
3 Execution timed out 39 ms 3568 KB Time limit exceeded (wall clock)
4 Execution timed out 41 ms 3512 KB Time limit exceeded (wall clock)
5 Execution timed out 41 ms 3568 KB Time limit exceeded (wall clock)
6 Execution timed out 40 ms 3568 KB Time limit exceeded (wall clock)
7 Execution timed out 40 ms 3568 KB Time limit exceeded (wall clock)
8 Execution timed out 41 ms 3568 KB Time limit exceeded (wall clock)
9 Execution timed out 40 ms 3568 KB Time limit exceeded (wall clock)
10 Execution timed out 40 ms 3576 KB Time limit exceeded (wall clock)
11 Execution timed out 39 ms 3568 KB Time limit exceeded (wall clock)
12 Execution timed out 39 ms 3640 KB Time limit exceeded (wall clock)
13 Execution timed out 40 ms 3824 KB Time limit exceeded (wall clock)
14 Execution timed out 40 ms 3568 KB Time limit exceeded (wall clock)
15 Execution timed out 40 ms 3576 KB Time limit exceeded (wall clock)
16 Execution timed out 40 ms 3568 KB Time limit exceeded (wall clock)
17 Execution timed out 40 ms 3568 KB Time limit exceeded (wall clock)
18 Execution timed out 39 ms 3568 KB Time limit exceeded (wall clock)
19 Execution timed out 39 ms 3568 KB Time limit exceeded (wall clock)
20 Execution timed out 40 ms 3824 KB Time limit exceeded (wall clock)
21 Execution timed out 40 ms 3568 KB Time limit exceeded (wall clock)
22 Execution timed out 39 ms 3568 KB Time limit exceeded (wall clock)
23 Execution timed out 39 ms 3568 KB Time limit exceeded (wall clock)
24 Execution timed out 40 ms 3568 KB Time limit exceeded (wall clock)
25 Execution timed out 42 ms 3576 KB Time limit exceeded (wall clock)
26 Execution timed out 41 ms 3512 KB Time limit exceeded (wall clock)
27 Execution timed out 41 ms 3568 KB Time limit exceeded (wall clock)
28 Execution timed out 40 ms 3576 KB Time limit exceeded (wall clock)
29 Execution timed out 39 ms 3568 KB Time limit exceeded (wall clock)
30 Execution timed out 39 ms 3568 KB Time limit exceeded (wall clock)
31 Execution timed out 39 ms 3576 KB Time limit exceeded (wall clock)
32 Execution timed out 40 ms 3568 KB Time limit exceeded (wall clock)
33 Execution timed out 40 ms 3568 KB Time limit exceeded (wall clock)
34 Execution timed out 40 ms 3568 KB Time limit exceeded (wall clock)
35 Execution timed out 40 ms 3568 KB Time limit exceeded (wall clock)
36 Execution timed out 39 ms 3568 KB Time limit exceeded (wall clock)
37 Execution timed out 40 ms 3568 KB Time limit exceeded (wall clock)
38 Execution timed out 39 ms 3568 KB Time limit exceeded (wall clock)
39 Execution timed out 40 ms 3848 KB Time limit exceeded (wall clock)
40 Execution timed out 40 ms 3824 KB Time limit exceeded (wall clock)