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
some test |
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 <utility> | |
#include <iostream> | |
using namespace std; | |
template <typename T> | |
struct counter { | |
static int created, alive; | |
counter() {++created; ++alive; } | |
~counter() { --alive; } | |
}; |
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 <sto/sto.h> | |
using namespace sto; | |
#include <vector> | |
#include <iostream> | |
using namespace std; | |
int main() { | |
// no need for clumsy iota (is covertable to any STL container) |
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 <sto/sto.h> | |
using namespace sto; | |
#include <vector> | |
#include <iostream> | |
using namespace std; | |
int main() { | |
// no need for clumsy iota (is covertable to any STL container) |
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
" table of contents fold | |
" fold togle | |
nmap <F8> :hi clear Folded<CR>:call Fold()<CR> | |
" next/pref fold | |
nmap { kzkjz<CR> | |
nmap } zjz<CR> | |
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 <iostream> | |
#include <vector> | |
using namespace std; | |
int main() { | |
size_t n,m; | |
std::cin >> n >> m; | |
vector<vector<int> > M(m, vector<int>(n,-1)); | |
int T=0,B=m,L=0,R=n; // top, bottom, left, right |