INDIANAPOLIS, AUG. 24 -- Although U.S. competitors won 369 medals at the Pan American Games that just concluded -- more than all the other countries combined -- the United States' optimism over its amateur sports programs has to be tempered by its inability to win big in sports traditionally important to many Americans: baseball, basketball and boxing.

The United States indeed dominated most of the 31 sports contested here in the last 15 days, from archery, where an eighth-grade girl from Utah won a gold medal, to yachting, where the the U.S. sailors won gold in six of seven classes for their best Pan American showing.

The U.S. delegation, based on what happened at the 10th Games for the Western World, goes into the upcoming world championships and 1988 Summer Olympic Games knowing that Americans are as competitive as ever in all of the water sports, track and field, gymnastics and men's volleyball. Although the baseball team lost the gold medal game to Cuba, there is at least the encouragement that the United States qualified for a spot in the 1988 Olympics.

But surely there is major concern over basketball and boxing. If the Games aren't remembered for the recurring confrontations between Cuban nationalists and anti-Castro protesters, then they will be remembered for the stunning defeats administered to America's men's basketball team and boxers.

Brazil's 120-115 victory over the United States on Sunday will stand as one of the shocking events ever in U.S. amateur basketball. Possibly, it is the biggest upset in amateur sports since the U.S. ice hockey team beat the Soviet Union in the 1980 Olympics.

Several Brazilian players, including Oscar Schmidt, whose 46 points led the assualt, contend the U.S. team still is the best team in the world. But don't try to tell that to 1988 Olympics Coach John Thompson or his support staff, which must evaluate Sunday's loss, and try to regroup.

Before that game, Thompson had said, "People don't realize that the level of skill of players in other countries is catching up, and in some cases has already caught up with us. Just because we invented {basketball} doesn't mean anything. We've invented a lot of things that other countries have refined."

Brazil is one country that surely has refined the art of jump shooting and used it to every advantage. While college basketball coaches in the United States complain over the three-point shot, foreign teams use the three-pointer as much as Americans dunk.

Sunday's game showed that if the United States has any great jump shooters, they certainly didn't play for this particular team.

Pan Am Coach Denny Crum, after the devastating defeat, said, "The outside world is a lot better and more competitive than ever before and we {with college-age players} are going against their best, their pros."

Crum stopped short of saying the United States was in any real trouble. "In an Olympic year," he said, "when you have three months to prepare instead of {six weeks} and the benefit of graduating seniors, the experience factor isn't as big . . ."

Experience didn't have nearly as much to do with Cuba's superiority in boxing (10 gold medals in 12 weight classes). If the Korean boxers are as good as advertised, the U.S. boxing team could find itself on the verge of being shut out.

But there might not be as much disparity between the United States and Cuba as the medal count indicated. Many of the decisions were close, and a couple were highly arguable. Also, two injuries were crucial. Light heavyweight Andrew Maynard sprained his ankle in the second round of his semifinal against Cuban world champion Pablo Romero and had to retire, and super heavyweight Riddick Bowe lost to Jorge Gonzales with a sore right hand.

"I don't think the medals are a fair indication," U.S. Coach Roosevelt Sanders said. "I think the scores of the fights are more indicative."

Featherweight Kelcie Banks prevented a shutout here by winning the gold. And the U.S. team felt it was deprived of another when welterweight Kenneth Gould was decisioned by Cuba's Juan Lemus in their final.

Had any of those fights been slightly different, the performance of the U.S. team would have been comparable to that of the 1983 Pan Am team featuring Mark Breland and Tyrell Biggs, which won two golds in Caracas, Venezuela, and then went on to dominate the Cuban-boycotted Olympics in Los Angeles.

Gould was so discouraged by the loss that he was considering not attending the North American Championships next week, where he could get another shot at Lemus. It was his third loss to the Cuban; he lost a 3-2 decision in December that he also felt he won, and said he is convinced he will not be judged fairly at the North American tournament.

"Why go?" he said. "What's the point if I can't get a fair decision?"

A number of other U.S. fighters will not attend the North American tournament, largely because of fatigue and injuries. One of them is Maynard, the U.S. Army boxer originally from Cheverly. His sprained ankle will keep him inactive for a month or more. But Maynard clearly established himself as a promising, if raw, boxer with a devastating punch.

In baseball, Cuba figured to win a gold and the United States worried about not finishing high enough to qualify for the '88 Olympics. Several major league scouts, however, said the level of talent on the U.S. team is, or should be, just as high as that of the Cuban team.

The U.S. team gained respect, and a lot of followers, by beating the Cubans once and extending them in the gold medal game before losing, 13-9. But how optimistic can the United States be if Cris Carpenter, the team's best pitcher, signs with the St. Louis Cardinals next week?

Will this sudden fame send major league teams scurrying to sign many of these players (Ty Griffin, Tino Martinez, Jim Abbott), forcing the U.S. baseball federation to start from scratch in building an Olympic team?

Americans are operating with a good degree of certainty in many other sports. Several of the U.S. track and field competitors, including Carl Lewis and Jackie Joyner-Kersee, competed in fewer events here to save some strength for the more prestigious world championships. But Americans still won 56 medals, 26 of them gold.

U.S. diving seems in the most capable hands of Greg Louganis, Kelly McCormick and Michele Mitchell. And if the so-called B team of U.S. swimmers can win 27 of 32 gold medals -- all 49 swimmers won at least one medal -- there is little doubt that the best of the United States can hold its own even against the East Germans next summer.

However, even in the sports where Americans won, it was obvious that "the rest of the world" as U.S. coaches like to say, is catching up.

The United States expected to win gold medals in swimming; it usually does in Western-only meets. But on the first day of competition, a Costa Rican named Silvia Poll burst through the door and announced she will be a force in '88. The same can be said about tennis, where Brazil won its first gold medal since 1967.

Gisele Miro won the women's singles title and Fernando Roese beat American Al Parker, who had won a record 25 U.S. junior tennis titles. No American woman reached the medal round.

In women's basketball, Brazil showed the best back-court players in the world in Hortencia Marcari and Paula Silva, and they intend to find some front-court players after two close losses to the United States.

The Cuban/anti-Castro confrontations served only to obscure some fine performances from Cuban athletes, who dominated in weightlifting, boxing and fencing.

This also was the second straight Pan American competition to be tainted by drugs; six medals were forfeited and six athletes were disqualified, including Bill Green, a U.S. hammer thrower who was stripped of his silver medal after failing a drug test when it revealed an unusually high concentration of testosterone. Green said in an interview on CBS-TV Sunday, "I have done nothing to cause my disqualification," and denied taking the drug.

But the distractions -- from not enough beds in the athletes' village to too many situations for potential violence -- were relatively small. And the 950,000 people who attended the events enabled this to become the first Pan Am Games to realize a profit.

In all, the Pan American Games' competition provided some answers for the United States, but still left a surplus of questions, especially in some of the glamorous sports. Staff writer Sally Jenkins contributed to this report.