Advertisement
Tooster

Untitled

Jan 19th, 2017
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. #define _CIN
  2. //#define _SYNC
  3. // _CIN or _SCANF
  4. // _SYNC for synchronizing streams
  5.  
  6. ///NOTES:
  7. /*
  8. point(int x, int y) : x{x}, y{y} {}
  9. x&(-x) potęga 2 największa która dzieli x : zwraca prawy 1-bit
  10. x&(x-1) kasuje ostatni 1-bit
  11. command line argument: < "$(ProjectDir)IN.txt" >"$(ProjectDir)OUT.txt"
  12. */
  13. using namespace std;
  14.  
  15. #include <vector>
  16. #include <set>
  17. #include <queue>
  18.  
  19. #include <cmath>
  20. #include <algorithm>
  21. #include <utility>
  22. #include <functional>
  23. #include <string>
  24.  
  25. #ifdef _CIN
  26. #include <iostream>
  27. #define I(x) cin>>x
  28. #define O(x) cout<<x
  29. #define INT(x) int x; cin>>x
  30. #define LL(x) long long x; cin>>x
  31. #define SPACE cout<<" "
  32. #define nl cout<<'\n'
  33.  
  34. #elif defined _SCANF
  35. #include <cstdio>
  36. #define I(x) scanf("%d", &x)
  37. #define O(x) printf("%d", x)
  38. #define INT(x) int x; scanf("%d", &x)
  39. #define LL(x) long long x; scanf("%lld", &x)
  40. #define SPACE printf(" ")
  41. #define nl printf("\n")
  42. #elif !defined _CIN && !defined _SCANF
  43. #error Standard input flag not set.
  44. #endif
  45. ///utilities
  46. //short names
  47. #define ll long long
  48. #define ull unsigned long long
  49. #define ui unsigned int
  50. //consts
  51. const int oo = 2147483647;
  52. const ll LLoo = 9223372036854775807;
  53. const ll HASH = 999999937;
  54.  
  55. typedef pair<int, int> pii;
  56. typedef pair<ll, ll> pll;
  57. #define rep(x,a,y) for(int x=a; x<y; x++)
  58. #define fr(x,y) rep(x, 0, y)
  59. inline int BTS(int n) { int p = 0; while (1 << p < n) p++; p++; return p; } //binary tree size - return power;
  60.  
  61. /*
  62. --------Tooster--------
  63. # COCI 70
  64. */
  65. int T[1002];
  66. int XOR[16] = { 46, 47, 44, 45, 42, 43, 40, 41, 38, 39, 32, 33, 34, 35, 36, 37 };
  67. bool ok(int a) {
  68. fr(i, 16)
  69. if (XOR[i])
  70. return true;
  71. return false;
  72. }
  73. inline void run() {
  74. INT(N);
  75. fr(i, N) {
  76. scanf("%x", &T[i]);
  77. if (ok(T[i])) printf("-");
  78. else printf(".");
  79. }
  80. return;
  81. }
  82.  
  83. int main() {
  84. #ifdef _SYNC
  85. ios_base::sync_with_stdio(false);
  86. #endif
  87. run();
  88. return 0;
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement