Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. //#include "pch.h"
  2. #include <iostream>
  3. #include <vector>
  4. using namespace std;
  5.  
  6. #define ll long long
  7.  
  8. double sqr(double x) {
  9. return (x * x);
  10. }
  11.  
  12. ostream & operator << (ostream & out, vector<ll> & v) {
  13. for (int i = 0; i < v.size(); i++) {
  14. out << v[i] << ' ';
  15. }
  16. return out;
  17. }
  18.  
  19.  
  20. int step(ll x, int n) {
  21. int y = x;
  22. x = 1;
  23. for (int i = 0; i < n; i++) {
  24. x *= y;
  25. }
  26. return x;
  27. }
  28.  
  29. void LlVec(vector<ll> &a) {
  30. int x = 0;
  31. int h = 1;
  32. vector<char> fc;
  33. char c = getchar();
  34. if (c != '\n' & c != -1) {
  35. if (c == '-') {
  36. h = -1;
  37. c = getchar();
  38. }
  39. while (c != ' ' & c != '\n' & c != -1) {
  40. fc.push_back(c);
  41. c = getchar();
  42. }
  43. int k = fc.size();
  44. for (int i = k - 1; i >= 0; i--) {
  45. x += (fc[i] - 48) * step(10, k - i - 1);
  46. }
  47. x *= h;
  48. a.push_back(x);
  49. do {
  50. cin >> x;
  51. a.push_back(x);
  52. c = getchar();
  53. } while (c != -1 & c != '\n');
  54. }
  55. }
  56.  
  57. int main()
  58. {
  59. int n, n1;
  60. cin >> n1;
  61. getchar();
  62. vector<ll> a(n1, 0);
  63. //LlVec(a);
  64. for (int i = 0; i < n1; i++) {
  65. int x;
  66. cin >> x;
  67. a[i] = x;
  68. }
  69. cin >> n;
  70. for (int i = 0; i < n; i++) {
  71. int x;
  72. cin >> x;
  73. a[x - 1]--;
  74. }
  75. for (int i = 0; i < n1; i++) {
  76. if (a[i] >= 0) cout << "NO" << endl; else cout << "YES" << endl;
  77. }
  78. return 0;
  79.  
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement