Skip to content

Instantly share code, notes, and snippets.

@YoussefLagtab
Last active February 7, 2020 22:16
Show Gist options
  • Save YoussefLagtab/f609670d887a919c22ea0bd316485396 to your computer and use it in GitHub Desktop.
Save YoussefLagtab/f609670d887a919c22ea0bd316485396 to your computer and use it in GitHub Desktop.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long l;
typedef unsigned long ul;
typedef double d;
typedef long double ld;
#define rep(i,n) for (int i = 0; i < n; ++i)
#define rrep(i,n) for (int i = n - 1; i >= 0; --i)
#define REP(i,s,e) for (int i = s; i <= e; ++i)
#define RREP(i,s,e) for (int i = s; i >= e; --i)
#define endl '\n'
#define vi vector<int>
#define vl vector<l>
#define vll vector<ll>
#define pi pair<int,int>
#define F first
#define S second
int gcd(int a, int b)
{
if (b == 0)
return a;
return gcd(b, a % b);
}
int lcm(int a, int b)
{
return a / gcd(a, b) * b;
}
// max fib(71)
long long fib(int n)
{
long double phi = (1 + sqrt(5)) / 2;
return (powl(phi, n) - powl(1 - phi, n)) / sqrt(5);
}
//#define _IO
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
#ifdef _IO
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment