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
➜ magenta-docker-cpu git:(master) ✗ docker-compose build --no-cache | |
[+] Building 490.0s (13/15) | |
=> [internal] load build definition from dockerfile 0.0s | |
=> => transferring dockerfile: 427B 0.0s | |
=> [internal] load .dockerignore 0.0s | |
=> => transferring context: 2B 0.0s | |
=> [internal] load metadata for docker.io/library/python:3.8-buster 1.9s | |
=> [ 1/12] FROM docker.io/library/python:3.8-buster@sha256:e3d93e56949804080b55a57cdc8db47e0c01c1972ca4c1da799407ad460740b1 0.0s | |
=> CACHED [ 2/12] WORKDIR /data |
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
" setting | |
"文字コードをUFT-8に設定 | |
set fenc=utf-8 | |
" バックアップファイルを作らない | |
set nobackup | |
" スワップファイルを作らない | |
set noswapfile | |
" 編集中のファイルが変更されたら自動で読み直す | |
set autoread | |
" バッファが編集中でもその他のファイルを開けるように |
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
extension Sequence { | |
func permutations() -> [[Element]] { | |
func _permutations<T>(of values: [T], indices: Range<Int>, result: inout [[T]]) { | |
if indices.isEmpty { | |
result.append(values) | |
return | |
} | |
var values = values | |
for i in indices { | |
values.swapAt(indices.lowerBound, i) |
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
{ | |
"configurations": [ | |
{ | |
"name": "Mac", | |
"includePath": [ | |
"${workspaceFolder}/**" | |
], | |
"defines": [], | |
"macFrameworkPath": [ | |
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks" |
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
var N: Int | |
var A = [Int](repeating: 0, count: 200009) | |
var C = [Int](repeating: 0, count: 200009) | |
/// A[l], A[l+1], ..., A[r−1] を小さい順に整列する関数 | |
/// | |
/// - Parameters: | |
/// - l: 左端(閉) | |
/// - r: 右端(開) | |
func mergeSort(_ l: Int, _ r: Int) { |
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
function RenameMyFiles ($file) { | |
$ext = $file.Extension | |
$fragments = $file.BaseName.Split(" ") | |
$newName = $fragments[1] + " " + $fragments[0] + $ext | |
Rename-Item $file.Name $newName -Verbose | |
} | |
gci | % { RenameMyFiles $_ } |
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 Foundation | |
func gcd(_ x: Int, _ y: Int) -> Int { | |
guard y != 0 else { return x } | |
return gcd(y, x % y) | |
} | |
struct Pair: Hashable, Equatable { | |
static func ==(lhs: Pair, rhs: Pair) -> Bool { | |
lhs.x == rhs.x && lhs.y == rhs.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
#include <bits/stdc++.h> | |
struct mint { | |
long long int value; | |
mint() : value(0) {} | |
mint(long long int value) : value((value % MOD + MOD) % MOD) {} | |
mint &fix() { |
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 <iostream> | |
#include <vector> | |
#include <chrono> | |
using namespace std; | |
// 扱う値の最大値 | |
const int MAX = 1000000000; | |
int main() { | |
// 素数砂漠の長さの最大値 |
NewerOlder