제출 #83698

#제출 시각아이디문제언어결과실행 시간메모리
83698jvalsortavGeppetto (COCI15_geppetto)C++14
0 / 80
1087 ms25708 KiB
#include <cstdio> #include <cstdlib> #include <cmath> #include <iostream> #include <cctype> #include <ctime> #include <set> #include <string> #include <map> using namespace std; int n, m, x, y, a[800]; long long c = 1, r; set <long long> s; int bin (long long b, int e){ int i = 1; while(b){ if(i == e){ if (b%2){ return 1; } else{ return 0; } } b /= 2; i++; } } int main() { cin >> n; c = c*(2<<(n-1)); cout << c << endl; cin >> m; for (int i = 0; i < 2*m; i += 2){ cin >> x; cin >> y; for (long long j = 0; j < c; j++){ if (bin(j, x) and bin(j, y)){ cout << j << endl; s.insert(j); } } } cout << c - s.size(); return 0; }

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

geppetto.cpp: In function 'int bin(long long int, int)':
geppetto.cpp:36:1: warning: control reaches end of non-void function [-Wreturn-type]
 } 
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...