乐逍遥xwl

导航

08 2019 档案

Educational Codeforces Round 71 (Rated for Div. 2) D - Number Of Permutations
摘要:原文链接:https://www.cnblogs.com/xwl3109377858/p/11405773.html Educational Codeforces Round 71 (Rated for Div. 2) D - Number Of Permutations You are given 阅读全文

posted @ 2019-08-24 19:33 乐逍遥xwl 阅读(348) 评论(0) 推荐(0)

Educational Codeforces Round 71 (Rated for Div. 2) C - Gas Pipeline
摘要:原文链接:https://www.cnblogs.com/xwl3109377858/p/11404321.html Educational Codeforces Round 71 (Rated for Div. 2) C - Gas Pipeline You are responsible for 阅读全文

posted @ 2019-08-24 13:06 乐逍遥xwl 阅读(335) 评论(0) 推荐(0)

Educational Codeforces Round 71 (Rated for Div. 2) B - Square Filling
摘要:原文链接:https://www.cnblogs.com/xwl3109377858/p/11404261.html Educational Codeforces Round 71 (Rated for Div. 2) B - Square Filling You are given two mat 阅读全文

posted @ 2019-08-24 12:47 乐逍遥xwl 阅读(243) 评论(0) 推荐(0)

Educational Codeforces Round 71 (Rated for Div. 2) A - There Are Two Types Of Burgers
摘要:原文链接:https://www.cnblogs.com/xwl3109377858/p/11404050.html Educational Codeforces Round 71 (Rated for Div. 2) A - There Are Two Types Of Burgers There 阅读全文

posted @ 2019-08-24 11:34 乐逍遥xwl 阅读(365) 评论(0) 推荐(0)

HDU 2544 最短路 (dijkstra+堆优化)
摘要:原文链接:https://www.cnblogs.com/xwl3109377858/p/11403644.html Problem Description 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的 阅读全文

posted @ 2019-08-24 09:50 乐逍遥xwl 阅读(241) 评论(0) 推荐(0)

拓扑排序
摘要:先建图,根据边计算所有顶点的入度,然后扫一遍将入度为0的顶点入队, 同时,该顶点指向的顶点入度减一,在队列中重复此操作, 直到所有点都被分离,如果顶点没有全部分离出来, 那么说明有环,不存在拓扑序,无解,详情见代码。 阅读全文

posted @ 2019-08-22 21:25 乐逍遥xwl 阅读(134) 评论(0) 推荐(0)

POJ 3190 Stall Reservations (优先队列+结构体)
摘要:Stall Reservations Description Oh those picky N (1 <= N <= 50,000) cows! They are so picky that each one will only be milked over some precise time in 阅读全文

posted @ 2019-08-10 10:25 乐逍遥xwl 阅读(170) 评论(0) 推荐(0)

POJ 3264 Balanced Lineup (区间最值问题)
摘要:Balanced Lineup Description For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides 阅读全文

posted @ 2019-08-10 10:02 乐逍遥xwl 阅读(160) 评论(0) 推荐(0)

回文数 (大数运算+进制处理)
摘要:回文数 题目描述 若一个数(首位不为零)从左向右读与从右向左读都一样,我们就将其称之为回文数。 例如:给定一个10进制数56,将56加56(即把56从右向左读),得到121是一个回文数。 又如:对于10进制数87: STEP1:87+78 = 165 STEP2:165+561 = 726 STEP 阅读全文

posted @ 2019-08-10 09:48 乐逍遥xwl 阅读(456) 评论(0) 推荐(0)

单词接龙(dfs + 字符串处理)
摘要:单词接龙 题目描述 单词接龙是一个与我们经常玩的成语接龙相类似的游戏,现在我们已知一组单词,且给定一个开头的字母,要求出以这个字母开头的最长的“龙”(每个单词都最多在“龙”中出现两次),在两个单词相连时,其重合部分合为一部分,例如beast和astonish,如果接成一条龙则变为beastonish 阅读全文

posted @ 2019-08-07 10:49 乐逍遥xwl 阅读(575) 评论(0) 推荐(0)

Codeforces Round #577 (Div. 2) C - Maximum Median
摘要:Codeforces Round #577 (Div. 2) 原文链接:https://www.cnblogs.com/xwl3109377858/p/11306077.html C - Maximum Median You are given an array a of n integers, w 阅读全文

posted @ 2019-08-05 22:36 乐逍遥xwl 阅读(380) 评论(0) 推荐(0)

Codeforces Round #577 (Div. 2) B - Zero Array
摘要:Codeforces Round #577 (Div. 2) B - Zero Array You are given an array a1,a2,…,an. In one operation you can choose two elements ai and aj (i≠j) and decr 阅读全文

posted @ 2019-08-05 22:24 乐逍遥xwl 阅读(517) 评论(0) 推荐(0)

Codeforces Round #577 (Div. 2) A - Important Exam
摘要:Codeforces Round #577 (Div. 2) A - Important Exam A class of students wrote a multiple-choice test. There are n students in the class. The test had m  阅读全文

posted @ 2019-08-05 21:48 乐逍遥xwl 阅读(208) 评论(0) 推荐(0)

Codeforces Round #576 (Div. 2) D - Welfare State
摘要:Codeforces Round #576 (Div. 2) D - Welfare State There is a country with n citizens. The i-th of them initially has ai money. The government strictly 阅读全文

posted @ 2019-08-02 16:03 乐逍遥xwl 阅读(297) 评论(0) 推荐(0)

Codeforces Round #576 (Div. 2) C - MP3
摘要:Codeforces Round #576 (Div. 2) C - MP3 One common way of digitalizing sound is to record sound intensity at particular time moments. For each time mom 阅读全文

posted @ 2019-08-02 12:32 乐逍遥xwl 阅读(235) 评论(0) 推荐(0)

Codeforces Round #576 (Div. 2) B - Water Lily
摘要:Codeforces Round #576 (Div. 2) B - Water Lily While sailing on a boat, Inessa noticed a beautiful water lily flower above the lake's surface. She came 阅读全文

posted @ 2019-08-02 12:18 乐逍遥xwl 阅读(478) 评论(0) 推荐(0)

Codeforces Round #576 (Div. 2) A - City Day
摘要:Codeforces Round #576 (Div. 2) A - City Day For years, the Day of city N was held in the most rainy day of summer. New mayor decided to break this tra 阅读全文

posted @ 2019-08-02 12:16 乐逍遥xwl 阅读(276) 评论(0) 推荐(0)

lowbit运算
摘要:lowbit(n)定义为非负整数n,在二进制表示下“最低位的1及其后面所有的0” 构成的数值。例如 n=10 二进制表示为(1010),则 lowbit (n) = 2 (10),当我们对计算出的 lowbit(n) 进行取log2操作 后,我们可以得到“n的二进制表示下最低位1的位置”,为了 得到 阅读全文

posted @ 2019-08-01 23:33 乐逍遥xwl 阅读(172) 评论(0) 推荐(0)

BZOJ 1218: [HNOI2003]激光炸弹 (二维前缀和)
摘要:1218: [HNOI2003]激光炸弹 Description 一种新型的激光炸弹,可以摧毁一个边长为R的正方形内的所有的目标。现在地图上有n(N<=10000)个目标,用整数Xi,Yi(其值在[0,5000])表示目标在地图上的位置,每个目标都有一个价值。激光炸弹的投放是通过卫星定位的,但其有一 阅读全文

posted @ 2019-08-01 23:24 乐逍遥xwl 阅读(164) 评论(0) 推荐(0)

阶乘之和 (大数加法+大数乘法)
摘要:阶乘之和 题目描述 用高精度计算出S=1!+2!+3!+…+n!(n ≤ 50)其中“!”表示阶乘,例如:5!=5*4*3*2*1。 输入描述: 输入正整数N 输出描述: 输出计算结果S 示例1 输入 3 输出 9 思路:这里直接用两个自己写的大数运算的函数,模拟手写加法和乘法解决。 阅读全文

posted @ 2019-08-01 11:48 乐逍遥xwl 阅读(1078) 评论(0) 推荐(0)