Hers was an often repeated observation. Residents want peace, but they harbor no particular rooting interest in the army or the drug gangs or the paramilitaries composed of retired cops: All armies are lethal.  We scrambled up a hardscrabble path to the new police precinct that commands the hill like a medieval castle keep. Inside, three police officers in body armor nodded warily.  They pointed to one, two, three bullet holes in the glass windows of the precinct, each the size of a Ping-Pong ball; the police attack, and the gangs counterattack. The precinct wall is dominated by a painting of a knight kneeling and holding his sword, accompanied by these words: “You may die, but if you don’t fight, you’re already dead.”  The precinct commander walked in, a semiautomatic rifle strapped to his chest. “You should not stay here — go back to the Olympics,” he said. “Shooting is anytime.”  Officials cut several bus lines that run north to south during the Olympics, in hope of keeping gangs from invading the tourist zones of Copacabana and Ipanema and the central business district. Many tens of thousands of working-class Cariocas, as natives of Rio are known, spend two and a half to three hours commuting to distant jobs, journeys made far more arduous during the Games. Anderson’s mother lives in a favela. She is in her ninth decade and has never visited the white sand beaches of Copacabana and Ipanema.  The city’s public safety director talks about the disaster that could await when the Olympics end and soldiers withdraw from the tourist zones.  The next day, I talked with Carla Maria Avesani, a young professor at the Rio de Janeiro state university. She has a Ph.D. and runs a nutrition institute at the University of Rio de Janeiro. She serves on the board of a prestigious journal and writes for an international audience of academics. She studies how changes in diet help poor patients on dialysis and those with heart problems. It was her dream to work at a public university with a mission.  Now she and her fellow professors pool their Brazilian reais to buy computers and paper towels, and to fix doors. They try to figure out what to do about the broken elevator. Their university is broke, its pockets turned out.  She lives in an upper-middle-class neighborhood, with good restaurants and that Mediterranean climate. The evening atmosphere, with young couples hand in hand, calls to mind Rome, except with enormous rock faces nearby and an ocean lapping at your feet. She watched the opening ceremony, all the brilliant choreographies, and read her friends’ proud posts on Facebook.  She could not join them.  “It was a beautiful party; we Brazilians do wonderful parties,” Avesani said. “But to see the amount of money spent for stupid stadiums, I don’t want to celebrate when the state is broke and hospitals are closing and the poor are dying by the thousands.”  She paused. “It’s nice to see so many foreigners, and I want you to be happy. I want to be happy.”  She sighed. “I would be happiest now if the world sees how we are living. I feel absolutely offended by these Olympics.”  A version of this article appears in print on August 15, 2016, on page D8 of the New York edition with the headline: ‘The Rich Play, and We Die’. Order Reprints| Today's Paper|Subscribe
Rio de Janeiro residents have criticized Brazilian officials for spending money on the Olympics rather than tending to the country’s problems.