diff --git a/josephus_problem_1.cpp b/josephus_problem_1.cpp new file mode 100644 index 0000000..b542cfd --- /dev/null +++ b/josephus_problem_1.cpp @@ -0,0 +1,78 @@ +#include +using namespace std; + +#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); +#define time cerr<<"Time taken : " <<(float)clock()/CLOCKS_PER_SEC <<" secs"<<"\n" ; +#define F first +#define S second +#define pb push_back +typedef long long int ll ; + + +const ll INF = (ll)1e18 ; +const ll MOD = (ll)1e9 + 7 ; + + +void solve() { + + int n; + cin >> n ; + + vectorarr(n) ; + + for(int i=0 ; i 1 ){ + + vectors ; + for(int i=0 ;i> t; + + while (t--) { + solve() ; + } + + + return 0 ; +}