Task: | Npuzzle |
Sender: | untokarila |
Submission time: | 2019-07-24 14:40:11 +0300 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.01 s | details |
#2 | ACCEPTED | 0.01 s | details |
#3 | ACCEPTED | 0.01 s | details |
#4 | WRONG ANSWER | 0.01 s | details |
#5 | WRONG ANSWER | 0.01 s | details |
#6 | WRONG ANSWER | 0.01 s | details |
#7 | WRONG ANSWER | 0.01 s | details |
#8 | WRONG ANSWER | 0.01 s | details |
#9 | WRONG ANSWER | 0.01 s | details |
#10 | WRONG ANSWER | 0.01 s | details |
Code
#include <iostream> using namespace std; int main(){ int s = 0; for(int i=0; i<16; i++){ char c; cin >> c; if(c == '.') c = 15; else c -= 65; s += abs(c/4-i/4)+abs(c%4-i%4); } cout << s/2; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
ABCD
EFGH IJKL MNO. |
correct output |
---|
0 |
user output |
---|
0 |
Test 2
Verdict: ACCEPTED
input |
---|
ABCD
EFGH IJK. MNOL |
correct output |
---|
1 |
user output |
---|
1 |
Test 3
Verdict: ACCEPTED
input |
---|
ABCD
EF.H IJGL MNKO |
correct output |
---|
3 |
user output |
---|
3 |
Test 4
Verdict: WRONG ANSWER
input |
---|
ABCD
IEGH MFJL N.KO |
correct output |
---|
8 |
user output |
---|
5 |
Test 5
Verdict: WRONG ANSWER
input |
---|
.BHG
ADCE IFOK MJNL |
correct output |
---|
18 |
user output |
---|
12 |
Test 6
Verdict: WRONG ANSWER
input |
---|
ACD.
NFKI JOHM GELB |
correct output |
---|
33 |
user output |
---|
18 |
Test 7
Verdict: WRONG ANSWER
input |
---|
IKBJ
DMEG LFO. CHAN |
correct output |
---|
41 |
user output |
---|
21 |
Test 8
Verdict: WRONG ANSWER
input |
---|
ABCM
EJFN IKGO DHL. |
correct output |
---|
28 |
user output |
---|
14 |
Test 9
Verdict: WRONG ANSWER
input |
---|
.ONM
LKJI HGFE DCBA |
correct output |
---|
58 |
user output |
---|
32 |
Test 10
Verdict: WRONG ANSWER
input |
---|
MNO.
IJKL EFGH ABCD |
correct output |
---|
29 |
user output |
---|
16 |