daily pastebin goal
14%
SHARE
TWEET

Untitled

a guest Oct 20th, 2018 63 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. #pragma GCC optimize("Ofast")
  2. #include <iostream>
  3. #include <vector>
  4. #include <string>
  5. #include <algorithm>
  6. #include <cstdio>
  7. #include <numeric>
  8. #include <cstring>
  9. #include <ctime>
  10. #include <cstdlib>
  11. #include <set>
  12. #include <map>
  13. #include <unordered_map>
  14. #include <unordered_set>
  15. #include <list>
  16. #include <cmath>
  17. #include <bitset>
  18. #include <cassert>
  19. #include <queue>
  20. #include <stack>
  21. #include <deque>
  22. #include <cassert>
  23. #include <iomanip>
  24. #include <random>
  25.  
  26. using namespace std;
  27.  
  28.  
  29.  
  30. #define ll long long
  31. #define ld double
  32. #define endl '\n'
  33. #define int long long
  34.  
  35. template<typename T> void uin(T &a, T b) {
  36.     if (b < a) a = b;
  37. }
  38.  
  39. template<typename T> void uax(T &a, T b) {
  40.     if (b > a) a = b;
  41. }
  42.  
  43.  
  44.  
  45. mt19937 rnd(rand());
  46.  
  47. int n;
  48.  
  49. map<int, pair<int, int>> cnt;
  50.  
  51. vector<pair<pair<int, int>, pair<int, int>>> vec;
  52. int sz, a, d = 1, e, f, g, a2, b2, c2;
  53. double dou, dou2;
  54. double b, c;
  55. deque<long long>mas[301][301], mas2[301][301];
  56. string s;
  57. signed main() {
  58.     ios_base::sync_with_stdio(false);
  59.     cin.tie(0);
  60.     cin >> a >> b >> c;
  61.     dou = ceil(a / (c + 1)+0.0000001);
  62.     dou = (double)(a - dou)*(b + 1);
  63.     dou2 = ceil(a / (b + 1) + 0.0000001);
  64.     dou2 = (double)(a - dou2)*(c + 1);
  65.     if (dou > dou2) {
  66.         swap(dou, dou2);
  67.         e = 1;
  68.     }
  69.     if (dou2 <= a) {
  70.         cout << -1;
  71.         return 0;
  72.     }
  73.     cout << dou2 << endl;
  74.     if (dou2 - 0.000001 < dou) {
  75.         dou = ceil(a / (c + 1) + 0.0000001);
  76.         dou2 = ceil(a / (b + 1) + 0.0000001);
  77.         if (dou != dou2) {
  78.             cout << 2 << endl;
  79.             if (dou < dou2) {
  80.                 dou2 = a - dou2;
  81.                 cout << dou << " " << a - dou << endl;
  82.                 cout << dou2 << " " << a - dou2 << endl;
  83.             }
  84.             else {
  85.                 dou2 = a - dou2;
  86.                 cout << dou << " " << a - dou << endl;
  87.                 cout << dou2 << " " << a - dou2<<endl;
  88.             }
  89.         }
  90.         else {
  91.             cout << 1 << endl;
  92.             if (e == 0) {
  93.                 cout << dou << " " << a - dou << endl;
  94.             }
  95.             else {
  96.                 cout << dou2 << " " << a - dou2 << endl;
  97.             }
  98.         }
  99.     }
  100.     else {
  101.         dou = ceil(a / (c + 1) + 0.0000001);
  102.         dou2 = ceil(a / (b + 1) + 0.0000001);
  103.         cout << 1 << endl;
  104.         if (e == 0) {
  105.             cout << dou2 << " " << a - dou2 << endl;
  106.         }
  107.         else {
  108.             cout << a - dou << " " << dou << endl;
  109.         }
  110.     }
  111.     cin >> b;
  112.     return 0;
  113. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top