| Task: | Sukujuhla |
| Sender: | mangolassi |
| Submission time: | 2017-01-19 17:06:29 +0200 |
| Language: | C++ |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| #2 | WRONG ANSWER | 0 |
| #3 | WRONG ANSWER | 0 |
| test | verdict | time | group | |
|---|---|---|---|---|
| #1 | WRONG ANSWER | 0.10 s | 1 | details |
| #2 | WRONG ANSWER | 0.11 s | 2 | details |
| #3 | WRONG ANSWER | 1.32 s | 3 | details |
Code
#include <iostream>
int abs(int a) {
return a < 0 ? -a : a;
}
int adj[16];
int large[3];
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(0);
int n, m, k;
std::cin >> n >> m >> k;
adj[15] = -1000;
for (int a = 0; a < m; ++a) {
large[0] = 15;
large[1] = 15;
large[2] = 15;
for (int i = 0; i < 2 * k + 1; ++i) {
std::cin >> adj[i];
if (adj[i] >= adj[large[0]]) {
large[2] = large[1];
large[1] = large[0];
large[0] = i;
} else if (adj[i]>= adj[large[1]]) {
large[2] = large[1];
large[1] = i;
} else if (adj[i] >= adj[large[2]]) {
large[2] = i;
}
}
int mid = abs((large[0] + large[1]+ large[2]) / 3 - 3) % 3;
if (mid == 0) {
std::cout << "A\n";
} else if (mid == 1) {
std::cout << "B\n";
} else {
std::cout << "C\n";
}
}
}
Test details
Test 1
Group: 1
Verdict: WRONG ANSWER
| input |
|---|
| #!/bin/bash set -e OFFSET=$(grep -onam1 '^__DATA_... |
| correct output |
|---|
| 50 |
| user output |
|---|
| A A A ... Truncated |
Test 2
Group: 2
Verdict: WRONG ANSWER
| input |
|---|
| #!/bin/bash set -e OFFSET=$(grep -onam1 '^__DATA_... |
| correct output |
|---|
| 50 |
| user output |
|---|
| B B B B B ... Truncated |
Test 3
Group: 3
Verdict: WRONG ANSWER
| input |
|---|
| #!/bin/bash set -e OFFSET=$(grep -onam1 '^__DATA_... |
| correct output |
|---|
| 50 |
| user output |
|---|
| C C C C C ... Truncated |
