Advertisement
Eather

Topcoder Template

May 20th, 2011
1,073
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.72 KB | None | 0 0
  1.                        /*Bismillahir Rahmanur Rahim*/
  2. //Template created by topcoder00
  3.  
  4. //headers
  5.  
  6. # include <list>
  7. # include <deque>
  8. # include <bitset>
  9. # include <algorithm>
  10. # include <functional>
  11. # include <numeric>
  12. # include <utility>
  13. # include <sstream>
  14. # include <iostream>
  15. # include <iomanip>
  16. # include <cstdio>
  17. # include <cmath>
  18. # include <cstdlib>
  19. # include <ctime>
  20. # include <set>
  21. # include <map>
  22. # include <cmath>
  23. # include <queue>
  24. # include <limits>
  25. # include <stack>
  26. # include <vector>
  27. # include <cstring>
  28. # include <cstdio>
  29. # include <fstream>
  30. using namespace std;
  31.  
  32. //functions
  33.  
  34. int pel(string s){string t;t=s;reverse(t.begin(),t.end());if(s==t)return 1;return 0;}
  35. string toString(int n){ostringstream ost;ost<<n;ost.flush();return ost.str();}
  36. int toInt(string s){int r=0;istringstream sin(s);sin>>r;return r;}
  37. bool isprime(int m){if(m<2) return 0;for( int i=2; i*i<=m ; i++)if(m%i==0)return 0; return 1;return 0;}
  38.  
  39. //Defines
  40.  
  41. # define __(array,w)   memset(array,w,sizeof array)
  42. # define FOR(i, a, b) for (int i=a; i<b; i++)
  43. # define REP(i, a) FOR(i,0,a)
  44. # define all(c) (c).begin(), (c).end()
  45. # define sz(x) x.size()
  46. # define pb push_back
  47. # define MP make_pair
  48. # define SBS(s,a,b) (s).substr(a,b)
  49. # define UNQ(s) {sort(all(s));(s).erase(unique(all(s)),s.end());}
  50. # define rive(s) reverse(s.begin(),s.end())
  51. # define VI vector<int>
  52. # define VS vector<string>
  53. # define VC vector<char>
  54. # define out(a) cout<<#a<<"= "<<a<<endl;
  55.  
  56. //anything more
  57.  
  58.  
  59. //coding start
  60.  
  61. class <%:class-name%> {
  62. public:
  63.     <%:return-type%> <%:method-name%>(<%:param-type-list%>);
  64. };
  65.  
  66. <%:return-type%> <%:class-name%>::<%:method-name%>(<%:param-list%>) {
  67.     <%:set-caret%>
  68. }
  69.  
  70. //end of coding
  71.  
  72. //testing
  73. <%:testing-code%>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement