One of the countless protocol headaches when 22 world leaders gather around the same table is deciding who gets to talk first.

Originally, speakers at today's opening session of this unprecedented world conference on North-South problems were to proceed in alphabetical order. But Yugoslavia, perhaps tired of always being near the bottom of the international list, objected.

Mexico, which is both host and final arbiter of protocol at the conference, agreed that the order of speakers be selected by drawing lots. A Mexican official pulled numbers out of a champagne glass. Yugloslavia ended up second from last.

This morning's session of the Cancun summit, the first of four three-hour meetings over two days, was devoted to prepared, opening statements from each delegation. The meetings are closed, not only to the press, but also to everyone except the leaders themselves and a second seated at the table.

Mexico agreed that photographers and television crews could film the formal opening and the welcoming speeches of the co-chairmen, Mexican President Jose Lopez Portillo -- heading the 14 nations of the "South" -- and Canadian Prime Minister Pierre Trudeau -- for the eight countries of the "North."

At precisely 10 a.m. all delegations were seated except one. Mexican television cameras focused pointedly on U.S. President Ronald Reagan's vacant chair, occasionally panning the circular table to look at other stone-faced leaders tapping their pencils or looking at the ceiling.

Reagan, by various accounts, was between 13 and 18 1/2 minutes late. One U.S. official said he was held up in a morning bilateral meeting with Austrian Foreign Minister Willibald Pahr. But Pahr, others pointed out, was there on time. In a briefing later in the day, Secretary of State Alexander M. Haig Jr. made no apologies, saying Reagan had been waiting for the elevator on the sixth floor of the Cancun Sheraton.

A Mexican television commentator, exercising his country's traditional sensitivity to perceived U.S. slights, said on the air that Reagan's tardiness was "an incredible rudeness." Lopez Portillo, whose personal obsession with punctuality is well known in this country, reportedly was furious.

Finally, a burgundy-sports-shirted Reagan slid into his seat and Lopez Portillo began. Reagan's sin was compounded in the eyes of Mexicans watching a live telecast when he removed his headphones, through which he was listening to a translation of Lopez Portillo's speech, to turn and smile for photographers.

But in the limited glimpse that outsiders had of the talks, even Lopez Portillo was not immune from criticism.

At 23 minutes, television observers noted, the Mexican president had spoken for more than twice the five-to-ten-minute limit in a conference where the emphasis is supposed to be on informal dialogue.

Trudeau brought the meeting back on schedule, however, by announcing that in the interest of brevity and reluctance to bore he would not give his speech at all. If all they wanted to do was to listen to each other read their speeches, he said, the delegates could have read them and stayed at home.

"The first two minutes of every speech is just repeating the thanks and the congratulations," Trudeau, dressed in what appeared to be a striped T-shirt, told the meeting.

"We might also," Trudeau suggested, "if I can be so bold, dispense with applause, beginning with dispensing with the applause that would have been abundant after my speech."

Phillippine President Ferdinand Marcos, dressed like Lopez Portillo all in white, took notes. Indian Prime Minister Indira Gandhi, in a cream-colored sari, sat with arms folded and stared.

The cameras panned one more time and were through.

In the afternoon session, after the prepared speeches were finished, a Mexican official said the leaders would have to raise their hands and be called on to speak.