Task: | Kartta |
Sender: | Hansuzu |
Submission time: | 2015-02-01 15:47:28 +0200 |
Language: | C++ |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 12 |
#2 | ACCEPTED | 27 |
#3 | ACCEPTED | 15 |
#4 | ACCEPTED | 46 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.10 s | 1 | details |
#2 | ACCEPTED | 0.11 s | 2 | details |
#3 | ACCEPTED | 0.11 s | 3 | details |
#4 | ACCEPTED | 0.22 s | 4 | details |
Code
#include <iostream> using namespace std; int mp[10101]; char p[40][10101]; int main(){ for (int i=0; i<40; ++i) for (int j=0; j<10101; ++j) p[i][j]='L'; for (int j=0; j<10101; ++j) p[0][j]='V'; ios_base::sync_with_stdio(0); cin.tie(0); int n, m, h; cin >> n >> m >> h; for (int i=0; i<n*m; ++i)cin >> mp[i]; for (int b=0; b<16; ++b){ for (int i=0; i<n*m; ++i){ if (mp[i]&(1<<b)){ p[b+1][i]='V'; }else{ p[b+17][i]='S'; } } } for (int k=0; k<40; ++k){ for (int i=0; i<n; ++i){ for (int j=0; j<m; ++j){ cout << p[k][i*m+j]; } cout << endl; } } for (int x=1; x<=h; ++x){ cout << 17 << " "; cout << 1 << " "; for (int b=0; b<16; ++b){ cout << (b+2+((x&(1<<b))?16:0)) << " "; } cout << endl; } }
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: ACCEPTED
input |
---|
100 100 200 200 71 185 86 113 84 170 60 17... |
correct output |
---|
(empty) |
user output |
---|
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVV... |
Test 3
Group: 3
Verdict: ACCEPTED
input |
---|
100 100 1000 824 172 828 721 509 73 437 530... |
correct output |
---|
(empty) |
user output |
---|
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVV... |
Test 4
Group: 4
Verdict: ACCEPTED
input |
---|
100 100 10000 7110 9439 3392 1630 368 8481 1... |
correct output |
---|
(empty) |
user output |
---|
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVV... |