제출 #617

#제출 시각아이디문제언어결과실행 시간메모리
617jwvg0425지도 색칠하기 (GA3_map)C++98
0 / 120
0 ms920 KiB
#include <algorithm> int C[20][20],D[20],E[20],F[20]; int Compare(const void* a, const void* b) { return E[*(int*)b]-E[*(int*)a]; } long long int NumberOfMaps(int N, int M, int* A,int* B) { long long int i,j,k=1; for(i=1;i<=N;i++)F[i]=i; for(i=0;i<M;i++) { C[A[i]][B[i]]=C[B[i]][A[i]]=1; E[A[i]]++; E[B[i]]++; } qsort(F+1,N,sizeof(int),Compare); F[1]; for(i=1;i<=N;i++) { for(j=i+1;j<=N;j++) { if(C[F[i]][F[j]]) { D[F[j]]--; } } } for(i=1;i<=N;i++) k*=D[i]+4; return k; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...