제출 #435676

#제출 시각아이디문제언어결과실행 시간메모리
435676Kevin_Zhang_TWNavigation 2 (JOI21_navigation2)C++17
13 / 100
1031 ms1044 KiB
#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) { res[i][j] = 0; 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; }

컴파일 시 표준 에러 (stderr) 메시지

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:37:3: note: in expansion of macro 'DE'
   37 |   DE(i, j, res[i][j]);
      |   ^~
#Verdict Execution timeMemoryGrader output
Fetching results...