# **[e799: p6. 資工系的浪漫](https://zerojudge.tw/ShowProblem?problemid=e799)** --- ## **Input** 第一行輸入兩個正整數 N、M (2 ≤ N、M ≤ 62) 分別代表圖形的高與寬, 第二行輸入一個 字元 C。接下來有 N 行, 每 i 行有一個正整數 Si (0 ≤ S ≤2^M-1,1 ≤ i ≤N),代表浩哥設下 的密碼數值。 ## **Output** 將每個密碼數值 Si 轉換為二進位,在此二進位中若為 0 便輸出「.」, 若為 1 則輸出符號 C,每兩個字元間以一個空白區隔。 每個數值 Si 會對應一行輸出,該行連同空白字元及最後 的換行字元共有 (2×M) 個字元。解密 S1, S2, …, SN 後,會得到一個N×M(只看字元 . 和 C)的圖形。 --- ## **Sample input** ``` 8 8 # 0 102 255 255 126 60 24 0 ``` ## **Sample output** ``` . . . . . . . . . # # . . # # . # # # # # # # # # # # # # # # # . # # # # # # . . . # # # # . . . . . # # . . . . . . . . . . . ``` --- ## **Solution:** ```cpp= #include<iostream> using namespace std ; int main() { ios_base::sync_with_stdio(0), cin.tie(0); int height , width ; long long si ; char ch ; cin >> height >> width >> ch ; for( int i = 0 ; i < height ; i ++ ) { cin >> si ; for (long long j = 1LL << (width - 1); j; j >>= 1) putchar((si & j) ? ch : '.'), putchar(' ') ; putchar('\n') ; } return 0 ; } ``` ---