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 <cstdio> | |
#include <vector> | |
using namespace std; | |
class Node { | |
public: | |
int number; | |
Node *parent; | |
Node(int _val=-1, Node *_par=NULL): number(_val), parent(_par) {} | |
virtual void visit() { |
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 <cstdio> | |
#include <vector> | |
using namespace std; | |
class Node { | |
public: | |
int number; | |
Node *parent; | |
Node(int _val=-1, Node *_par=NULL): number(_val), parent(_par) {} | |
virtual void visit() { |
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 <cstdio> | |
#include <vector> | |
using namespace std; | |
class Node { | |
public: | |
int number; | |
Node *parent; | |
Node(int _val=-1, Node *_par=NULL): number(_val), parent(_par) {} | |
virtual void visit() { |
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 <cstdio> | |
#include <vector> | |
using namespace std; | |
class Node { | |
public: | |
int number; | |
Node *parent; | |
Node(int _val=-1, Node *_par=NULL): number(_val), parent(_par) {} | |
virtual void visit() { |
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 <cstdio> | |
#include <cstdlib> | |
#include <cstring> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#define SZ(x) ((int)(x).size()) | |
#define FOR(it, c) for(__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it) |
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 n; | |
void f(int level, int a[], vector<int> &bag) { | |
if (bag.empty()) { | |
for (int i = 1; i <= n; i++) | |
cout << a[i] << (i==n? "\n":" "); | |
return; |
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
syntax on | |
set nocompatible | |
set backspace=indent,eol,start | |
set expandtab | |
set wildmenu | |
colors torte | |
set guifont=Monospace\ 22 | |
set cin | |
set ts=2 |
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> | |
#include <algorithm> | |
using namespace std; | |
int main() { | |
int N; cin >> N; | |
string A[3]; | |
for (int i = 0; i < 3; i++) { |
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 <cstdio> | |
#include <cstdlib> | |
#include <cstring> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#define SZ(x) ((int)(x).size()) | |
#define FOR(it, c) for(__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it) |
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
18 12 1000 37 | |
2 1 3 4 1 3 1 3 0 2 2 0 1 1 1 3 4 4 | |
4 4 2 2 3 1 0 5 3 3 6 3 | |
2 1 2 2 6 2 3 4 2 5 5 2 | |
6 3 4 3 3 5 1 0 4 3 3 1 | |
2 5 3 3 3 2 4 1 4 2 2 5 | |
1 3 6 3 3 3 5 1 2 3 2 4 | |
0 4 2 1 5 4 4 2 2 3 5 4 | |
5 4 2 2 1 3 1 5 5 3 3 2 | |
4 2 1 3 5 0 0 4 3 5 6 3 |
OlderNewer