QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#414511#2920. Ultimate Binary WatchTheSleepyDevil#AC ✓1ms3788kbC++143.9kb2024-05-19 06:01:292024-05-19 06:01:30

Judging History

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

  • [2024-05-19 06:01:30]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3788kb
  • [2024-05-19 06:01:29]
  • 提交

answer

    /*
     Hell, 'til I reach Hell, I ain't scared
     Mama checkin' in my bedroom, I ain't there
                                                */
    #include<bits/stdc++.h>
    #include <ext/pb_ds/assoc_container.hpp>
    #include <ext/pb_ds/tree_policy.hpp>
    using namespace __gnu_pbds;
    using namespace std;

    #define Major  ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    #define TxtIO   freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
    #define read(a,n) for(int i = 0 ; i<n ; i++) cin>>a[i];
    #define write(a) for(auto x : a) cout<<x<<" ";
    #define int long long
    #define pb push_back
    #define all(a)  a.begin(),a.end()
    #define el "\n"

    typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

    const int inf=4e18;

    int dx[]={1,0,-1,0,1,1,-1,-1};
    int dy[]={0,1,0,-1,1,-1,1,-1};

    const int mod=1e9+7;
    const int MAX =1e6+7;

   // ---------------------------Function----------------------------------//

    void TestCake(){
          string s;
          cin>>s;
          vector<char>ans[4];
          for(int i=0;i<s.size();i++){
             if(s[i]=='0'){
                 for(int z=0;z<4;z++){
                    ans[z].pb('.');
                 }
             }
             else if(s[i]=='1'){
                for(int z=0;z<3;z++){
                    ans[z].pb('.');
                 }
                 ans[3].pb('*');
             }
             else if(s[i]=='2'){
                for(int z=0;z<2;z++){
                    ans[z].pb('.');
                 }
                 ans[2].pb('*');
                ans[3].pb('.');
             }
             else if(s[i]=='3'){
                for(int z=0;z<2;z++){
                    ans[z].pb('.');
                 }
                 ans[2].pb('*');
                 ans[3].pb('*');
             }
             else if(s[i]=='4'){
                for(int z=0;z<1;z++){
                    ans[z].pb('.');
                 }
                 ans[1].pb('*');
                 ans[2].pb('.');
                ans[3].pb('.');
             }
             else if(s[i]=='5'){
                for(int z=0;z<1;z++){
                    ans[z].pb('.');
                 }
                 ans[1].pb('*');
                 ans[2].pb('.');
                ans[3].pb('*');
             }
             else if(s[i]=='6'){
                 for(int z=0;z<1;z++){
                    ans[z].pb('.');
                 }
                 ans[1].pb('*');
                 ans[2].pb('*');
                ans[3].pb('.');
             }
             else if(s[i]=='7'){
                for(int z=0;z<1;z++){
                    ans[z].pb('.');
                 }
                 ans[1].pb('*');
                 ans[2].pb('*');
                ans[3].pb('*');
             }
             else if(s[i]=='8'){
                for(int z=0;z<1;z++){
                    ans[z].pb('*');
                 }
                 ans[1].pb('.');
                 ans[2].pb('.');
                ans[3].pb('.');
             }
             else if(s[i]=='9'){
                for(int z=0;z<1;z++){
                    ans[z].pb('*');
                 }
                 ans[1].pb('.');
                 ans[2].pb('.');
                ans[3].pb('*');
             }
          }
          for(int j=0;j<4;j++){
             for(int i=0;i<4;i++){
                cout<<ans[j][i]<<" ";
                if(i==1){
                    cout<<" ";
                }
             }
              cout<<el;
          }
    }
    //------------------------------Main---------------------------//
    signed main(){
        Major
        int T = 1;
//        cin >> T;
        while(T--){
            TestCake();
        //       cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
        }
        return 0;
    }

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3576kb

input:

1234

output:

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

result:

ok 4 lines

Test #2:

score: 0
Accepted
time: 1ms
memory: 3572kb

input:

0056

output:

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

result:

ok 4 lines

Test #3:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

0708

output:

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

result:

ok 4 lines

Test #4:

score: 0
Accepted
time: 0ms
memory: 3736kb

input:

0909

output:

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

result:

ok 4 lines

Test #5:

score: 0
Accepted
time: 0ms
memory: 3516kb

input:

0000

output:

. .  . . 
. .  . . 
. .  . . 
. .  . . 

result:

ok 4 lines

Test #6:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

0001

output:

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

result:

ok 4 lines

Test #7:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

0100

output:

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

result:

ok 4 lines

Test #8:

score: 0
Accepted
time: 0ms
memory: 3516kb

input:

2300

output:

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

result:

ok 4 lines

Test #9:

score: 0
Accepted
time: 0ms
memory: 3520kb

input:

2359

output:

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

result:

ok 4 lines

Test #10:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

1757

output:

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

result:

ok 4 lines

Test #11:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

0959

output:

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

result:

ok 4 lines

Test #12:

score: 0
Accepted
time: 0ms
memory: 3512kb

input:

2007

output:

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

result:

ok 4 lines

Test #13:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

2244

output:

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

result:

ok 4 lines

Test #14:

score: 0
Accepted
time: 0ms
memory: 3516kb

input:

1939

output:

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

result:

ok 4 lines

Test #15:

score: 0
Accepted
time: 1ms
memory: 3512kb

input:

0117

output:

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

result:

ok 4 lines

Test #16:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

0220

output:

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

result:

ok 4 lines

Test #17:

score: 0
Accepted
time: 1ms
memory: 3536kb

input:

1354

output:

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

result:

ok 4 lines

Test #18:

score: 0
Accepted
time: 0ms
memory: 3776kb

input:

1201

output:

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

result:

ok 4 lines

Test #19:

score: 0
Accepted
time: 1ms
memory: 3504kb

input:

1902

output:

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

result:

ok 4 lines

Test #20:

score: 0
Accepted
time: 0ms
memory: 3516kb

input:

2229

output:

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

result:

ok 4 lines

Test #21:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

0749

output:

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

result:

ok 4 lines

Test #22:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

1957

output:

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

result:

ok 4 lines

Test #23:

score: 0
Accepted
time: 0ms
memory: 3516kb

input:

0019

output:

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

result:

ok 4 lines

Test #24:

score: 0
Accepted
time: 1ms
memory: 3460kb

input:

1127

output:

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

result:

ok 4 lines

Test #25:

score: 0
Accepted
time: 0ms
memory: 3572kb

input:

1502

output:

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

result:

ok 4 lines

Test #26:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

1615

output:

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

result:

ok 4 lines

Test #27:

score: 0
Accepted
time: 1ms
memory: 3572kb

input:

1900

output:

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

result:

ok 4 lines

Test #28:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

0830

output:

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

result:

ok 4 lines