| Task: | Sukujuhla |
| Sender: | Pohjantahti |
| Submission time: | 2017-06-22 20:09:49 +0300 |
| Language: | C++ |
| Status: | READY |
| Result: | 19 |
| group | verdict | score |
|---|---|---|
| #1 | ACCEPTED | 19 |
| #2 | WRONG ANSWER | 0 |
| #3 | WRONG ANSWER | 0 |
| test | verdict | time | group | |
|---|---|---|---|---|
| #1 | ACCEPTED | 0.10 s | 1 | details |
| #2 | WRONG ANSWER | 0.11 s | 2 | details |
| #3 | WRONG ANSWER | 1.28 s | 3 | details |
Code
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int n, m, k;
vector<int> v;
int q;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> n >> m >> k;
if (n != 16) {
cout << "gg\n";
return 0;
}
int id = -1;
int sum = 0;
for (int i = 0; i < 15; ++i) {
int cur;
cin >> cur;
v.push_back(cur);
if (i == 7) q = cur;
if (cur == 1) id = i;
sum += cur;
}
if (id == -1) id = 15; // 1 not in list
int miss = 136-sum;
v.push_back(miss);
vector<int> v2;
for (int i = id; i < 16; ++i) {
v2.push_back(v[i]);
}
for (int i = 0; i < id; ++i) {
v2.push_back(v[i]);
}
for (int i = 0; i < 16; ++i) {
if (v2[i] == q) {
if (i%2 == 0) {
cout << "A\n";
}
else cout << "B\n";
return 0;
}
}
return 0;
}Test details
Test 1
Group: 1
Verdict: ACCEPTED
| input |
|---|
| #!/bin/bash set -e OFFSET=$(grep -onam1 '^__DATA_... |
| correct output |
|---|
| 50 |
| user output |
|---|
| A B A ... Truncated |
Test 2
Group: 2
Verdict: WRONG ANSWER
| input |
|---|
| #!/bin/bash set -e OFFSET=$(grep -onam1 '^__DATA_... |
| correct output |
|---|
| 50 |
| user output |
|---|
| gg gg gg ... Truncated |
Test 3
Group: 3
Verdict: WRONG ANSWER
| input |
|---|
| #!/bin/bash set -e OFFSET=$(grep -onam1 '^__DATA_... |
| correct output |
|---|
| 50 |
| user output |
|---|
| gg gg gg ... Truncated |
