Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

SEAGRP wrong answer

$
0
0

i am getting wrong answer for following question.

Sereja has undirected graph, which consists of n vertexes and m edges. Sereja can delete edges from the graph. Now Sereja is interested in one question : is it possible to delete edges in the graph so that the degree of each vertex in the graph will be equal 1? Please, help Sereja.

problem link Approach:: we have to check whether there is perfect matching or not. i have solved it using tutte's matrix calculate determinant of matrix using gauusian elimination if determinant is greater then 0 then then print YES otherwise NO.

Code link here

please tell me if i am doing something wrong.


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>