Energy condition and cosmic censorship conjecture in the perfect fluid collapse