Sword Art Online Judge 3

View as PDF

Submit solution

Points: 7
Time limit: 1.0s
Memory limit: 256M

Problem type

"This, might be an online judge, but it isn't meant to be played" - 『Sword Art Online Judge』, Programmers: Guanzhong Chen, Tudor Brindus, Timothy Li


"Seems like he's a little dizzy."

I picked up a pebble from the undergrowth at my feet and raised it above my shoulder. As soon as the system detected the first motion of a sword skill, the pebble started giving off a slight green light.

After that, my left hand almost moved by itself and the pebble went flying, drawing a straight line of light and hitting the boar between its eyebrows. Ggiik! The boar squealed in fury and turned towards me.

"Of course they move, they're not training dummies. But if you begin the correct motion, the system will put your sword skill into motion and hit the target for you."

"Motion… motion…"

While muttering this like some spell, Klein raised the cutlass that he held in his right hand.

Although the blue boar, officially named «Frenzy Boar», was a level one monster, Klein had lost almost half of his HP from being hit by counterattacks due to his wild swings. Well, even if he died he'd just respawn at the «Starting City» near here, but coming all the way out to this hunting ground again was somewhat annoying.

It seemed like there was one move left before the fight reached its conclusion.

I cocked my head as I blocked the boar's charge with the sword in my right hand.

"Hmm, how should I explain… It's not like one, two, three, then strike. But more like gathering a bit of energy and then, as soon as you feel the skill start, it goes BAM and you feel it hit the monster…"

"Bam, eh?"

Klein's roughly handsome face grimaced itself into an unsightly image as he leveled his sword at his waist.

Inhale, exhale; after taking a deep breath, he lowered his stance and raised his sword as if he was going to shoulder it. This time, the system sensed the pose correctly and the arcing sword slowly started shining orange.


With his low yell, he jumped off the ground with a movement that was completely different from the ones before.

Swish—! With this crisp sound, the sword drew its flame red trajectory through the air. The «Reaver», a basic skill of the one-handed curved sword, struck the boar right in its neck as it was about to charge and got rid of the rest of its HP, which (like Klein's) was about half full.

"Guekk—" it gave a pitiful cry and its large body shattered like glass and purple numbers appeared, showing how many virtual experience points I gained.


Klein struck an over-blown pose of victory with a huge smile on his face and raised his left hand. I high-fived him and smiled again.

"Congrats on your first victory… but that boar—it's about as hard as slimes from other games."

"Eh, really? I thought it was some sort of semi-boss or something!"

"Not a chance."

My smile became a little forced as I sheathed my sword on my back.

Even though I was teasing him, I understood what he was feeling right now. Since I had two more months of experience than him, it was only now that he could feel the exhilarating feeling of destroying his enemy with his own hands.

Klein started to use the same sword skill over and over again yelling as he did so, perhaps as a way of practicing. I left him alone and looked around.

The endlessly stretching plains gave off a beautiful red as the sun had started setting. Way up north, there was the silhouette of a forest, a sparkling lake down south, and I could just about make out the walls that surrounded the city to the east. To the west, there was a limitless sky going on forever with bunches of golden clouds drifting by.

We were at the plains that stretched to the west of the «Starting City», which was situated at the north end of the first floor of the colossal floating castle—«Aincrad». There should be numerous players fighting monsters around here, but because of the enormous size none of them were visible.

Finally seeming satisfied, Klein sheathed his sword and walked over while observing the area as well.

"But really… however many times I look around like this, I still can't believe that this is «inside the game»."

"Well even if you say 'inside' it's not like our souls were sucked in or anything. Our brain is just seeing and hearing instead of our eyes and ears… with the signals that the «Nerve Gear» is sending," I said with a shrug.

Klein pouted like a kid.

"You might be used to it now, but for me it's the first time doing a «FullDive»! Isn't it awesome? Really… it's a relief that I was born in this era!"

"You're exaggerating."

But as I laughed, I totally agreed with him.

«Nerve Gear».

That's the name of the hardware that drove this VRMMORPG—«Sword Art Online».

The basic structure of this machine is totally different from the older ones.

Unlike the old-style man-machine interface hardware like "flat screen monitors" or "hand-held controllers", Nerve Gear only had a single interface: a streamlined interface that covered your whole head and face.

Inside, there were numerous signal transceivers. By using the electronic signals sent by those transceivers, the gear accessed the user's brain itself. The user didn't use their eyes or ears to see and hear, the signals went directly to their brain. In addition, the machine could access not only sight and sound, but also: touch, taste, and smell as well—that is to say, all five senses.

After slipping the Nerve Gear on, locking the strap under your chin, and speaking the initiation command («Link Start»), all noise fades away and you're swathed in darkness. As soon as you pass the rainbow colored circle in the middle, you're in another world made entirely of data.


Half a year ago, this machine (which started selling in May, 2022) successfully created a «Virtual Reality». The electronics company which created the Nerve Gear called the actual act of linking to the virtual reality…


It was a total seclusion from reality, fitting of the word "full".

The reason for this is that the Nerve Gear not only sent fake signals to the five senses, it also blocked and rerouted the orders that the brain sent to the body.

This can be called the most basic requirement for moving freely in a virtual reality. If the body received the brain's signals when the user was in FullDive, the moment the user decided they wanted to «run» their actual body would run into a wall.

Because the Nerve Gear could reroute the commands the brain sent through the spinal cord, Klein and I could both move our avatars around freely and swing our swords around.

We've completely leapt into the game.

The effect of this experience captivated me and many gamers like me, to the point where we were sure that we could never go back to the old touch-pens or motion sensors.

Klein was staring at the wind passing through the plains and the castle walls off in the distance with actual tears in his eyes.

"So, SAO is the first game for the Nerve Gear that you've played?" I asked.

Klein, looking like a calmly handsome warrior from the Sengoku period, turned his head my way and nodded.


If he wore a serious expression on his face, he had an impressive bearing about him worthy of an actor from a historical play. Of course, this was different from his actual body in the real world. It was an avatar made out of nothing, based on choosing from a list of options.

Of course, I looked like a ridiculously handsome protagonist from some fantasy animation as well.

Klein continued in his low vigorous voice, which (of course) was different from his real voice as well.

"Well, to be exact, I sorta bought the hardware in a rush after I managed to get my hands on SAO. There were only ten thousand in the first batch, so I suppose I was really lucky…. Well, if I think about it, you were ten times luckier when you got picked for beta testing. They only picked a thousand!"

"Ah, yeah… I suppose."

Klein kept staring at me. I unconsciously scratched my head.

I remembered the excitement and enthusiasm that «Sword Art Online» created when it was announced through the media like it was yesterday.

Nerve Gear had realized the future foundation for gaming with FullDive. However, due to the innovation of the actual machine, only unremarkable titles came forth for the all-important software. They were all puzzles, education related, or environmental type games; causing discontent among game addicts like me.

Nerve Gear can truly render a virtual reality. And I'm surprised you're still reading this.

But you could only walk 100 meters before you hit a wall in that world, it was really a huge letdown. It was almost unavoidable that hard core gamers like me, who had been deeply absorbed in the experience of being within the game, started anticipating a certain game genre.

We were waiting for a network response game, the kind that let millions of players log in and raise, fight with, and live as a character of their own—that is to say, an MMORPG.

When the anticipation and craving reached its limit, the first VRMMORPG was announced just in time, «Sword Art Online». The stage for the game is a floating castle consisting of 100 floors.

The players lived in a world with forests and lakes, relying only on their sword and drive to discover the route to the upper floors, defeat countless monsters, and make their way endlessly to the top.

«Magic», considered an indispensable part of fantasy MMORPGs, had been boldly left out. An almost endless number of skills, called «Sword Skills», were created. It was part of a plan to let players actually feel the experience of fighting with their own bodies through FullDive as much as possible.

Skills were varied, including productive skills (such as smithing, leather working, and sewing) and everyday skills (such as fishing, cooking, and playing music), allowing the player to not only adventure the huge game but also actually «live» in it. If they so wanted, and if their skill levels were high enough, they could buy a house and live as shepherds.

As the information was steadily revealed, the gamers' enthusiasm only grew.

The beta test only recruited a thousand testers. It is said that one hundred thousand people, equivalent to half the total number of Nerve Gear sold at the time, volunteered to be testers. Luck was the only reason that I got through the narrow gap and was picked. Beta testers also received the additional benefit of being able to pre-order the game.

The two months of beta testing were like a dream. At school I thought endlessly of my skill set, equipment, and items. I ran all the way home as soon as school ended and dived till dawn. The beta test ended in the blink of an eye. On the day my character was reset, I felt a sense of loss as if half of my actual self had been cut away.

And now— November 6, 2022, Sunday.

«Sword Art Online», after all the preparations were finished, officially started its online service at 1 PM.

Of course, I had been waiting for 30 minutes and then logged on without even a second's delay. When I checked the server, over ninety-five hundred people had already logged on. It seemed as if all of the people who had been lucky enough to get their hands on the game felt the same way I did. All the online shopping sites announced that the game was sold out seconds after it had gone on sale. The offline sales, which had started yesterday, had created lines of people who had queued up for four days, creating enough of a racket to get on the news. That meant that all the people who had been able to buy a copy of the game were almost all serious game addicts.

Klein's actions showed this clearly as well.

After I had logged onto SAO, I started running through the nostalgic stone paved roads of the «Starting City», headed for the weapons shop. Realizing that I was a beta tester after seeing me start and dash, Klein ran over without any hesitation.

"Hey, teach me a few things!" he'd begged.

I wondered how he could be so shameless and demanding to a person he hadn't met before. I was so lost for words it was almost amazing.

"Ah, er, then… why don't we go to the weapon shop?" I answered like some NPC. We ended up forming a party and I began teaching him some basics of fighting. And that's how we ended up in this current situation.

To tell the truth, I didn't get along with people in real life; in games, perhaps even less so. During beta testing, I got to know a couple of people, but I didn't get close enough to anyone to actually call them a friend.

But Klein had a side to him that grows on you, and I didn't find this uncomfortable either. Thinking that I might be able to get along with him, I opened my mouth.

"So… what do you want to do? Do you want to keep hunting till you get used to it?"

"Sure! …is what I want to say, but…"

Klein's delicate eyes looked at the bottom right of his vision. He must have been checking the time.

"…well, I should log off and eat. I ordered some pizza for 5:30."

"Pretty thorough," I said at a loss for words.

Klein thrust out his chest.

"Of course!" he said proudly. "I promised to meet some mates at the «Starting City» in a bit. I could introduce you to some of them and you could register them as friends. That way you could always send messages. How about it?"

"Errr… Hmmm…" I mumbled subconsciously.

I got along with Klein pretty well, but there was no guarantee that it'd be the same for his friends. I felt like there would be a higher chance of not getting along with them and, as a result, fall out with Klein as well.

"Should I…?"

Seeming to understand the reason for my not-so-confident answer, Klein shook his head.

"Ah, I don't mean to force you. There'll be a chance to introduce them sometime anyway."

"…Yeah. Sorry, and thanks."

As soon as I thanked him, Klein shook his head vigorously.

"Hey, hey! I should be the one thanking you. I got a lot of help from you. I'll pay you back sometime soon. Mentally."

Klein smiled and took another look at the clock.

"…Well, I'll log off for a bit. Thanks a lot, Kirito. Be seein' ya."

With that, he put his hand forward. At that moment, I thought this person would have been a great leader in «another game» and shook his hand.

"Yeah, see you around."

We each let go of the other's hand.

That was the point where Aincrad, or Sword Art Online, stopped being just some fun game for me.

Klein stepped back a bit, put his right index and middle fingers together, and pulled downwards. This was the action that opened the «main menu window». Immediately afterwards, there was a ringing sound and a shining purple rectangle appeared.

I moved a bit, sat on a rock, and opened my menu too. I started moving my fingers to organize the items that I'd gotten from fighting the boar.


"Eh?" Klein said in a strange tone. "What's this…? There's no log out button."

I stopped moving my fingers and raised my head at that.

"No button…? No way, look a bit closer," I said, a bit confused.

The swordsman opened his eyes wide beneath the bandana and pushed his face closer to the menu.

The rectangle, wider than it was high, had a bunch of buttons to the left and a silhouette showing what equipment you had on to the right. At the bottom of the menu, there was a «LOG OUT» button that allowed you to escape from this world.

As I was turning my head to the inventory that listed the items I had gained over hours of fighting, Klein started speaking in an unusually high voice.

"It's really not there. You take a look Kirito."

"I told you that there's no way that it's not there…" I muttered with a sigh as I tapped on the button on the top left to go back to the menu screen.

The inventory window on the right closed and the main screen re-opened. To the left of the silhouette, which still had quite a lot of empty spaces, there was a long row of buttons.

I moved my hand down in a movement that had almost become a habit and…

My body froze.

It wasn't here. But maybe it's in the test data.

As Klein had said, the button that had been there during the beta test —no, even right after I'd logged on— had disappeared.

I stared at the empty space for a couple of seconds then looked through the menu, making sure that it hadn't just changed its position. Klein looked up with "Right?" written on his face.

"…Not there, right?"

"Yeah, it's not there."

I nodded, although it felt slightly annoying to agree so easily. Klein smiled and started rubbing his thick chin.

"Well, it's the first day so these sort of bugs could occur. Around about now, the GMs should be crying by now from the number of messages flooding in," Klein said calmly.

"Is it all right for you to stand around like that? You said that you ordered some pizza, didn't you?" I asked teasingly.

"Ah, that's right!"

I smiled as I watched him jump around, his eyes wide.

I threw away a couple of items I didn't need from the inventory, which had turned red from having too many items, and then walked over to Klein.

"Argh! My anchovy pizza and ginger ale…!"

"Why don't you call a GM? They might cut you off from their side."

"I tried, but there's no response. It's already 5:25! Hey, Kirito! Isn't there some other way to log out?"

After listening to what Klein, who was waving both arms, said…

My face became rigid. I felt a groundless fear send a chill down my back.

"Let's see… to log out…" I said while thinking.

To get out of this virtual reality and back to my room, I have to: open the main menu, press the 'Log Out' button, and press 'Yes' on the window that popped up on the right. It was pretty simple. But… at the same time, apart from that procedure, I wasn't aware of any other way of logging off.

I looked up at Klein's face, situated quite a bit higher than my own, and shook my head.

"No… there's none. If you want to log yourself off, you have to use the menu. Apart from that, there's no other way."

"That's impossible… there's got to be something!"

Klein suddenly started shouting as if he was denying my statement.

"Return! Log out! Escape!"

But of course nothing happened. There were no voice commands in SAO of that description.

After Klein shouted this and that and even jumped around, I spoke to him.

"Klein, it's useless. Even the manual doesn't have anything on emergency access terminations."

"But… this is just stupid! Even if it's a bug, I can't even go back to my room and my body when I want to!" Klein shouted with a bewildered expression on his face.

I totally agreed with him.

This was impossible. It was complete nonsense. But it was indisputably the truth.

"Hey… what is this? It's just really weird. Right now, we can't get out of this game!"

Klein gave a desperate laugh then quickly started talking again.

"Wait, we can just turn the power off. Or just pull the «Gear» off."

As I watched Klein move his hands as if he was trying to take off some invisible hat, I felt the anxiety returning.

"That's impossible, both of them. Right now, we can't move our bodies… our real bodies. The «Nerve Gear» intercepts all the signals that our brain is sending here," I tapped the back of my head, "and reroutes them to move our avatars here."

Klein slowly closed his mouth and put his hands down.

We both stood speechless for a while, each lost in thought.

To reach the FullDive state, the Nerve Gear intercepts the signals that our brain sends down our spines and translates them so that we can control our avatars in this world. So however wildly we swing our arm about here, the arm of my real body (lying on my bed right now) wouldn't move an inch, ensuring that I wouldn't hit my head against the corner of my table or anything.

But because of this function, we can't cancel the FullDive of our own free will right now.

"…So unless the bug is fixed or somebody in the real world takes the Gear off, we have to wait it out?" Klein mumbled, still a little dazed.

I silently signaled my agreement.

"But I live by myself. You?"

I hesitated slightly but told him the truth.

"…I live with my mom and my younger sister, a family of three. I think that I'll be forced out of the Dive if I don't come down for dinner…"

"What? H-How old is your sister?"

Klein suddenly looked at me, his eyes sparkling. I pushed his head away.

"You're pretty calm right now, aren't you? She's in a sports club and hates games, so she's got nothing in common with people like us… but more than that," I spread my right arm in an attempt to change the subject. "Don't you think it's weird?"

"Well sure. Since it's a bug."

"No, I mean it's not just a bug, it's a «can't log out» bug. It's a big enough problem to bother the operation of the game itself. Like your pizza in the real world is getting colder every second, it's an actual economical loss, isn't it?"

"…A cold pizza… That's as meaningless as hard natto!"

I ignored these meaningless comments and kept talking.

"If it's like this, the operators should take the server down and log everyone out, whatever the cause. But… it's been 15 minutes since we first noticed this and there hasn't even been a system message, let alone taking the server down. It's just too weird."

"Hmm, now that I think of it, you're right."

Klein started rubbing his chin with a serious expression on his face. In the area beneath the bandana, which covered a little bit of his sharp nose, intelligence sparkled in his eyes.

I started listening to Klein, feeling a little strange about talking with someone whom I'd never meet if I erased my account.

"…The company which created SAO, «Argus», is a company that's famous for being considerate of its users, isn't it? That's why everyone was fighting to get their hands on a copy even though it's the first online game. It's sorta meaningless if they screw up like this on their first day."

"I agree. And SAO is the first VRMMORPG. If something goes wrong now, they might pass regulations for the whole genre."

Klein and I looked at each other's virtual faces and sighed.

Aincrad's seasons were based on reality, so it was early fall here as well.

I looked up, sucking in the virtual air; taking a deep, cold breath.

100 meters away, I could just about see the light purple bottom of the 2nd floor. As I followed the uneven surface, I saw the huge tower —the «labyrinth» that was the path to the upper floor— and saw that it was connected to the outer entrance.

It was just past 5:30 and the small strip of sky that could be seen was red with the light of the sunset. Despite the situation I was in, seeing the endless plains painted gold with the light of the evening sun, I found myself speechless in front of the beauty of this virtual world.

Right after that…

The world changed forever.


  • -3
    Anix55  commented on March 20, 2016, 4:20 a.m. edit 5

    does order of output matter?

    EDIT: if so then what whould it be ordered by... Le or Oc (clipped)

    Oh and could u pls clarify on not having to read the entire input?...pls ;_;

  • -1
    Daniel_Weintraub  commented on Jan. 30, 2016, 4:27 a.m.

    I understand the question but is there a certain way of outputting?

    • 0
      r3mark  commented on Jan. 30, 2016, 2:56 p.m. edit 2

      Yes there is. It's not too hard to figure out by trying different formats though.

      Edit: You're not reading the entire input. Even if you formatted your output correctly, it would still WA.

  • 3
    bobhob314  commented on April 2, 2015, 1:30 a.m. edit 4

    quacktation changed so I wouldn't get banned for the 69420th time

    "Anyone want the book?" -12345x3 (sorry Jeff, un-nested replies are weird; also your dog is cute)

    "2 years worth of ducks made a quacking noise as it goosed turgidly into Asuna's goose"

    thanks but no

    • 5
      JeffreyZ  commented on April 3, 2015, 2:57 a.m.

      I never said those words

  • 0
    12345x3  commented on April 2, 2015, 1:06 a.m.

  • -1
    bobhob314  commented on April 1, 2015, 9:29 p.m.

    Thanks WWZ, that really helped! ;)

  • 15
    awaykened  commented on April 1, 2015, 9:10 p.m.

    looks like you guys need a hint for this one

    I suggest reading this article first...

    • -1
      ScriptKitty  commented on Aug. 6, 2018, 8:54 p.m.

      Ahahaha got me good

    • 6
      Anix55  commented on Feb. 19, 2016, 2:35 a.m.

      lol there was an ad before the vid. Saved by the ad.