| Task: | Kartta |
| Sender: | Nameci2718_ |
| Submission time: | 2015-01-29 17:15:32 +0200 |
| Language: | Java |
| Status: | READY |
| Result: | 12 |
| group | verdict | score |
|---|---|---|
| #1 | ACCEPTED | 12 |
| #2 | WRONG ANSWER | 0 |
| #3 | OUTPUT LIMIT EXCEEDED | 0 |
| #4 | OUTPUT LIMIT EXCEEDED | 0 |
| test | verdict | time | group | |
|---|---|---|---|---|
| #1 | ACCEPTED | 0.46 s | 1 | details |
| #2 | WRONG ANSWER | 0.82 s | 2 | details |
| #3 | OUTPUT LIMIT EXCEEDED | 0.00 s | 3 | details |
| #4 | OUTPUT LIMIT EXCEEDED | 0.00 s | 4 | details |
Code
public class Main {
public static void main(String[] args) {
IO io = new IO();
int n = io.nextInt();
int m = io.nextInt();
int h = io.nextInt();
int[] list = new int[n * m];
for (int i = 0; i < n * m; i++) {
list[i] = io.nextInt();
}
for (int i = 1; i <= h; i++) {
for (int j = 0; j < n; j++) {
for (int j2 = 0; j2 < m; j2++) {
int index = j2 + j * m;
if(list[index] < i) {
io.print('S');
} else io.print('V');
}
io.println();
}
}
for (int i = 0; i < 40-h; i++) {
for (int j = 0; j < n; j++) {
for (int j2 = 0; j2 < m; j2++) {
io.print('V');
}
io.println();
}
}
for (int i = 1; i <= h; i++) {
io.print(i+" ");
for (int j = 1; j <= i; j++) {
io.print(j+" ");
}
io.println();
}
io.close();
}
}
Test details
Test 1
Group: 1
Verdict: ACCEPTED
| input |
|---|
| 100 100 40 40 11 38 24 5 31 40 10 17 33 1... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| VVVVVVVVVVVVVVVVVVVVVVVVVVVVVV... |
Test 2
Group: 2
Verdict: WRONG ANSWER
| input |
|---|
| 100 100 200 200 71 185 86 113 84 170 60 17... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| VVVVVVVVVVVVVVVVVVVVVVVVVVVVVV... |
Test 3
Group: 3
Verdict: OUTPUT LIMIT EXCEEDED
| input |
|---|
| 100 100 1000 824 172 828 721 509 73 437 530... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| (empty) |
Test 4
Group: 4
Verdict: OUTPUT LIMIT EXCEEDED
| input |
|---|
| 100 100 10000 7110 9439 3392 1630 368 8481 1... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| (empty) |
