【刷题】AtCoder Regular Contest 002
A.うるう年题意:判断闰年做法:。。#include<bits/stdc++.h>#define ui unsigned int#define ll long long#define db double#define ld long double#define ull unsigned ...
AtCoder Regular Contest 094 (ARC094) CDE题解
原文链接http://www.cnblogs.com/zhouzhendong/p/8735114.html$AtCoder\ Regular\ Contest\ 094(ARC094)\ CDE$题解本次$ARC$可谓是手速场。当时由于博主实在zz导致滚粗,rk89.下面是题解。总结了一下,三道结...
ACM ICPC 2017 Warmup Contest 9 L
L. Sticky SituationWhile on summer camp, you are playing a game of hide-and-seek in the forest. You need to designate a “safe zone”, where, if the pla...
LeetCode contest-95[876,877,????878]
876. Middle of the Linked Listfirst submission# Definition for singly-linked list.# class ListNode:# def __init__(self, x):# self.val = x#...
Gym 102028C - Supreme Command - [思维题][2018-2019 ACM-ICPC Asia Jiaozuo Regional Contest Problem C]
题目链接:https://codeforces.com/gym/102028/problem/CLewis likes playing chess. Now he has n rooks on the chessboard with $n$ rows and $n$ columns. All row...
2016-2017 ACM-ICPC, NEERC, Southern Subregional Contest (Online Mirror) in codeforces(codeforces730)
A.Toda 2思路:可以有二分来得到最后的数值,然后每次排序去掉最大的两个,或者3个(奇数时)。 /************************************************ *Author* : Ray(siludose) *Created Time* ...
AtCoder Grand Contest 004
AtCoder Grand Contest 004A - Divide a Cuboid翻译给定一个\(A*B*C\)的立方体,现在要把它分成两个立方体,求出他们的最小体积差。题解如果有一条边是偶数显然可以均分,否分沿着最长边隔开。#include<iostream>using name...
(poj 3660) Cow Contest (floyd算法+传递闭包)
题目链接:http://poj.org/problem?id=3660DescriptionN ( ≤ N ≤ ) cows, conveniently numbered ..N, are participating in a programming contest. As we all know,...
http://codeforces.com/contest/555/problem/B
比赛时虽然贪了心,不过后面没想到怎么处理和set的排序方法忘了- -,其实是和优先队列的仿函数一样的。。。比赛后用set pair过了。。。#include <bits/stdc++.h>using namespace std;#define ll long longconst int ...
【推导】The 16th UESTC Programming Contest Preliminary L - Foxtrot
题意:有n瓶药剂,其中只有一瓶药剂有毒。让你用最少的小白鼠试出哪瓶有毒。你只有一次给任意只小白鼠各喂食任意种类药剂的机会。m只老鼠就能对应2^m种“生死状态”的组合,给每种状态分配一个种类的药剂,然后给每只老鼠喂食“如果它在这种药剂对应的生死状态下死去”的所有药剂,就可以根据发生的死亡情况,分辨出哪...
http://codeforces.com/contest/834
A. The Useless Toytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputWalking through the streets of ...
HDU 4939 Stupid Tower Defense (2014 Multi-University Training Contest 7)
思路:首先红色肯定要放在最后面。前面蓝色和绿色dp求解。dp[i][j] 表示前面(i+j) 个 有 i 个蓝色塔 j个绿色塔 能造成最大伤害。//==========================================================================...
ZOJ 3962 E.Seven Segment Display / The 14th Zhejiang Provincial Collegiate Programming Contest Sponsored by TuSimple E.数位dp
Seven Segment DisplayTime Limit: 1 Second Memory Limit: 65536 KBA seven segment display, or seven segment indicator, is a form of electronic disp...
The Ninth Hunan Collegiate Programming Contest (2013) Problem I
Problem IInteresting CalculatorThere is an interesting calculator. It has 3 rows of button.Row 1: button 0, 1, 2, 3, ..., 9. Pressing each button appe...
训练报告 (2014-2015) 2014, Samara SAU ACM ICPC Quarterfinal Qualification Contest
SolvedAGym 100488AYet Another Goat in the Garden BGym 100488BImpossible to GuessSolvedCGym 100488CLost TempleSolvedDGym 100488DToy SoldiersSolvedEGym ...
HDU4888 Redraw Beautiful Drawings(2014 Multi-University Training Contest 3)
Redraw Beautiful DrawingsTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionAlice and Bob are playi...
HDU 6033 - Add More Zero | 2017 Multi-University Training Contest 1
/*HDU 6033 - Add More Zero [ 简单公式 ] | 2017 Multi-University Training Contest 1题意:问 2^n-1 有几位分析:位数直接 log10 ,减一可忽略*/#include <bits/stdc++.h>int
AtCoder Regular Contest 094 D Worst Case
Worst Case思路:使 a <= b当 a == b 时 或者 a == b - 1 时,答案显然为 2 * (a - 1)否则找到最大的 c ,使得 c * c < a * b如果 c * (c + 1) >= a * b ,那么可以构造 c - 1 + c 个 数对 ,减...
Tenka1 Programmer Contest 2019
C:即要使前一部分为白色后一部分为黑色,枚举分割点前缀和计算答案取min即可。#include<bits/stdc++.h>using namespace std;#define ll long long#define N 200010char getc(){char c=getchar...
POJ 3660 Cow Contest (闭包传递)
Cow ContestTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7690 Accepted: 4288DescriptionN (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, a...