Diaroylhydrazines I were used for the preparation of 1,3,4-oxadiazoles II and pyridazinones III, respectively.