# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
82992 | jurichhh8 | Geppetto (COCI15_geppetto) | C++14 | 94 ms | 620 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
using namespace std;
int a[20];
int b[400][2];
int main (){
int n,m;
cin >> n >> m;
for( int i = 0; i < m; i++ ){
cin >> b[i][0];
cin >> b[i][1];
}
int s=0;
for( int i = 0; i < ( 1 << n ); i++ ){
for(int j = 0; j < n; j ++ ){
if ( i & ( 1 << j )) a[j] = 1;
}
int t=1;
for(int j=0;j<m;j++){
if(i&(1<<(b[j][0]-1)) and i&(1<<(b[j][1]-1))){
t=0;
break;
}
}
if(t==1) s+=1;
}
cout<<s;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |