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 <string> | |
#include <algorithm> | |
#include <cmath> | |
using namespace std; | |
using ll = long long; | |
#define rep(i,n) for(int i=0;i<(n);i++) | |
#define out(S) cout<<(S)<<endl; |
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 <map> | |
#include <set> | |
#include <string> | |
#include <algorithm> | |
#include <vector> | |
#include <cmath> | |
#define rep(i, n) for (int i = 0; i < (n); i++) | |
using ll = long long; |
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 <cassert> | |
#include <cmath> | |
#include <iostream> | |
#include <map> | |
#include <set> | |
#include <string> | |
#include <vector> | |
#define rep(i, n) for (int i = 0; i < (n); 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 <bits/stdc++.h> | |
using namespace std; | |
// using ll = long long; | |
const int INF = 1e8; | |
#define all(c) (c).begin(), (c).end() | |
#define rep(i, n) for (int i = 0; i < (int)(n); i++) | |
int dx[4] = {1, 0, -1, 0}; |
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 <bits/stdc++.h> | |
using namespace std; | |
#define all(c) (c).begin(), (c).end() | |
#define rep(i, n) for (int i = 0; i < (int)(n); i++) | |
int dx[4] = {1, 0, -1, 0}; | |
int dy[4] = {0, 1, 0, -1}; |
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
import json | |
from twitter import OAuth, Twitter | |
with open('config.json') as f: | |
param = json.load(f) | |
t = Twitter(auth=OAuth(**param)) | |
screen_name = '5percent_Dora' | |
items = [] | |
max_id = None | |
ids = set() |
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 <stdio.h> | |
#include <stdlib.h> | |
typedef struct { | |
char id[7]; | |
char name[21]; | |
int height; | |
int weight; | |
} Student; |
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
#!/bin/bash | |
set -e | |
# Building LLVM on OSX CMake setup script | |
# | |
# Required: | |
# - clang by Xcode6 or later | |
# - cmake | |
# - ninja | |
# |
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 <tuple> | |
#include <unordered_set> | |
using namespace std; | |
template <class T> | |
inline size_t hash_combine(std::size_t seed, T const& v) { | |
return seed ^ std::hash<T>()(v) + 0x9e3779b9 + (seed << 6) + (seed >> 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 <unordered_set> | |
#include <utility> | |
using namespace std; | |
namespace std { | |
template <typename T, typename S> | |
class hash<pair<T, S>> { | |
public: |