Skip to content

Instantly share code, notes, and snippets.

signed main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
int n;
cin >> n;
vi c(3);
rep(i, n) {
int a;
cin >> a;
signed main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
int T, N;
cin >> T >> N;
vi s(N), t(N);
rep(i, N) cin >> s[i] >> t[i];
// スタート位置についてしゃくとり
enum { KOUSAKA, SONODA, MINAMI };
// A: KOUSAKA & SONODA
// B: KOUSAKA & MINAMI
// C: SONODA & MINAMI
// who_askedが何枚のカードを持っているか?
int numCard(int A, int B, int C, int who_joker, int who_asked) {
switch (who_asked) {
case KOUSAKA: {
struct edge { int to, cap, rev; };
using Graph = vector<vector<edge>>;
const int inf = 1e9;
const int MAX_V = 110;
int level[MAX_V];
int iter[MAX_V];
bool reachable[MAX_V]; // 残余グラフにおいて、Sから到達可能か
void add_edge(Graph& G, int from, int to, int cap) {
typedef complex<double> P;
typedef vector<P> G;
#define here(g, i) g[i]
#define next(g, i) g[(i + 1) % g.size()]
#define prev(g, i) g[(i - 1 + g.size()) % g.size()]
const double EPS = 1e-10;
const double INF = 1e12;
// 左、下、右、上
const int dx[4] = {-1, 0, 1, 0};
signed main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
int N, M, A, B;
cin >> N >> M >> A >> B;
vi D(N);
rep(i, N) cin >> D[i];
int i;
signed main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
int A, B, N;
cin >> A >> B >> N;
int ans = inf;
rep2(a, 1, N + 1) {
rep2(b, 1, N + 1) {
#define dame cout << "NO" << endl; return 0
struct edge { int to, cap, rev; };
const int MAX_V = 110;
vector<edge> G[MAX_V];
int level[MAX_V];
int iter[MAX_V];
void add_edge(int from, int to, int cap) {
typedef vector<vector<int>> Graph;
typedef pair<int, int> Edge; // (a < b: undirected)
class BICC {
private:
const int n;
public:
Graph G;
vi depth;
signed main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
int N, M;
cin >> N >> M;
int ans = 0;
rep(i, N) {
cout << "lst " << i << endl;
int k;