# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
15243 |
2015-07-12T04:27:10 Z |
ttgame |
분배 (kriii3_Q) |
C++ |
|
0 ms |
1716 KB |
#include <iostream>
#include <cstring>
using namespace std;
int main(void)
{
int N=1;
int K=1;
int Z=1;
cin >> N >> K;
Z = (1 << (N - K));
N = (1 << N);
K = (1 << K);
for (int i = 0; i < K; i++)
{
for (int j = 0; j < Z; j++)
{
if (j % 2 == 0)
{
int n = (j / 2) * 4 + i;
cout << n<<" ";
}
else
{
int q = ((j + 1) / 2) * 4 - 1 - i;
cout << q<<" ";
}
}
cout << endl;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1716 KB |
Output is correct |
2 |
Correct |
0 ms |
1716 KB |
Output is correct |
3 |
Incorrect |
0 ms |
1716 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |