답안 #784054

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
784054 2023-07-15T15:34:35 Z AdamGS Broken Device (JOI17_broken_device) C++17
0 / 100
43 ms 2648 KB
#include "Annalib.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
void Anna(int n, ll x, int k, int P[]) {
	vector<int>V(n), czy(n), odw(n);
	srand(213769);
	rep(i, n) {
		V[i]=i;
		swap(V[i], V[rand()%(i+1)]);
	}
	rep(i, k) czy[P[i]]=1;
	ll akt=0;
	rep(i, V.size()-1) if(!czy[V[i]] && akt<60) {
		if(czy[V[i+1]] && (x&(1<<akt))) continue;
		Set(V[i], 1);
		odw[V[i]]=1;
		++i;
		if(x&(1ll<<akt)) Set(V[i], 1); else Set(V[i], 0);
		++akt;
		odw[V[i]]=1;
	}
	rep(i, n) if(!odw[i]) Set(i, 0);
}
#include "Brunolib.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
ll Bruno(int n, int A[]) {
	vector<int>V(n);
	srand(213769);
	rep(i, n) {
		V[i]=i;
		swap(V[i], V[rand()%(i+1)]);
	}
	ll akt=0, ans=0;
	rep(i, V.size()-1) if(A[V[i]]) {
		++i;
		if(A[V[i]]) ans+=1ll<<akt;
		++akt;
	}
	return ans;
}

Compilation message

Anna.cpp: In function 'void Anna(int, ll, int, int*)':
Anna.cpp:5:36: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    5 | #define rep(a, b) for(int a = 0; a < (b); ++a)
      |                                    ^
Anna.cpp:19:2: note: in expansion of macro 'rep'
   19 |  rep(i, V.size()-1) if(!czy[V[i]] && akt<60) {
      |  ^~~

Bruno.cpp: In function 'll Bruno(int, int*)':
Bruno.cpp:5:36: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    5 | #define rep(a, b) for(int a = 0; a < (b); ++a)
      |                                    ^
Bruno.cpp:18:2: note: in expansion of macro 'rep'
   18 |  rep(i, V.size()-1) if(A[V[i]]) {
      |  ^~~
# 결과 실행 시간 메모리 Grader output
1 Partially correct 37 ms 2516 KB Output isn't correct - L* = 0
2 Partially correct 32 ms 2508 KB Output isn't correct - L* = 0
3 Partially correct 37 ms 2540 KB Output isn't correct - L* = 0
4 Partially correct 32 ms 2484 KB Output isn't correct - L* = 0
5 Partially correct 31 ms 2552 KB Output is partially correct - L* = 14
6 Partially correct 34 ms 2592 KB Output isn't correct - L* = 0
7 Partially correct 38 ms 2592 KB Output isn't correct - L* = 0
8 Partially correct 31 ms 2504 KB Output isn't correct - L* = 0
9 Partially correct 32 ms 2552 KB Output is partially correct - L* = 14
10 Partially correct 32 ms 2612 KB Output isn't correct - L* = 0
11 Partially correct 31 ms 2520 KB Output isn't correct - L* = 0
12 Partially correct 35 ms 2408 KB Output isn't correct - L* = 0
13 Partially correct 32 ms 2612 KB Output isn't correct - L* = 0
14 Partially correct 36 ms 2576 KB Output isn't correct - L* = 0
15 Partially correct 34 ms 2428 KB Output isn't correct - L* = 0
16 Partially correct 31 ms 2528 KB Output isn't correct - L* = 0
17 Partially correct 31 ms 2480 KB Output isn't correct - L* = 0
18 Partially correct 34 ms 2576 KB Output isn't correct - L* = 0
19 Partially correct 39 ms 2484 KB Output isn't correct - L* = 0
20 Partially correct 33 ms 2596 KB Output isn't correct - L* = 0
21 Partially correct 34 ms 2476 KB Output isn't correct - L* = 0
22 Partially correct 34 ms 2568 KB Output isn't correct - L* = 0
23 Partially correct 31 ms 2584 KB Output isn't correct - L* = 0
24 Partially correct 36 ms 2488 KB Output isn't correct - L* = 0
25 Partially correct 37 ms 2572 KB Output is partially correct - L* = 14
26 Partially correct 32 ms 2588 KB Output isn't correct - L* = 0
27 Partially correct 37 ms 2644 KB Output isn't correct - L* = 0
28 Partially correct 32 ms 2572 KB Output isn't correct - L* = 0
29 Partially correct 30 ms 2648 KB Output isn't correct - L* = 0
30 Partially correct 37 ms 2476 KB Output isn't correct - L* = 0
31 Partially correct 30 ms 2504 KB Output isn't correct - L* = 0
32 Partially correct 36 ms 2564 KB Output isn't correct - L* = 0
33 Partially correct 36 ms 2504 KB Output isn't correct - L* = 0
34 Partially correct 37 ms 2476 KB Output isn't correct - L* = 0
35 Partially correct 32 ms 2564 KB Output isn't correct - L* = 0
36 Partially correct 31 ms 2620 KB Output isn't correct - L* = 0
37 Partially correct 36 ms 2640 KB Output isn't correct - L* = 0
38 Partially correct 32 ms 2484 KB Output isn't correct - L* = 0
39 Partially correct 43 ms 2488 KB Output isn't correct - L* = 0
40 Partially correct 40 ms 2604 KB Output isn't correct - L* = 0