artemgf

Задача I. Кубик

Nov 18th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include <iostream>
  3. #include <conio.h>
  4. #include <string>
  5. #include <algorithm>
  6. #include <vector>
  7. #include <map>
  8. #include <queue>
  9. #include <set>
  10. #include <stack>
  11.  
  12. using namespace std;
  13.  
  14. typedef long long ll;
  15.  
  16. int main()
  17. {
  18.     ll U, F, D, B, L, R;
  19.     cin >> U >> F;
  20.  
  21.     D = 7 - U;
  22.     B = 7 - F;
  23.     for (int i = 1; i <= 6; i++)
  24.     {
  25.         if (i != B&&i != D&&i != U&&i != F)
  26.         {
  27.             L = i;
  28.             break;
  29.         }
  30.     }
  31.     R = 7 - L;
  32.     cout << "+-+" << endl;
  33.     cout << "|" << L << "|" << endl;
  34.     cout << "+-+-+-+-+" << endl;
  35.     cout << "|" << U << "|" << F << "|" << D << "|" << B << "|" << endl;
  36.     cout << "+-+-+-+-+" << endl;
  37.     cout << "|" << R << "|" << endl;
  38.     cout << "+-+" << endl;
  39.     _getch();
  40.     return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment