上一页 1 ··· 46 47 48 49 50 51 52 53 54 ··· 63 下一页
摘要: Ujan has been lazy lately, but now has decided to bring his yard to good shape. First, he decided to paint the path from his house to the gate. The pa 阅读全文
posted @ 2019-11-10 11:26 晴屿 阅读(250) 评论(0) 推荐(0)
摘要: This problem is different from the easy version. In this version Ujan makes at most 2n2n swaps. In addition, k≤1000,n≤50k≤1000,n≤50 and it is necessar 阅读全文
posted @ 2019-11-10 11:25 晴屿 阅读(146) 评论(0) 推荐(0)
摘要: This problem is different from the hard version. In this version Ujan makes exactly one exchange. You can hack this problem only if you solve both pro 阅读全文
posted @ 2019-11-10 11:24 晴屿 阅读(255) 评论(0) 推荐(0)
摘要: Ujan decided to make a new wooden roof for the house. He has nn rectangular planks numbered from 11 to nn. The ii-th plank has size ai×1ai×1 (that is, 阅读全文
posted @ 2019-11-10 11:24 晴屿 阅读(186) 评论(0) 推荐(0)
摘要: vector, 变长数组,倍增的思想 size() 返回元素个数 empty() 返回是否为空 clear() 清空 front()/back() push_back()/pop_back() begin()/end() [] 支持比较运算,按字典序 pair<int, int> first, 第一 阅读全文
posted @ 2019-11-10 01:08 晴屿 阅读(222) 评论(0) 推荐(1)
摘要: //快速判断两次字符串是不是相等 #include<bits/stdc++.h> using namespace std ; typedef unsigned long long ULL; const int N=100010,P=131;//经验值 13331 这两个出错情况最少 int n,m; 阅读全文
posted @ 2019-11-10 01:03 晴屿 阅读(193) 评论(0) 推荐(0)
摘要: 拉链法 #include<cstring> #include<iostream> using namespace std ; const int N=100003; int h[N],e[N],ne[N],idx; void insert(int x) { int k=(x%N+N)%N;//哈希函 阅读全文
posted @ 2019-11-10 01:01 晴屿 阅读(169) 评论(0) 推荐(0)
摘要: 笔记.md 9/16/2019 %%%xxh 题目背景 小A是一名新入ACM协会的萌新,众所周知acm的训练日常就是水群膜大佬于是小A也加入了%群巨的行列中 输入格式 每行(不超过100行)包含一个被':'分隔开的字符串S(|S|<=100,)代表了一个人的QQid和他所说的话 输出格式 对于每个人 阅读全文
posted @ 2019-11-07 23:39 晴屿 阅读(174) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; const int N = 50010; int n, m; int p[N], d[N]; //p是baba,d是距离 int find(int x) { if (p[x] != x) {//如果x不是树根 int 阅读全文
posted @ 2019-11-07 22:51 晴屿 阅读(171) 评论(0) 推荐(0)
摘要: //先转换成二进制,然后从从高位开始异或 #include <iostream> #include <algorithm> using namespace std; const int N = 100010, M = 3000000; int n; int a[N], son[M][2], idx; 阅读全文
posted @ 2019-11-07 22:50 晴屿 阅读(150) 评论(0) 推荐(0)
上一页 1 ··· 46 47 48 49 50 51 52 53 54 ··· 63 下一页