Skip to content

Instantly share code, notes, and snippets.

View zenito9970's full-sized avatar

Junnosuke Murakami zenito9970

View GitHub Profile
#!/bin/bash
set -e
printf "sudo password: "
read -s password
echo "$password" | sudo -S apt update
echo "$password" | sudo -S apt install -y \
apt-transport-https \
ca-certificates \
@zenito9970
zenito9970 / cpp.json
Last active June 3, 2019 21:37
VSCodeのユーザスニペット(C++)
{
/*
// Place your snippets for C++ here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
@zenito9970
zenito9970 / vecin.cpp
Last active July 5, 2016 06:27
cin/coutへのvectorの入出力
#include <bits/stdc++.h>
using namespace std;
template<typename T>
ostream& operator << (ostream& s, const vector<T>& v){
int len = v.size();
for (int i = 0; i < len; ++i){
s << v[i]; if (i < len - 1) s << " ";
}
return s;
#!/usr/bin/bash
for size in "1K" "10K" "100K" "1M" "2M"
do
echo "seed ${seed}: start."
for i in 1 2 3 4 5
do
 echo "size ${size}: start."
 for seed in 7 127 199
do
import std.stdio;
import std.array;
import std.string;
import std.conv;
class iostream {
string[] s = new string[0];
uint i = 0;
string getline() {
return chomp(readln());
class iostream:
def __init__(self):
self.s = []
self.i = 0
def next(self, T=str):
if(self.i < len(self.s)):
ret = self.s[self.i]
self.i += 1
return T(ret)
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Empty Template</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
@zenito9970
zenito9970 / template.cpp
Last active December 30, 2017 03:07
競プロ用C++コードテンプレート
#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) FOR(i,0,n)
#define repr(i,n) for(int i=(n)-1;0<=i;--i)
#define each(e,v) for(auto&& e:(v))
#define all(v) begin(v),end(v)
#define dump(x) cerr<<#x<<": "<<(x)<<endl
using namespace std;
using vint = vector<int>;
using ll = long long;