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; | |
typedef long long ll; | |
typedef __int128_t LL; | |
typedef vector<int> vi; | |
typedef vector<vector<int>> vvi; | |
#define rep(var,n) for(int var=0;var<(n);++var) | |
#define found(s,e) ((s).find(e)!=(s).end()) |
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> | |
#include <atcoder/all> | |
using namespace std; | |
typedef vector<int> vi; | |
#define pb push_back | |
#define rep(var,n) for(int var=0;var<(n);++var) | |
#define ALL(c) (c).begin(),(c).end() | |
int mp[256]; |
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; | |
typedef vector<int> vi; | |
#define rep(var,n) for(int var=0;var<(n);++var) | |
#define IN(x,a,b) ((a)<=(x)&&(x)<=(b)) | |
double phi = (1.0 + sqrt(5)) * 0.5, w = 1.0 / (1.0 + phi); | |
inline double calc_u(int d) { return round(d * w); } |
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; | |
typedef long long ll; | |
typedef vector<int> vi; | |
#define rep(var,n) for(int var=0;var<(n);++var) | |
#define PQ(T) priority_queue<T,vector<T>,greater<T>> | |
ll solve(int N, int M, vi& c, vi& l, vi& r) { | |
using P = tuple<int, int, int>; | |
PQ(P) pq; |
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
#!/usr/bin/env python | |
# | |
# Problem 053 judge tool, by naoya_t | |
# | |
# eg.) | |
# python 053_judge.py ./a.out -- test random 50 cases, with qmax=15 (小課題4; default) | |
# python 053_judge.py -q 2 ./a.out -- test random 50 cases, with qmax=40 (小課題2) | |
# python 053_judge.py -n 1500 -k 1 -q 3 ./a.out -- test a particular case, with qmax=22 (小課題3) | |
# python 053_judge.py -a -q 4 ./a.out -- test all cases, with qmax=15 (小課題4) | |
# |
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
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
# | |
# add executable files to .gitignore in each directory (create if not exists) | |
# | |
from __future__ import print_function | |
import os | |
import re | |
import click | |
import six |
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
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
import sys | |
import os | |
import re | |
import time | |
import tempfile | |
import click | |
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
0) you may extend your stay in tokyo . </s> | |
生成文: 東京 に 滞在 し て も い い で す よ 。 | |
正解文: 東京 滞在 を 延ば し て も い い で す よ 。 | |
1) i study at school . </s> | |
生成文: 私 は 学校 で 勉強 し ま す 。 | |
正解文: 私 は 学校 で 勉強 する 。 | |
2) i always brush my coat when i come home . </s> | |
生成文: いつ 帰 っ て い たら いつ も コート を し ま す 。 | |
正解文: 私 は 帰宅 する と いつ も コート に ブラシ を かけ る 。 | |
3) your mother has made you what you are . </s> |
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
# -*- encoding: utf-8 -*- | |
""" | |
stopwatch.py | |
by naoya_t | |
``` | |
from stopwatch import stopwatch | |
import time |
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 sys | |
import csv | |
import click | |
from field_converter import FieldConverter | |
class CSV_Iterator: | |
def __init__(self, path, skip_header=False, with_progress_bar=False, | |
field_converter=None): | |
self.path = path | |
self.with_progress_bar = with_progress_bar |
NewerOlder