| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 292448 | 7_7_7 | Geppetto (COCI15_geppetto) | C++17 | 404 ms | 520 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int n;
int m;
int used[50][50];
int main()
{
    ios_base::sync_with_stdio(false);
    cin >> n >> m;
    for(int i = 1; i <= m; i ++){
        int x, y;
        cin >> x >> y;
        used[x][y] = 1;
        used[y][x] = 1;
    }
    int res = 0;
    for(int i = 0; i < (1 << n); i ++){
        vector<int> t;
        for(int j = 0; j < n; j ++){
            if(i & (1 << j)) t.push_back(j + 1);
        }
        int good = 1;
        for(int j = 0; j < (int)t.size(); j ++){
            for(int k = j + 1; k < (int)t.size(); k ++){
                good &= (used[t[j]][t[k]] == 0);
            }
        }
        res += good;
    }
    cout << res << "\n";
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
