Advertisement
Saleh127

at 181C

Nov 1st, 2020
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. typedef pair<int, int> P;
  4. P p[110];
  5. int main()
  6. {
  7. int n;
  8. cin >> n;
  9. map<P, int> mp;
  10. for (int i = 0; i < n; i++)
  11. {
  12. cin >> p[i].first >> p[i].second;
  13. }
  14.  
  15.  
  16. bool f = false;
  17.  
  18. for (int i = 0; i < n - 2; i++)
  19. {
  20. for (int j = i + 1; j < n - 1; j++)
  21. {
  22. for (int k = j + 1; k < n; k++)
  23. {
  24. if ((p[i].first - p[j].first) * (p[i].second - p[k].second) == (p[i].first - p[k].first) * (p[i].second - p[j].second))
  25. {
  26. f = true;
  27. break;
  28. }
  29. }
  30. if (f)
  31. break;
  32. }
  33. if (f)
  34. break;
  35. }
  36.  
  37. if (f)
  38. cout << "Yes" << endl;
  39. else
  40. cout << "No" << endl;
  41. return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement