Advertisement
haufont

Untitled

Jun 22nd, 2016
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include<iostream>
  3. #include<set>
  4. #include<vector>
  5. #include<algorithm>
  6. #include<set>
  7. #include<stdio.h>
  8. #include<vector>
  9. #include<algorithm>
  10. #include<set>
  11. #include<string>
  12. #include<map>
  13. #include<stdlib.h>
  14. #include<string.h>
  15. #include<string>
  16. #include<queue>
  17. using namespace std;
  18. int A[201];
  19. bool B[201];
  20. bool C[101][201];
  21. int main()
  22. {
  23. int a;
  24. cin >> a;
  25. int l = 2;
  26. int f = 1;
  27. int g;
  28. for (int i = 1; i <= a; i++)
  29. {
  30. C[0][i] = i;
  31. }
  32. if (a % 2 == 1)
  33. {
  34. cout << 1 << " "<< (a + 1) / 2;
  35. cout.flush();
  36. for (int i = 1; i <= (a + 1) / 2; i++)
  37. {
  38. cin >> g;
  39. B[g] = 1;
  40. }
  41. int r = a - 1;
  42. while (l <= r)
  43. {
  44. cout << l <<" "<< r;
  45. cout.flush();
  46. for (int i = 1; i <= r - l+1; i++)
  47. {
  48. cin >> g;
  49. C[f][g] = 1;
  50. }
  51. f++;
  52. l++;
  53. r--;
  54. }
  55. }
  56. if (a % 2 == 0)
  57. {
  58. cout << 1 << " " << a / 2;
  59. cout.flush();
  60. for (int i = 1; i <= a / 2; i++)
  61. {
  62. cin >> B[i];
  63. }
  64. int r = a - 2;
  65. while (l <= r)
  66. {
  67. cout << l << " " << r;
  68. cout.flush();
  69. for (int i = 1; i <= r - l + 1; i++)
  70. {
  71. cin >> g;
  72. C[f][g] = 1;
  73. }
  74. f++;
  75. l++;
  76. r--;
  77. }
  78. }
  79. for (int i = 1; i <= f; i++)
  80. {
  81. for (int v = 1; v <= f - i; v++)
  82. {
  83.  
  84. }
  85. }
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement