QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#96214#2920. Ultimate Binary WatchAbdelrahman_ahmed7#WA 0ms3384kbC++171.0kb2023-04-13 17:13:502023-04-13 17:13:54

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-04-13 17:13:54]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3384kb
  • [2023-04-13 17:13:50]
  • 提交

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);
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3384kb

input:

1234

output:

.. ..
.. .*
.* *.
*. *.

result:

wrong answer 1st lines differ - expected: '. .   . .', found: '.. ..'