답안 #435675

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
435675 2021-06-23T14:50:22 Z Kevin_Zhang_TW Navigation 2 (JOI21_navigation2) C++17
0 / 100
1 ms 192 KB
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define pb emplace_back
#define AI(i) begin(i), end(i)
template<class T> bool chmin(T &a, T b) { return b < a && (a = b, true); }
template<class T> bool chmax(T &a, T b) { return a < b && (a = b, true); }
#ifdef KEV
#define DE(args...) kout("[ " + string(#args) + " ] = ", args)
void kout() { cerr << endl; }
template<class T, class ...U> void kout(T a, U ...b) { cerr << a << ' ', kout(b...); }
template<class T> void debug(T l, T r) { while (l != r) cerr << *l << " \n"[next(l)==r], ++l; }
#else
#define DE(...) 0
#define debug(...) 0
#endif
#include "Anna.h"
#include <vector>

namespace {

const int MAX_N = 200;

int res[MAX_N][MAX_N];

} // namespace

void Anna(int N, int K, std::vector<int> R, std::vector<int> C) { 

	for (int i = 0;i < N;++i) for (int j = 0;j < N;++j) {
		for (int l = 0;l < K;++l) {
			if (R[l] <= i) res[i][j] |= 1<<l;
			if (C[l] >= j) res[i][j] |= 1<<(l+K);
		}
		++res[i][j];
		DE(i, j, res[i][j]);
	}

	for (int r = 0; r < N; r++) {
		for (int c = 0; c < N; c++) {
			SetFlag(r, c, res[r][c]);
		}
	}
}
#include "Bruno.h"
#include <vector>

namespace {

} // namespace

std::vector<int> Bruno(int K, std::vector<int> value) {
  std::vector<int> res(K, 0);
  for (int &i : value) --i;
  for (int i = 0; i < K; i++) {
	  if (value[1] & (1<<i)) {
		  res[i] = 3;
	  } else if (value[5] & (1<<(i+K))) {
		  res[i] = 0;
	  } else if (~value[4] & (1<<i)) {
		  res[i] = 2;
	  } else if (~value[4] & (1<<(i+K))) {
		  res[i] = 1;
	  } else res[i] = 4; 
  }
  return res;
}

Compilation message

Anna.cpp: In function 'void Anna(int, int, std::vector<int>, std::vector<int>)':
Anna.cpp:14:17: warning: statement has no effect [-Wunused-value]
   14 | #define DE(...) 0
      |                 ^
Anna.cpp:36:3: note: in expansion of macro 'DE'
   36 |   DE(i, j, res[i][j]);
      |   ^~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 192 KB Wrong Answer [7]
2 Halted 0 ms 0 KB -