QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#876598#2920. Ultimate Binary WatchmostafayWA 0ms3712kbC++141.1kb2025-01-31 04:18:322025-01-31 04:18:33

Judging History

This is the latest submission verdict.

  • [2025-01-31 04:18:33]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3712kb
  • [2025-01-31 04:18:32]
  • Submitted

answer

#include <bits/stdc++.h>

#define fast ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
#define output freopen("~/output.txt","w",stdout);
#define input  freopen("~/input.txt","rt",stdin);
#define print(v) for(auto &ele:v)cout<<ele<<" "
#define cin(v) for(auto &ele:v)cin>>ele
#define pp pair<int ,int>
#define all(v) v.begin(),v.end()
#define rv(x) return void(x)
#define ln cout<<"\n";
#define yes cout<<"YES"
#define no cout<<"NO"
#define ll long long
#define vc vector
using namespace std;
int xd[4] = {-1, 0, 1, 0};//,-1,-1, 1, 1};
int yd[4] = {0, 1, 0, -1};//, 1,-1, 1,-1};

//===============================The solution===============================


void solve() {
    string s;
    cin >> s;
    for (int i = 3; i >= 0; --i) {
        for (int j = 0; j < 4; ++j) {
            int d = s[j] - '0';
            if ((1 << i) & d)cout << '*';
            else cout << '.';
            if (j == 1)cout << " ";
        }
        cout << '\n';
    }
}


int main() {
    fast
    int t = 1;
//    cin >> t;
    while (t--) {
        solve();
        ln
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

1234

output:

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


result:

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