This post contains lots of spoilers!!
Cia is graduating high school. She hopes to be chosen to undergo the Testing, which if she passes, would allow her to go to University. Very few students are chosen to undergo the Testing and even fewer are chosen to attend University. The United Commonwealth has arisen out of the Seven Stages of War (the first stages were man-waged war and the rest were nature warring against us). The country was left with poisoned land and water. The Testing is designed to pick the best future leaders of the country.
Cia is overjoyed when she discovers that she's been chosen for the Testing. Her brothers and mother are proud, but also sad because this essentially means they'll never see her again. Her father is not pleased. He pulls her aside to explain why. He was also chosen for the Testing and ended up attending University. All of his memories from the Testing were wiped clean. But he occasionally has nightmares of what he thinks was his time in the Testing and it appears that it was not pleasant. He believes that many of the testing candidates were killed during the Testing and that some of them were killed by fellow candidates. He warns her to trust no one.
She must leave the next day and can bring little from home. She heads her dad's warnings and packs things that she believes can help her. She packs comfy clothes and boots, a pocketknife multi-tool, and a Transit Communicator that has a compass and other helpful things. She is joined by 3 other students from her small colony - Zandri, Malachai, and Tomas. The four of them stick together once they get to Tosu City for the Testing. Their group expands to accommodate Nicolette, Will and Gill (twins). Cia quickly realizes that they are constantly being monitored by listening devices and cameras.
The first round of testing includes written tests. Cia's roommate Ryme cannot handle the pressure and ends up committing suicide. Cia is horrified that the testing officials are not upset by this and instead seem to think it's a good thing that they found out quickly that she could not handle the pressure.
The second round consists of problems that must be solved. There are consequences for wrong answers, such as when they are asked to sort plants into poisonous and edible piles and then made to eat those in the edible pile. Malachai ends up dead after doing something wrong with a communicator they are asked to repair. Will becomes sick from eating a poisonous plant but Cia encourages him not to seek medical help because she believes he'll be punished (killed) for that. He reluctantly takes her advice.
The third round is an exercise in teamwork. Cia is paired in a group with Roman, Brick, and another girl. They must decide who will complete certain tasks. Once they decide on the order, the first goes through a door, completes said task and then the next can enter and complete their task. However, each task can only be completed once and there is a punishment for completing a task that has already been attempted. Roman goes first and takes a long time, then the girl goes. Cia is supposed to go next, but becomes suspicious. She begins to believe that Roman tricked them into letting him go first, then completed all the tasks so that they would all be punished (killed) for attempting them a second time. She shares her fears with Brick who seems to not believe her. She goes through the door and exits without completing any tasks and eventually, so does Brick. It turns out that was the right choice as they both survive but the girl is never seen again.
In the fourth round, the candidates are placed in a city that has not be rehabilitated and must make their way back to Tosu City, a 700 mile trip that will obviously take weeks. Tomas and Cia make secret plans to meet up with each other. Before departing, they can choose three items to bring, plus their packs from home. Cia chooses a medical kit, a gun, and water containers with purification tablets. Before dropping her at her location, the testing official Michal (who also escorted them from their colony to Tosu City) pulls her aside and tells her secretly that he and others are confident that she can make it.
After being dropped off at the location, another candidate starts shooting crossbow bolts at her. She is able to escape and meet up with Tomas. They set out together. They run into various obstacles that have been set up for them. They are able to forage and find food and water. They are also able to find two bikes to help them get to Tosu City faster. They run into the body of another testing candidate who has been killed by another. They run into Will. Tomas wants to ditch him immediately, but Cia is sure they can trust him and they hang with him for a few days.
They are nearly out of water, so Cia agrees to scout ahead, leaving Will and Tomas alone. After she finds water, she is attacked by mutants who she originally thought were bears, but quickly realizes are mutated humans after she recognizes the intelligence in their eyes. She is scratched by one, but kills the other three and is able to escape. Tomas and Will apparently ran into another candidate who they left behind. But Cia is suspicious that more happened - that perhaps they killed this other candidate. Will leaves them soon and warns Cia that Tomas isn't to be trusted either.
Cia has discovered that their testing bracelets have a listening device and she's also discovered how to remove them, so her and Tomas are occasionally able to talk in secret. They are concerned that all their memories will be wiped when they return and Tomas vows to try to figure out how they can keep their memories. They develop a romantic relationship.
A man on the other side of the fence that marks the testing area offers Cia food and water. He knows who she is and claims that he wants to help her. He tells her that after she returns, they will interview her and give her a truth serum. If she takes it, she may end up giving information that could hurt her family (that her father and his friend, the town doctor, remember parts of their testings; that the former head of the school also remembered parts of her testing and kept students, including her brothers, out of the testing on purpose). He gives her a vial that he says will counteract the serum.
Close to the end, they are attacked by Roman. Luckily Will shows up and shoots him. Unfortunately, Will also turns on them and shoots Tomas. Cia shoots back at Will but he is still able to escape. Tomas survives, but he is too injured to ride or walk the remainder. Cia is able to modify her bike so that they can ride on one and she can pedal for both of them. They are able to make it to the end. Unfortunately, Will has made it too.
A little over 30 candidates have made it to the end (Zandri is not one of them), but only 20 will be chosen to attend the University. Tomas believes he has found a way to keep from having their memories wiped, but he's unable to give it to Cia before her interview. (but it's possible he still took it himself and retained his memories) Cia decides to chance it and take the vial before her interview. It works and she is able to keep some things from the testing committee. At the end she asks what happened to Zandri and the testing official says she should know, since she has her bracelet in her bag. She's confused but when she checks her bag back in her room, she realizes he is correct. Then she remembers finding a bracelet in Tomas' bag while she was fixing the bike - she had assumed he had taken the bracelet off the bag of the first dead girl they found since she had taken her bracelet from her wrist to remember her. But now she realizes it is Zandri's bracelet - was Zandri the candidate that Will and Tomas had met up while she was searching for water that she fears they might have killed? While waiting for the results, she discovers that the Transit Communicator has a record function. She leaves a recording for herself of what happened during the testing.
She is chosen for the University, as is Tomas and Will. But her memories are wiped. Her and Tomas still end up spending time together and falling back in love. And at the end, a few weeks after the Testing has ended, she discovers the recording she left for herself on the Transit Communicator.