- USA passes 1,000 gold-medal mark in Rio
- 2012 hosts Great Britain enjoy best away Games
- China worries about Olympic 'flop'
- Hosts Brazil below medal target
(CNN)It's the taking part that counts ... isn't it?
More than 11,000 athletes and 200 nations have been united by the Olympic spirit at Rio 2016 but inevitably there are winners and losers.
With the Games coming to a close Sunday, we look at those nations packing up with silverware or despair as they prepare to head home.
London legacy lives on
Great Britain eclipsed its medal target with days to spare to celebrate its most successful away Games in Brazil.
A home Olympics at London 2012 had raised the bar but its team of athletes -- from artistic gymnasts to rugby sevens -- provided plenty of bang for buck to help justify a £350 million ($456m) investment by funding body UK Sport over the last four years.
The team had been set a target of 48 medals but, with four days still to go, its 354 athletes had already bagged 50 with 19 gold and silvers and 12 bronze.
GB are also second behind leaders USA in the medals table and its best-ever medal target of 65 at London 2012 could yet be in sight.
Its previous best of 47 in Beijing means Brazil is now the nation's most profitable Games overseas -- which may mean a welcome excess on hand luggage for the homeward-bound medalists.
Britons joke they are famous for "sitting-down sports" and cycling (six golds), rowing (three), canoeing (one) and equestrian (one) again laid the foundations for the team's medal rush.
But the team also broke new ground in gymnastics -- thanks to Max Whitlock who won two titles on the same day -- and diving.
Some rival nations are curious to know what is behind GB's greatness.
An article on Chinese blogging site Sina asked: "What is their secret?"
Cycling rivals went further with German gold-medal winner Kristina Vogel calling GB's ability to peak for the Games "questionable" in the Sydney Morning Herald and former French cycling coach and journalist Antoine Vayer simply tweeting "£ycling."
British Cycling's head coach Iain Dyer responded to that criticism by saying that GB's rivals needed to take a closer look at their own performances.
"If you look at some of the times that have been done here, some of the teams simply haven't shown up," Dyer was quoted as saying in the Guardian. "That's the bottom line ... Some of the people here are not even performing at the level of the world championships."
Golden landmark for USA
There was another landmark worth celebrating in Rio de Janeiro as the USA took its total tally of Olympic golds beyond 1,000.
Simone Manuel, Kathleen Baker, Lilly King and Dana Vollmer swam to Team USA's 1,000th gold medal at a summer Games, just 124 years after triple-jumper James Connolly claimed the very first in Athens, Greece.
More than half of the golden haul have come from track and field -- 323 -- and swimming events -- 246.
Michael Phelps has added a significant chunk to the tally. The 31-year-old from Maryland had a 23rd gold medal hung around his neck in Rio and hangs up his googles -- for the last time? -- with a record 28 Olympic medals.
The big man might be bowing out but "The Phelps Legacy" could have a ripple effect for years to come thanks to the list of pool performers he has inspired.
A new Olympic superstar emerged in Rio in the shape of diminutive dynamo gymnast Simone Biles.
The 19-year-old completed her Olympic debut with four golds and a bronze -- not forgetting a dazzling smile.
The USA is uncatchable at the top of the medal table but should they do better? With a population of just over 320 million people and a strong economy it's a maybe.
According to medalspercapita.com, the USA has won just one medal per 4.28 million people -- which means it lies a lowly 42nd in the medals won on national head count.
In case you're wondering, Caribbean isle Grenada -- birthplace of 400m silver medalist Kirani James -- tops the list.
They're calling it the Games of the underdog.
Five nations so far have been celebrating their first Olympic gold medals in Rio.
Kosovo's first Olympic appearance as a member state, since declaring its independence from Serbia in 2008, was capped with a gold medal by Majlinda Kelmendi, who had represented Albania four years ago.
Kelmendi took the title in the women's 52kg judo and said: "I just proved that even after we survived a war, if they (kids in Kosovo) want something they can have it."
Monica Puig did it for Puerto Rico, topping off a solid year on the tennis tour with a first Olympic gold in Rio.
Joseph Schooling took the scalp of the Games by beating Michael Phelps to the punch in the 100-meter butterfly final -- and won Singapore's first Olympic title.
The 21-year-old, who posed for a photo with Phelps in 2008, was dazed by his achievement apologizing when he got out of the water. "I'm sorry if I don't seem like I'm full of emotions but I don't know what to believe."
Vietnam was also celebrating its first gold thanks to army colonel Hoang Xuan Vinh's victory in the 10m air pistol event. The 41-year-old was reportedly mobbed by fans when he landed back home in Hanoi.
It was seventh heaven for Fiji who steamrolled to gold in the inaugural rugby sevens competition.
The men's team won the Pacific island nation's first Olympic medal of any color, at its 14th Summer Games, with a bruising 43-7 victory over Great Britain.
"The boys are front page and back of newspapers, six o'clock news ... You come out of the airport and there's a 20-foot billboard of them," said their English coach Ben Ryan. "They're superstars in Fiji."
China has been a consistent top-three performer at the Summer Games since Sydney 2000 but has a crisis for the nation with a population of 1.38 billion people been brewing in Brazil?
China sent a record 405 athletes to Rio but seemed particularly irked to find itself in a battle for second place in the medal table with the British Isles.
The country's Xinhua News Agency, based in Beijing, tweeted on its English-speaking account: "On Rio Day 12, even GBR has one more gold than China."
Another tweet mourned: "Team China have suffered the worst Olympic flop at Rio 2016."
Some of the star's golden hopes have struggled to shine in South America. Its gymnasts failed to win a single gold at the Games compared to five in London. There was also diving disappointment and bad news from badminton.
China's most decorated male swimmer Sun Yang could not defend his 400m and 1500m titles -- and was even accused of splashing Australian rival Mack Horton in training.
Credit where credit is due though to China for arguably heralding a step forward for feminism after swimmer Fu Yuanhui prompted a wave of love when she told the world she had her period during the Games.
Russia bowed by doping ban
Russia avoided a blanket ban of its athletes following allegations of a state-sponsored doping program but still sent a reduced team to Rio.
Medals from athletics and weightlifting were off the table as these sport's governing bodies decided to ban Russian competitors.
Long jumper Dayra Klishnina, who finished ninth in the women's long jump final, was the only track and field athlete allowed to compete because she has been based in Florida over the last few years.
Despite the doping controversy, Russia has rallied at the Games. The team remains fourth in the medals table with four days to go.
If it hangs on to fourth, Russia will match its performance from London 2012, albeit with a considerably reduced medal count. Russia won 82 medals in London but has exactly half that tally as things stand.
Angst in Australia
Sports-mad nation Australia is now simply mad.
Australian Associated Press reportedly wrote: "There's no nice way to put it. Australians are choking," while Fox Sports was left asking "How did it come to this?" as it urged the men's basketball squad to save Australia the humiliation of failing to win a medal in team sports for the first time since 1984.
Hockey, water polo, football and rugby sevens -- with the exception of the gold-medal winning women's rugby team -- all fell short. The men's basketball team face Serbia in Friday's semifinals.
The green and gold team also struggled to meet expectations in the pool and at the velodrome.
Cycling fans are well used to seeing Australia and GB slug it out on the boards but the Adelaide Now website said its arch-rivals had "wiped the floor" with Australia. GB won six cycling golds, while Australia took just a silver and a bronze.
Australia team captain and cycling superstar Anna Meares won the bronze and was steeling herself for a barrage of criticism for not delivering more.
Australia sent 422 athletes across 26 sports to Brazil with lofty hopes of finishing inside the top-five in the medal table. The expectation had been for 13 gold medals -- six more than London 2012.
With four days to go, Australia had collected seven golds and lies ninth in the medals table with a total of 24 pieces of silverware.
Quality not quantity for Brazil
Brazil set itself a target of finishing in the top-10 of the medal table for the first time ever -- with four days to go the hosts remain in 17th.
Following on from a record 17 podium finishes at London 2012, the hosts have 12 medals in the locker.
There have been disappointments in judo, swimming and tennis, where Brazilian men's doubles favorites Marcelo Melo and Bruno Soares failed to reach the medal matches.
The so-called "Brazil Medals Plan'"invested one billion Reals ($30m) over the last three years, a much smaller investment than Olympic high-flyers such as GB.
The lack of medals hasn't been the only thing threatening to poop the party. There were empty seats, mysterious green diving pools and allegations of high-profile robberies.
Through it all Brazil has seemed rather well, stoic. The golds medals have been uplifting.
Champion judoka Rafaela Silva was raised in one of Rio's most notorious neighborhoods -- the Cidade de Deus (City of God) -- and was unbowed after being taunted by trolls for her disqualification at London 2012.
"This shows that a child from the favela with no hope can end up somewhere," said Silva, Brazil's first gold medalist of the Games.
Thiago Braz Da Silva literally popped up out of nowhere to win the pole vault title with a new Olympic record of 6.03m and dethrone champion Renaud Lavillenie.
Golden pugilist Robson Coneicao, who entered the history books as Brazil's first boxing champion, credits his tough upbringing on the streets of Salvador for his fighting credentials.
"I had a very difficult childhood ... and today I'm an Olympic champion," he beamed.