SHARE
TWEET

Untitled

a guest Oct 15th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    #pragma GCC omptimize("unroll-loops")
  2.     #pragma GCC omptimize("игорь говно")
  3.     #pragma GCC optimize("no-stack-protector")
  4.     #pragma comment(linker, "/STACK:1000000000")
  5.  
  6.     #include <bits/stdc++.h>
  7. #include <algorithm>
  8.     #define LOCAL
  9.     #define fori(i, r, x) for(int i = r; i < x; i++)
  10.     #define eb emplace_back
  11.     #define lb lower_bound
  12.     #define ub upper_bound
  13.     #define er equal_range
  14.     #define fi first
  15.     #define se second
  16.  
  17.     using namespace std;
  18.  
  19.     typedef long long int lli;
  20.     typedef long long ll;
  21.     typedef long double ld;
  22.     typedef pair<int, int> pii;
  23.     typedef pair<ll,ll> pll;
  24.     typedef pair<ld,ld> pld;
  25.     typedef vector<int> vi;
  26.     typedef vector<ll> vll;
  27.     typedef vector<ld> vld;
  28.     typedef vector<vector<int>> vvi;
  29.  
  30.     const int INF32 = 2009000999;
  31.     const ll INF64 = 4e18;
  32.     const int sz = 1e6;
  33.     const int mod = 1e9+7;
  34.     const long double EPS = 1e-18;
  35.     const int base = 1000*1000*1000;
  36.    
  37.     vector<ll> a;
  38.     int a1;
  39.  
  40.     void f() {
  41.         int carry = 0;
  42.         for (int i=(int)a.size()-1; i>=0; --i) {
  43.         long long cur = a[i] + carry * 1ll * base;
  44.         a[i] = int (cur / a1);
  45.         carry = int (cur % a1);
  46.         }
  47.         while (a.size() > 1 && a.back() == 0)
  48.         a.pop_back();
  49. }
  50.  
  51.    
  52.     int main(){
  53.         ios_base::sync_with_stdio(false);
  54.         cin.tie(0);
  55.         cout.tie(0);
  56.  
  57.         #ifdef LOCAL
  58.             freopen("input.txt", "r", stdin);
  59.             freopen("output.txt", "w", stdout);
  60.         #endif
  61.         cin >> n >> a1 >> b;
  62.         for (int i=(int)s.length(); i>0; i-=9)
  63.               if (i < 9)
  64.         a.push_back (atoi (s.substr (0, i).c_str()));
  65.               else
  66.         a.push_back (atoi (s.substr (i-9, 9).c_str()));
  67.  
  68.         if (b == 1) {
  69.             cout << min(n, f(a1));
  70.             return 0;
  71.         }
  72.         if (n == 1) {
  73.             if (a1 <= ) cout << a1;
  74.                 else cout
  75.         }
  76.        
  77.     }
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