# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
755 | CodingIsHard | 지도 색칠하기 (GA3_map) | C++98 | 1500 ms | 940 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 <vector>
using namespace std;
int n;
int color[21];
vector<int> v[21];
long long brute(int pos)
{
if(pos == n) return 1;
long long cnt = 0;
vector<int>::iterator iter;
for(int i = 1;i <= 4;i++)
{
color[pos] = i;
for(iter = v[pos].begin();iter != v[pos].end();++iter)
if(color[*iter] == color[pos])
break;
if(iter == v[pos].end())
cnt += brute(pos + 1);
}
color[pos] = 0;
return cnt;
}
long long NumberOfMaps (int N, int M, int *A, int *B)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |