QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#96214 | #2920. Ultimate Binary Watch | Abdelrahman_ahmed7# | WA | 0ms | 3384kb | C++17 | 1.0kb | 2023-04-13 17:13:50 | 2023-04-13 17:13:54 |
Judging History
answer
#include<bits/stdc++.h>
#define ll long long
#define el '\n'
#define all(a) a.begin(),a.end()
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
const ll N=1e5+5,mod=1e9+7;
vector<int>v[4];
void solve(ll t)
{
string s;
cin>>s;
for(int i=0;i<4;i++){
int num=s[i]-'0';
int cnt=3;
while(cnt!=-1){
v[cnt].push_back(num%2);
num/=2;
cnt--;
}
}
// cout<<'l';
// cout<<v[3][0];
for(int i=0;i<4;i++){
for(int j=0;j<v[i].size();j++){
if(v[i][j]==1)cout<<"*";
else cout<<'.';
if(j==1)cout<<' ';
}
if(i!=3)cout<<el;
}
}
int main() {
ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
ll t;
//cin >> t;
t = 1;
for (ll i = 0 ; i < t ; i ++)
{
solve(t);
}
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3384kb
input:
1234
output:
.. .. .. .* .* *. *. *.
result:
wrong answer 1st lines differ - expected: '. . . .', found: '.. ..'