This file contains hidden or 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
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
This file contains hidden or 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; | |
int TYPE = 1; // 1:continue忘れ, 2:最大ヒープ, 3:最大ヒープ2, 4:負辺 | |
int MAX_N = 2e5; // 頂点数の最大値 | |
int MAX_M = 2e5; // 辺数の最大値 | |
int MIN_C = 1; // 辺のコストの最小値 | |
int MAX_C = 1e9; // 辺のコストの最大値 | |
bool DIRECTED = false; // 有向かどうか | |
bool V1_TO_Vn = false; // s=1, t=n とするかどうか |
This file contains hidden or 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
https://mao.snuke.org/tasks/58 |
This file contains hidden or 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
bb:ba |
This file contains hidden or 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
....#...#...#...#...#...#...#...#...#...#...... | |
.##.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.####. | |
..#...#...#...#...#...#...#...#...#...#...#.SS. | |
#BB#########################################SS# | |
PBB..#.....#.....#.....#.....#.....#.....#..... | |
.....#.#......#..#.#......#..#.#......#..#.#... | |
.#...#...........#...........#...........#..... | |
.....#.....#.....#.....#.....#.....#.....#..... | |
##..###..#####..###..#####..###..#####..###..## | |
.....#.....#.....#.....#.....#.....#.....#..... |
This file contains hidden or 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
#!/usr/bin/env python3 | |
""" | |
辺をランダムに取得し、点数を計算するサンプルプログラムです。 | |
実行には python3 環境が必要です。 | |
TOKEN 変数を書き換えて実行してください。 | |
""" | |
import os | |
import random |
This file contains hidden or 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> | |
#define fi first | |
#define se second | |
#define rep(i,n) for(int i = 0; i < (n); ++i) | |
#define rrep(i,n) for(int i = 1; i <= (n); ++i) | |
#define drep(i,n) for(int i = (n)-1; i >= 0; --i) | |
#define srep(i,s,t) for (int i = s; i < t; ++i) | |
#define rng(a) a.begin(),a.end() | |
#define rrng(a) a.rbegin(),a.rend() | |
#define maxs(x,y) (x = max(x,y)) |
This file contains hidden or 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 optuna | |
import random | |
n = 5 | |
T = 1000 | |
param_bank = [[1/(n-i) for i in range(n-1)]] | |
def objective(trial): | |
param = [] | |
for i in range(n-1): |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
import cv2 | |
import numpy as np | |
def fix(name): | |
src = cv2.imread(name) | |
h,w = src.shape[:2] | |
r = min(h,w)/2 - 1 | |
center = np.array([w/2,h/2]) |
This file contains hidden or 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 twitter # pip install python-twitter | |
from PIL import Image # pip install pillow | |
import datetime, calendar | |
icon_path = 'icon.jpg' | |
save_path = 'tmp.jpg' | |
api = twitter.Api( | |
consumer_key='', | |
consumer_secret='', | |
access_token_key='', |
NewerOlder