QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#397298 | #3739. 字符画 | SamponYW | AC ✓ | 1ms | 3880kb | C++14 | 1.4kb | 2024-04-23 21:42:27 | 2024-04-23 21:42:28 |
Judging History
answer
#include <bits/stdc++.h>
#define db double
#define il inline
#define re register
#define ll long long
#define ui unsigned
#define ull ui ll
#define i128 __int128
#define pii pair<int, int>
#define fi first
#define se second
#define eb emplace_back
#define SZ(v) (int)v.size()
#define ALL(v) v.begin(), v.end()
#define mems(v, x) memset(v, x, sizeof(v))
#define memc(a, b) memcpy(a, b, sizeof(a))
#define FOR(i, L, R) for(re int i = (L); i <= (R); ++i)
#define ROF(i, R, L) for(re int i = (R); i >= (L); --i)
#define LS i << 1, l, mid
#define RS i << 1 | 1, mid + 1, r
#define popc(x) __builtin_popcount(x)
using namespace std;
#define N 100005
#define P 1000000007
il int add(int x, int y) {return x + y < P ? x + y : x + y - P;}
il void addr(int &x, int y) {(x += y) >= P && (x -= P);}
il int qpow(int p, int n = P - 2) {
int s = 1;
while(n) {
if(n & 1) s = 1ll * s * p % P;
p = 1ll * p * p % P, n >>= 1;
}
return s;
}
string str[4][5] = {
{"ooo", "..o", "ooo", "o..", "ooo"},
{"ooo", "o.o", "o.o", "o.o", "ooo"},
{"ooo", ".o.", ".o.", ".o.", "ooo"},
{"ooo", "o.o", "ooo", "o.o", "ooo"}
} ;
int main() {
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int n; cin >> n;
FOR(i, 0, 4) {
FOR(j, 0, 3) {
cout << str[j][i];
if(j != 3) FOR(k, 1, n) cout << ".";
else cout << "\n";
}
}
cerr << 1.0 * clock() / CLOCKS_PER_SEC;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3880kb
input:
2017
output:
ooo............................................................................................................................................................................................................................................................................................................
result:
ok 5 tokens