QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#636967 | #2920. Ultimate Binary Watch | enze114514# | WA | 0ms | 3584kb | C++20 | 1.4kb | 2024-10-13 04:41:18 | 2024-10-13 04:41:19 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define pb push_back
const ld pi = 3.14159265358979323846;
const int mod = 998244353;
const ll INF = 1e18;
template<typename T>
T chmax(T a, T b) {
return a > b ? a : b;
}
template<typename T>
T chmin(T a, T b) {
return a > b ? b : a;
}
const int N = (int) 1e5 + 1, M = N * 2;
void solve() {
int a[4][4] = {0};
string s;
cin >> s;
// cout << s << endl;
for (int i = 0; i < s.length(); ++i) {
int x = s[i] - '0';
int j = 3;
while (x) {
a[i][j] = x & 1;
x >>= 1;
j--;
}
}
// for (int i = 0; i < 4; ++i) {
// for (int j = 0; j < 4; ++j) {
// cout << a[i][j];
// }
// cout << endl;
// }
for (int j = 0; j < 4; ++j) {
for (int i = 0; i < 4; ++i) {
if (a[i][j]) {
cout << "*";
} else {
cout << ".";
}
if (i == 1)
cout << " ";
}
cout << endl;
}
}
int main() {
// freopen(".in", "r", stdin);
// freopen(".out", "w", stdout);
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int t = 1;
// cin >> t;
while (t--) {
solve();
}
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3584kb
input:
1234
output:
.. .. .. .* .* *. *. *.
result:
wrong answer 1st lines differ - expected: '. . . .', found: '.. ..'