| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 220796 | Haunted_Cpp | Geppetto (COCI15_geppetto) | C++17 | 1094 ms | 504 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.
/**
* author: Haunted_Cpp
**/
/***************** [LIBRARY PROTOCOL] ****************/
#include<bits/stdc++.h>
using namespace std;
/********************* [CONSTANTS] *******************/
#define INF 1e9
#define F first
#define S second
#define PB push_back
#define MP make_pair
typedef long ld;
typedef long long lld;
typedef pair<int,int>ii;
vector<int>dr={+1,-1,+0,+0,+1,-1,-1,+1};
vector<int>dc={+0,+0,+1,-1,+1,-1,+1,-1};
/******************** [FUNCTIONS] ********************/
int N,A=0;
set<ii>cantUse;
void solve(int S,unordered_set<int>ans){
    if(S==N+1){
    for(auto itF:ans){
        for(auto itS:ans){
            if(cantUse.find({itF,itS})!=cantUse.end())return;
            }
        }
        A++;
        return;
    }
    solve(S+1,ans);
    ans.insert(S);
    solve(S+1,ans);
}
/*********************** [MAIN] **********************/
int main(){
  ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  int M;cin>>N>>M;
  for(int i=0;i<M;i++){
    int u,v;cin>>u>>v;
    cantUse.insert({u,v});
    }
  solve(1,unordered_set<int>());
  cout<<A<<'\n';
  return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
