Last active
July 27, 2016 04:07
-
-
Save greenbagels/bae6950a74ef431b43ab26403bae90e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> | |
#include <cmath> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
using namespace std;using v=std::vector<int>;string escape(v j,int i){v h;do{h.push_back(i);try{if(i<=1?0:!((lround(tgamma(i))+1)%i)){i-=j[i];}else{i=j[i];}}catch(const out_of_range& e){cerr<<i;}}while(find(h.begin(),h.end(),i)!=h.end());return string("false");} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment