Submission #315257

# Submission time Handle Problem Language Result Execution time Memory
315257 2020-10-22T06:45:23 Z Seanliu Costinland (info1cup19_costinland) C++14
58.5058 / 100
2 ms 300 KB
#include <iostream>
#define int long long int
using namespace std;

int D;
const int maxN = 63;
char mp[maxN][maxN];

inline void solve(int D){
	for(int i = 0; i < maxN; i++){
		for(int j = 0; j < maxN; j++) mp[i][j] = '.';
	}
	for(int i = 0; i < maxN - 1; i++){
		mp[i][maxN - 1] = 'd';
		mp[maxN - 1][i] = 'r';
	}
	for(int i = 0; i < maxN - 1; i++){
		mp[i][i] = 'X';
		mp[i][i + 1] = 'd';
		mp[i + 1][i] = 'r';
	}

	for(int i = 0; i < maxN; i++){
		if((D >> i) & 1){
			if((D >> (i + 1)) == 0){
				for(int j = i; j < maxN - 1; j++){
					mp[j][j] = mp[j][j + 1] = mp[j + 1][j] = '.';
				}
			} else mp[i][i + 1] = 'X';
		}
	}
	for(int i = 0; i < maxN - 1; i++){
		mp[i][maxN - 1] = 'd';
		mp[maxN - 1][i] = 'r';
	}

	cout << maxN << " " << maxN << endl;
	for(int i = 0; i < maxN; i++){
		for(int j = 0; j < maxN; j++){
			cout << mp[i][j];
		}
		cout << endl;
	}
}

signed main(){
	cin >> D;
	solve(D);
}
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 204 KB Partially Correct! Your size: 63
2 Partially correct 1 ms 296 KB Partially Correct! Your size: 63
3 Partially correct 1 ms 204 KB Partially Correct! Your size: 63
4 Partially correct 1 ms 204 KB Partially Correct! Your size: 63
5 Partially correct 1 ms 204 KB Partially Correct! Your size: 63
6 Partially correct 1 ms 204 KB Partially Correct! Your size: 63
7 Partially correct 1 ms 204 KB Partially Correct! Your size: 63
8 Partially correct 2 ms 204 KB Partially Correct! Your size: 63
9 Partially correct 1 ms 204 KB Partially Correct! Your size: 63
# Verdict Execution time Memory Grader output
1 Partially correct 2 ms 204 KB Partially Correct! Your size: 63
2 Partially correct 2 ms 204 KB Partially Correct! Your size: 63
3 Partially correct 1 ms 300 KB Partially Correct! Your size: 63
4 Partially correct 1 ms 204 KB Partially Correct! Your size: 63
5 Partially correct 1 ms 204 KB Partially Correct! Your size: 63
6 Partially correct 1 ms 204 KB Partially Correct! Your size: 63
7 Partially correct 1 ms 204 KB Partially Correct! Your size: 63
8 Partially correct 1 ms 204 KB Partially Correct! Your size: 63