Advertisement
Eather

Template

Apr 19th, 2011
502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.99 KB | None | 0 0
  1.                            /*in the name of Allah */
  2. # include <list>
  3. # include <deque>
  4. # include <bitset>
  5. # include <algorithm>
  6. # include <functional>
  7. # include <numeric>
  8. # include <utility>
  9. # include <sstream>
  10. # include <iostream>
  11. # include <iomanip>
  12. # include <cstdio>
  13. # include <cmath>
  14. # include <cstdlib>
  15. # include <ctime>
  16. # include <set>
  17. # include <map>
  18. # include <cmath>
  19. # include <queue>
  20. # include <limits>
  21. # include <stack>
  22. # include <vector>
  23. # include <cstring>
  24. # include <cstdio>
  25. # include <fstream>
  26. using namespace std;
  27.  
  28. # define MEM(array,w)   memset(array,w,sizeof array)
  29. # define ULL unsigned long long
  30. # define eps 1e-9
  31. # define SS stringstream
  32. # define FOR(i, a, b) for (int i=a; i<b; i++)
  33. # define REP(i, a) FOR(i, 0, a)
  34. # define rive(s) reverse(s.begin(),s.end())
  35. # define PII pair<int , int>
  36. # define MPSS map<string, string>
  37. # define MPIS map<int, string>
  38. # define MPSI map<string, int>
  39. # define MPII map<int, int>
  40. # define MPIC map<int,char>
  41. # define MPCI map<char, int>
  42. # define all(c) (c).begin(), (c).end()
  43. # define VS vector<string>
  44. # define VI vector<int>
  45. # define VC vector<char>
  46. # define VB vector<bool>
  47. # define sz(x) x.size()
  48. # define pb push_back
  49. # define STI set<int>
  50. # define STC set<char>
  51. # define STS set<string>
  52. # define OK(R,C) if(i<0 && j<0 && j==C && i==R)
  53.  
  54. template<class T> string toString(T n){ostringstream ost;ost<<n;ost.flush();return ost.str();}
  55.  
  56. int toInt(string s){int r=0;istringstream sin(s);sin>>r;return r;}
  57.  
  58. bool isprime(int n){if( n<2) return 0;for( int i=2; i*i<=n ; i++)if(n%i==0)return 0; return 1;return 0;}
  59.  
  60. int pel(string s){string t;t=s;reverse(t.begin(),t.end());if(s==t)return 1;return 0;}
  61.  
  62. char graph[100][100];
  63. bool visited[100][100];
  64. int row,col;
  65.  
  66. int dr[]={0,0,1,-1};
  67. int dc[]={1,-1,0,0};
  68. int rchange[] = {-1,0,1,-1,0,1};
  69. int cchange[] = {-1,-1,0,0,1,1};
  70.  
  71. int main()
  72. {
  73.     /*
  74.     freopen("A-large.in","r",stdin);
  75.     freopen("b.out","w",stdout);
  76.     */
  77.  
  78.     int test,Ctest=0;
  79.  
  80.  
  81.     return 0;
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement