排序:
默认
按更新时间
按访问量

Maratona de Programa¸c˜ao da SBC – ACM ICPC – 2013 F Triangles

题意是一个圆上,给出n个点之间的距离,最后的距离是最后一个点跟第一个点之间的距离,问能组成多少个等边三角形。 容易想到圆的周长不能整除3的话一定无法构成等边三角形,所以先特判这种情况。然后可以发现,每条线段必定是n个连续的点,这样可以找到2*n个点,判断从当前点开始,能否在n个点之内,正...

2018-05-03 15:39:19

阅读数:15

评论数:0

“浪潮杯”山东省第6届acm省赛 SDUT 3257 Cube Number (分解质因数)

Cube Number  2000 ms       65536 KiB Accepted/Submissions: 3/38 (7.89%) Submit Status  Statistics Origin Description In mathema...

2018-05-03 13:23:25

阅读数:20

评论数:0

Codeforces gym 101612 Consonant Fencity (状态压缩+暴力)

Consonant Fencity 时间限制: 3 Sec 内存限制: 512 MB 提交: 100 解决: 15 [提交][状态][讨论版][命题人:admin] 题目描述 There are two kinds of sounds in spoken languages: vowels a...

2018-04-28 15:46:21

阅读数:35

评论数:0

Polyline Simplification (计算几何)

Polyline Simplification 时间限制: 5 Sec  内存限制: 128 MB 提交: 35  解决: 11 [提交][状态][讨论版][命题人:admin] 题目描述 Mapping applications often represent the boun...

2018-04-25 21:05:13

阅读数:22

评论数:0

Colorful Slimes(DP)

Colorful Slimes 时间限制: 2 Sec 内存限制: 256 MB 提交: 252 解决: 44 [提交][状态][讨论版][命题人:admin] 题目描述 Snuke lives in another world, where slimes are real creatures...

2018-04-11 21:29:43

阅读数:41

评论数:0

2017 ICPC 南宁 M题 The Maximum Unreachable Node Set (二分图匹配)

The Maximum Unreachable Node Set时间限制: 20 Sec  内存限制: 128 MB提交: 51  解决: 8[提交][状态][讨论版][命题人:admin]题目描述In this problem, we would like to talk about unrea...

2018-04-07 11:30:11

阅读数:92

评论数:0

Shorten Diameter (dfs遍历)

Shorten Diameter 时间限制: 2 Sec 内存限制: 256 MB 提交: 34 解决: 10 [提交][状态][讨论版][命题人:admin] 题目描述 Given an undirected tree, let the distance between vertices u...

2018-04-04 20:49:25

阅读数:31

评论数:0

April Fools Contest 2018

哇,第二天补题,发现除了第一个什么都不会,这么可怕的题意吗? A. Quirky Quantifiers time limit per test 2 seconds memory limit per test 64 megabytes ...

2018-04-02 17:35:37

阅读数:38

评论数:0

Snow Boots I

Snow Boots I时间限制: 1 Sec  内存限制: 128 MB提交: 6  解决: 3[提交][状态][讨论版][命题人:admin]题目描述It's winter on the farm, and that means snow! There are N tiles on the p...

2018-03-30 16:59:02

阅读数:46

评论数:0

石子游戏(贪心+思维)

石子游戏时间限制: 1 Sec  内存限制: 128 MB提交: 69  解决: 16[提交][状态][讨论版][命题人:admin]题目描述在Bob学会怎样玩Nim Game之后,他打算尝试另一款看起来更为简单的石子游戏这个游戏是这样子玩的:一共有一个玩家,且一开始有N堆石头,第i堆石头有ai个...

2018-03-22 08:23:49

阅读数:128

评论数:0

中石油 1380 森林扩张

森林扩张 时间限制: 1 Sec  内存限制: 256 MB 提交: 124  解决: 22 [提交][状态][讨论版] 题目描述 小L走进了一片森林。这片森林由n个点和m条边组成,每个点都有一个大小ai。小L不小心在森林里迷路了,于是TA决定给森林添上几条边,把整片森林连成一棵树,...

2018-03-02 14:45:12

阅读数:82

评论数:0

中石油 5797 道路重建

道路重建 时间限制: 1 Sec  内存限制: 128 MB 提交: 53  解决: 17 [提交][状态][讨论版] 题目描述 小L的家乡最近遭遇了一场洪水,城市变得面目全非,道路也都被冲毁了。生活还要继续,于是市政府决定重建城市中的道路。 在洪水到来前,城市中共有n个区域和...

2018-03-02 14:28:14

阅读数:62

评论数:0

中石油 5794 划分

划分 时间限制: 1 Sec  内存限制: 128 MB 提交: 17  解决: 5 [提交][状态][讨论版] 题目描述 给出n个不超过m的非负整数,将数划分成两个集合,记为1号集合和2号集合。x1为1号集合中所有数的异或和,x2为2号集合中所有数的异或和。在最大化x1+x2的...

2018-02-28 19:54:04

阅读数:112

评论数:0

2018 山东冬令营 中石油 5793 飞扬的小鸟II

飞扬的小鸟II 时间限制: 1 Sec  内存限制: 128 MB 提交: 59  解决: 8 [提交][状态][讨论版] 题目描述 有n棵大树从左到右排成一排,编号为1到n,每棵有高度hi与疲劳值wi。 有一只鸟儿现在站在最左侧的1号大树上,它想飞到第n棵树上去,但它不 能连续...

2018-02-27 20:45:58

阅读数:109

评论数:0

Codeforces Round #464 (Div. 2) A-D题解

A. Love Triangle time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output...

2018-02-27 10:32:16

阅读数:107

评论数:0

实现简单的对拍

自带WA自动机属性的ACMer,经常会遇到无限提交然后就是wa的情况,但是就是不知道自己到底哪里出错了。除了cf之类的网站能得到部分数据以外,很难有网站会告诉你数据。所以可以暴力写一发或者找一个正确的cpp文件,产生几组随机数,简单跑几次,,如果出现两者不一样的情况,再做分析。对拍就完成了这么一个...

2018-02-02 15:28:51

阅读数:101

评论数:1

线段树模板

这个月要写4篇博客,工作量太大了,今天最后一天了,贴一下这几天整理过的线段树的模板吧。 int sum[maxn*4],minn[maxn*4],maxx[maxn*4],vis[maxn*4],Map[maxn],n; //sum储存和,minn最小值,maxx最大值,vis作为求最值的标记数组...

2018-01-31 15:40:23

阅读数:160

评论数:0

Codeforces Round #361 (Div. 2) D (树状数组+二分)

D. Friends and Subsequences time limit per test 2 seconds memory limit per test 512 megabytes input standard input output sta...

2018-01-29 10:59:57

阅读数:99

评论数:0

Codeforces Round #365 (Div. 2) D (树状数组)

D. Mishka and Interesting sum time limit per test 3.5 seconds memory limit per test 256 megabytes input standard input output ...

2018-01-27 10:19:12

阅读数:114

评论数:0

树状数组模板(max,min,区间和,区间修改,单点查询)

好久不写博客,为了保证持之以恒,就写写最近搞的模板吧,感觉有时候模板比思想实用的多。 树状数组是个神奇的东西,能在log2(n)的时间内完成相应操作,所以我觉得有必要整理一下,但又觉得书面性的东西太多,所以就直接放模板了,有机会写点总结。 首先,创建树状数组。 数组C是储存树状数组的空间...

2018-01-24 19:54:35

阅读数:182

评论数:0

两个循环单链表实现插入操作

随机产生两组两位整数,建立两个带有头结点的循环单链表,并设尾指针为RL1和RL2,将第二个链表插入到第一个链表的第i个结点前。   函数为:    ① void createList(LinkList&rear)                   ② void insertList(...

2017-12-20 21:50:18

阅读数:193

评论数:0

Codeforces Round #452 (Div. 2) A-C题解

哎............ A. Splitting in Teams time limit per test 1 second memory limit per test 256 megabytes input standard ...

2017-12-17 20:06:27

阅读数:475

评论数:1

Codeforces Round #451 (Div. 2) A-C题解

伤心总是难免的,明明是送分场,愣是掉了61分。 A. Rounding time limit per test 1 second memory limit per test 256 megabytes input standard ...

2017-12-17 13:24:36

阅读数:416

评论数:0

Codeforces Round #450 (Div. 2) A-C题解

A. Find Extra One time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You have n distinct points...

2017-12-14 21:37:01

阅读数:460

评论数:0

Codeforces Round #449 (Div. 2) A-C题解

A. Scarborough Fair time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Are you going to Scarbo...

2017-12-06 14:36:32

阅读数:286

评论数:0

Codeforces Round #422 (Div. 2) C Hacker, pack your bags! (二分orDP)

Hacker, pack your bags! time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output It's well known tha...

2017-12-03 22:02:04

阅读数:229

评论数:0

Codeforce 839C Journey (dfs+概率)

C. Journey time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output There are n cities and n - 1 roa...

2017-11-25 17:25:30

阅读数:581

评论数:0

Educational Codeforces Round 33 (Rated for Div. 2) A-C题解

A. Chess For Three time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Alex, Bob and Carl will s...

2017-11-25 10:02:50

阅读数:484

评论数:0

Codeforces Round #447 (Div. 2) A-C题解

A. QAQ time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output "QAQ" is a word to denote a...

2017-11-20 16:52:27

阅读数:600

评论数:0

FZU_2216 The Longest Straight (二分)

Problem 2216 The Longest Straight Accept: 441    Submit: 1380 Time Limit: 1000 mSec    Memory Limit : 32768 KB Problem Description ZB i...

2017-11-19 17:22:57

阅读数:367

评论数:0

Codeforces Round #446 (Div. 2) A-C 题解

A. Greed time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Jafar has n cans of cola. Each can...

2017-11-18 13:53:50

阅读数:492

评论数:2

Codeforces Round #444 (Div. 2) A-C 题解

A. Div. 64 time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Top-model Izabella participates i...

2017-11-17 15:19:33

阅读数:544

评论数:0

Codeforces Round #443 (Div. 2) A-C 题解

A. Borya's Diagnosis time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output It seems that Borya is...

2017-11-16 21:37:54

阅读数:398

评论数:0

洛谷P3031 中石油2557 Above the Median (数组模拟or树状数组求逆序数)

Farmer John has lined up his N (1 <= N <= 100,000) cows in a row to measure their heights; cow i has height H_i (1 <= H_i <= 1,000,000,00...

2017-11-02 15:22:02

阅读数:422

评论数:0

HDU 5927 Auxiliary Set (DFS+模拟)

Auxiliary Set Time Limit: 9000/4500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1934 Accepted Submission(s...

2017-10-28 17:14:38

阅读数:411

评论数:0

HDU 3923 Invoker (polya定理)

Invoker                                                                    Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 122768/62768 K ...

2017-10-27 20:48:51

阅读数:551

评论数:0

动态规划小结

准备青岛的征途,拿着部分DP题搞了一波,收获还是很多,部分常见的DP并没有刷题,偏重于记忆化搜索,状态压缩,区间DP,博弈+DP,树形DP。还是做题少,做什么都力不从心,好多题不看题解根本就不会做,看了题解也要研究半天,没办法嘛,人丑就要多读书呗。是时候来总结一下,数数最近是否还有收获。 ...

2017-10-26 20:56:35

阅读数:417

评论数:0

HDU 1054 Strategic Game (树形DP)

Strategic Game Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 8641 Accepted Submissio...

2017-10-26 16:13:16

阅读数:445

评论数:0

HDU 4778 Gems Fight! (博弈+状压DP)

Problem Description   Alice and Bob are playing "Gems Fight!":   There are Gems of G different colors , packed in B bags. Each bag has ...

2017-10-25 12:24:04

阅读数:415

评论数:0

UVA 10891 - Game of Sum (博弈+区间DP+记忆化搜索)

Root     10891 - Game of Sum Time limit: 3.000 seconds This is a two player game. Initially there are n integer numbers in an ar...

2017-10-24 13:02:33

阅读数:330

评论数:0

UVA 10651 - Pebble Solitair (状压+记忆化搜索)

Pebble solitaire is an interesting game. This is a game where you are given a board with an arrangement of small caviti

2017-10-22 20:27:50

阅读数:489

评论数:0

BZOJ 1009: [HNOI2008]GT考试(DP+KMP失配+矩阵快速幂)

1009: [HNOI2008]GT考试 Time Limit: 1 Sec Memory Limit: 162 MB Submit: 4181 Solved: 2552 [Submit][Status][Discuss] Description   阿申准备报名参加GT考试,准考证号为N...

2017-10-20 16:52:01

阅读数:452

评论数:0

Codeforces Round #440 (Div. 2, based on Technocup 2018 Elimination Round 2) A-C题解

A. Search for Pretty Integers time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given ...

2017-10-17 12:56:21

阅读数:347

评论数:0

Codeforces Round #441 (Div. 2, by Moscow Team Olympiad) A-D题解

A. Trip For Meal time limit per test1 second memory limit per test512 megabytes inputstandard input outputstandard output Winnie-the-Pooh likes honey...

2017-10-17 12:27:11

阅读数:464

评论数:0

最小生成树 Prim、Kruscal算法 (以HDU 1863为例)

畅通工程 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 32680 Accepted Submission(s): 14407...

2017-10-15 14:33:26

阅读数:465

评论数:0

HDU 5115 Dire Wolf (区间DP)

Dire Wolf Time Limit: 5000/5000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others) Total Submission(s): 2761 Accepted Submission(s):...

2017-10-14 18:39:50

阅读数:418

评论数:0

BZOJ 1072 [SCOI2007]排列perm (状态压缩+dp+同余定理)

1072: [SCOI2007]排列perm Time Limit: 10 Sec Memory Limit: 128 MB Submit: 2537 Solved: 1583 [Submit][Status][Discuss] Description   给一个数字串s和正整数d, 统计...

2017-10-09 17:35:57

阅读数:348

评论数:0

Codeforces Round #439 (Div. 2) A-C题解

A. The Artful Expedient time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Rock... Paper! Afte...

2017-10-07 09:50:55

阅读数:969

评论数:0

Codeforces Round #438 by Sberbank and Barcelona Bootcamp (Div. 1 + Div. 2 combined) A-C题解

A. Bark to Unlock time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output As technologies develop, ...

2017-10-05 21:10:08

阅读数:718

评论数:0

USACO Milking Cows (模拟)

Milking Cows Three farmers rise at 5 am each morning and head for the barn to milk three cows. The first farmer begins milking his cow at time 300 (m...

2017-10-05 13:30:10

阅读数:553

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭