4天
北京时间周五20点到周二的20点
选4小时
USACO 比赛中就可以提交
提交错误没有惩罚
freopen("c.in", "r", stdin);
freopen("c.out", "w", stdout);
ABCDABC
ABCD
BCDA
CDAB
DABC
ABC
BCD
CDA
DAB
ABC
若干个 int / string 去重
C++
std::set
sort unique
Java
HashSet
sort
C++ pair
sort 尤其是 class 自定义的排序 Comparable Comparator
TreeMap
TreeSet
字典序
abc
abd
ab
abc
1 1 2 2
1 2 1 2
1 2 2 1
2 1 1 2
2 1 2 1
2 2 1 1
int 4个字节
6400万个int = 256MB
n / 8 * 15 + ..
if (n % 8 == 0)
{
n / 8 * 15 - 1
}
if (n % 8 == 1)
{
n / 8 * 15 + 1
}
if (n % 8 == 2)
{
n / 8 * 15 + 2
}
....
a = {-1, 1, 2, 4, 7, 8, 11, 13};
n / 8 * 15 + a[n % 8]
染成不同的块 2类做法
ArrayList
for (int i: a)
{
}
import sys
sys.stdin = open('word.in', 'r')
sys.stdout = open('word.out', 'w')
n, m = map(int, input().split())
l = 0
for s in input().split():
# print(l, s, len(s))
if l + len(s) > m:
print()
l = 0
if l > 0:
print(' ', end='')
print(s, end='')
l += len(s)
print()
P2161 [SHOI2009]会场预约
P1059 明明的随机数
P1503 鬼子进村
P2061 [USACO07OPEN]City Horizon S
P2073 送花
P2141 珠心算测验
P2234 [HNOI2002]营业额统计
P4404 [JSOI2010]缓存交换
P1125 笨小猴
P2814 家谱