RIO DE JANEIRO (AP) Olympic officials were full of praise when they awarded the Olympics to Rio seven years ago, never imagining such things as the Zika virus and green water in the pools.
Indeed, they declared that there was ''absolutely no flaw'' in Rio's plans for the games.
Many of those plans have since gone awry, as plans often do. The first Olympics in South America remains very much a work in progress, beset by myriad problems that organizers seem unable - or unwilling - to solve.
Midway through the games, it's time to give the Rio Olympics some grades:
ATMOSPHERE: This isn't London with its iconic venues, but Rio has some things going for it as an Olympic host. Beach volleyball on the famed Copacabana sand looks good, and so does the sailing on Guanabara Bay, assuming you can ignore the raw sewage that pours into it. But the main Olympic park is barren and devoid of decoration, the diving and water polo pools are green , and most of the venues look like they were built without concern about whether they would stay up. Did we mention the sewage stench that greets fans at some venues? Take away the occasional samba dancing, and there's not much to get anyone in the Olympic spirit. GRADE D-plus.
ATTITUDE: There has been plenty of it, from U.S. soccer goalie Hope Solo calling the Swedish team a ''bunch of cowards'' to an Egyptian judoka refusing to shake the hand of his Israeli opponent after a match. The best attitude of the whole Olympics, though, came from U.S. swimmer Lilly King, who called out her Russian opponent for doping and then backed it up by beating her for a gold medal in the pool. These are the best athletes in the world, and sometimes they have a lot to say, even if some of it is offensive. GRADE B.
WATER: What is it about Brazil and water? The country just can't get it right. Guanabara Bay looks beautiful on television but dangerous up close, and the water in the rowing venue is filled with viruses, much to the displeasure of the pair of Serbian rowers who tipped over in it. Meanwhile, the world's best divers plunge into a murky green pool, and water polo was played in a pool so full of chlorine that they finally had to drain and refill it. GRADE F.
CROWDS: There's a lot to like about fans who cheer loudly for underdogs and the home team, and enjoy taunting almost everybody else. OK, maybe they went a bit too far when chanting ''Uh! You're gonna die! Uh! You're gonna die!'' to the opponent of a Brazilian fencer, but it seemed to all be done in fun. On the flip side, there were lots of empty seats at many events because of high ticket prices or a lack of interest. GRADE C.
SAFETY: A media bus had its windows shattered and stray bullets were twice fired into Olympic complexes. Two Australian coaches were robbed at knifepoint near Ipanema beach, and so was Portugal's education minister. Gang members in a favela killed a Brazilian police officer who took a wrong turn while working Olympic security, and fans attending the opening ceremony passed by a man shot to death in the street. Rio was a dangerous city to begin with, but the incidents are even more disturbing considering there are more than 85,000 security forces deployed to protect the games. GRADE D.
MEMORABLE PERFORMANCES: Every Olympics has some, even one as troubled as Rio. Michael Phelps won a bunch of medals once again, but it's not like that hasn't happened before. Indeed, the best moments from the pool came when Katie Ledecky nearly lapped the field in the 800-meter for her fourth Olympic gold, and Simone Manuel became the first African-American woman to win a swimming gold. Not as well noticed outside Brazil was Rafaela Silva taking judo gold , the first win for the home team. Silva, who grew up in poverty in the City of God favela, was subjected to racial abuse from Brazilians after missing out on a medal in the 2012 Olympics. ''Today, I'm not an embarrassment for my family,'' she said. GRADE B.
DOPING: This has nothing to do with Rio, and everything to do with the International Olympic Committee allowing politics to mix with cheaters. Five more have been caught doping so far in these games, but if history is any indication a lot more will get away with doping in Rio just like they have in other Olympics. GRADE D.
LOGISTICS: Traveling to different venues has been a nightmare at times, largely because Rio is separated by mountains and Brazil's highways often look more like parking lots. Everyone seems to have a story about confused taxi drivers and lengthy bus rides, though for the most part the buses have run on time and they've usually gone to the right places. That wasn't true Friday night when British swimmer got on an unmarked bus at the Olympic village and was taken to the Olympic Stadium 45 minutes away instead of the nearby swimming arena. Swimming officials had to push back the 50-meter qualifying schedule so she and two others could make it in time. GRADE C.
OVERALL: Rio was always a disaster waiting to happen, and so far disaster has largely been avoided. Hysteria over the Zika virus has faded, there have been no terrorist attacks, and only one sailor has reported being sickened by polluted waters. More importantly, perhaps, the big television show that is the Olympics looks good on TV, even if NBC's ratings are down.
Still, every Olympics has its problems and Rio has had more than most. If things don't get better in the final week, that is how these games will ultimately be remembered. GRADE C-minus.
Tim Dahlberg is a national sports columnist for The Associated Press. Write to him at tdahlberg(at)ap.org or http://twitter.com/timdahlberg