Created
March 28, 2021 06:35
-
-
Save Loliver1224/c3f2355d40152ac3e6cd6b18d74cc7a4 to your computer and use it in GitHub Desktop.
競プロ用テンプレートをmainの下に置いとける書き方
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
#if !__INCLUDE_LEVEL__ | |
#include __FILE__ | |
int main() { | |
rep(i, 3) printf("%2d", i); | |
cout << endl << "ok." << endl; | |
} | |
#else | |
#include <bits/stdc++.h> | |
using namespace std; | |
#define rep(i, n) for(int i=0; i<(n); ++i) | |
template <class T> void chmax(T &a, const T &b) { | |
if (a > b) a = b; | |
} | |
template <class T> void chmin(T &a, const T &b) { | |
if (a < b) a = b; | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
参考
https://qiita.com/Raclamusi/items/660f0f42c57e4371ed78