有史以来打得最差的一次kickstart竟然发生在winter camp出结果前的最后一次ks = = 感觉自己的winter camp要凉了 究其原因,无非自己太眼高手低,好好做B, C的小数据,也不至于最后才AC了第一题吧 B题,我花了两个小时也没AC = =,我的做法和题解大数据的第一种类似. 我们可以发现,每个点只由两个diagonal决定,然后每个diagonal至多做一次,做两次相当于白做嘛. 然后我们发现如果先讨论最长正对角线是否取,也就是从(0,0)到 (n-1,n-1),可以直…
这是现场完整做出来的唯一一道题Orz..而且还调了很久的bug.还是太弱了. Problem When you travel, you like to spend time sightseeing in as many cities as possible, but sometimes you might not be able to because you need to catch the bus to the next city. To maximize your travel enjoy…
打了ks好久都没有更新 诶,自己的粗心真的是没救了,A题大数据都能错 A #include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cstring> #include <vector> #include <list> #include <queue> #…
题目链接:https://code.google.com/codejam/contest/3324486/dashboard#s=p2 题目: 思路: 代码实现如下: #include <set> #include <map> #include <deque> #include <queue> #include <stack> #include <cmath> #include <ctime> #include <b…
Google Kick Start Round G 2019 Book Reading 暴力,没啥好说的 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn=1e5+5; int n,m,q,p[maxn],r[maxn]; int cnt[maxn]; int main() { int T,Case=1; scanf("%d",&T); while(T-…
P4751 H’s problem(h)  时间: 1000ms / 空间: 655360KiB / Java类名: Main 背景 冬令营入学测试 描述 小H是一个喜欢逛街的女孩子,但是由于上了大学,DDL越来越多了,她不能一直都处于逛街的状态.为了让自己能够更加沉迷于学习,她规定一次逛街只逛T个单位的时间. 小H从1号店出发,从1号店走到第i号店需要花费ai的时间,这些店形成了一条直线,也就是说小H从第i号店走到第i+1号店需要花费的时间为a{i+1}-ai.若小H选择了第i号店并且进去逛,…
第一题: n个人,每个人有一个对应的技能值s,现在要从n个人中选出p个人,使得他们的技能值相同. 显然,如果存在p个人的技能值是相同的,输出0就可以了.如果不存在,就要找出p个人,对他们进行训练,治他们的技能值相同. 训练一个小时,技能值增加1,只有一个教练,也就是只能同时训练一个 人.找出最佳的p个人的方案,输出最小的训练时间. AC的代码: #include <stdio.h> #include <stdlib.h> #include <algorithm> usi…
设共有 $N = \sum_{i=1}^{9} A_i$ 个数字.先把 $N$ 个数字任意分成两组 $A$ 和 $B$,$A$ 中有 $N_A = \floor{N/2}$ 个数字,$B$ 中有 $N_B=\ceil{N/2}$ 个数字.将 $A$ 中数字之和记作 $S_A$,$B$ 中数字之和记作 $S_B$.若 $(S_A - S_B) \bmod 11 \ne 0$,再进行调整. 考虑通过交换 $A$.$B$ 中的数字来改变 $S_A - S_B$ 的值.若有解一定能通过若干次交换操作使得…
C. Rectangle Puzzle Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/281/problem/C Description You are given two rectangles on a plane. The centers of both rectangles are located in the origin of coordinates (meaning the cen…
B. sland Puzzle 题目连接: http://www.codeforces.com/contest/635/problem/B Description A remote island chain contains n islands, labeled 1 through n. Bidirectional bridges connect the islands to form a simple cycle - a bridge connects islands 1 and 2, isl…