# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
742057 | nishkarsh | Amusement Park (CEOI19_amusementpark) | C++14 | 799 ms | 3780 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N = 18;
const int mod = 998244353;
bool isindep[1<<N];
ll dp[1<<N];
int popcnt[1<<N];
int undirected_edge[N];
int main(){
int n,m,a,b;
cin >> n >> m;
for(int i = 1; i <= m; i++){
cin >> a >> b;
a--;b--;
undirected_edge[a] ^= (1<<b);
undirected_edge[b] ^= (1<<a);
}
for(int i = 0; i < (1<<n); i++){
int edges = 0;
for(int j = 0; j < n; j++){
if(i&(1<<j)){
popcnt[i]++;
edges |= undirected_edge[j];
}
}
if((edges&i) == 0) isindep[i] = true;
}
dp[0] = 1;
for(int i = 1; i < (1<<n); i++){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |