# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19986 | onjo0127 | 악수 (kriii4_D) | C++98 | 0 ms | 1088 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 <stdio.h>
#include <algorithm>
#include <string.h>
#define MOD 1000000007
using namespace std;
int adj[41][41];
int net[41];
int n,mx=1;
void f(int key)
{
int i,j;
bool flag = true;
for(i=1;i<=n;i++) {
if(net[i]==0)flag=false;
}
if(flag)return;
mx = max(key,mx);
for(i=1;i<=n;i++) {
for(j=i+1;j<=n;j++) {
if(adj[i][j] == 0) {
adj[i][j] = 1;
net[i] = 1;
net[j] = 1;
f(key+1);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |