Skip to content

Commit

Permalink
Update 1497.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
encrypted-def authored Apr 24, 2024
1 parent 2891705 commit 79d4483
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Appendix C/1497.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// http://boj.kr/2532d97629b04d7c86f15db6bee08772
// http://boj.kr/8b88c60fcf17452a9e602ef1bc17adde
#include <bits/stdc++.h>
using namespace std;

Expand All @@ -7,7 +7,7 @@ long long state[10];

int bit_cnt(long long x){
int ret = 0;
for(int i = 0; i < m; i++){
for(int i = 0; i < max(n, m); i++){
ret += (x >> i) & 1;
}
return ret;
Expand All @@ -29,7 +29,7 @@ int main(){
pair<int, int> ans = {0, -1}; // {연주할 수 있는 곡의 수, 필요한 기타의 수}
for(int tmp = 0; tmp < (1 << n); tmp++){
long long comb = 0; // 조합한 결과
for(int i = 0; i < m; i++){
for(int i = 0; i < n; i++){
if((tmp & (1LL << i)) == 0)
continue;
comb |= state[i];
Expand Down

0 comments on commit 79d4483

Please sign in to comment.