Submission

Status:

PP--PPP-P-

Subtask/Task Score:

60/100

Score: 60

User: mameeewin

Problemset: ลูกเต๋า

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-09 19:33:38

#include <iostream>
#include <vector>
using namespace std;

int main(){
  vector<vector<string>> d={
    {
      "   ",
      " * ",
      "   "
    },
    {
      "   ",
      "* *",
      "   "
    },
    {
      " * ",
      " * ",
      " * "
    },
    {
      "* *",
      "   ",
      "* *"
    },
    {
      "* *",
      " * ",
      "* *"
    },
    {
      "* *",
      "* *",
      "* *"
    } 
  };
  string s; cin >> s;
  if (s.length()!=3){
    cout << "ERROR";
    return 0;
  }
  vector<string> done(3);
  for (char c : s){
    int n=c-'0';
    if (n>6||n<1){
      cout << "ERROR";
      return 0;
    }
    for (int i=0; i<3; i++){
      done[i]+=d[n-1][i];
      done[i]+='|';
    }
  }
  for (int i=0; i<3; i++){
    done[i].pop_back();
    cout << done[i] << "\n";
  }
}