其他---------思维
Whowell
欢迎自荐或推荐实习/校招(字节)!
加油,加油,朝着自己的梦想!!!!!
展开
-
Codeforces 967 A. Mind the Gap [思维]
A. Mind the Gaptime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThese days Arkady works as an air traffic controller at a large airport. He controls...原创 2018-04-30 17:03:01 · 344 阅读 · 0 评论 -
Message Decoding UVA - 213
题目链接:Message Decoding UVA - 213 题目:有一些串: 0,00,01,10,000,001,010,011,100,101,110,0000,0001,…,1101,1110,00000,…首先是长度为1的串 ,然后是长度为2的串,以此类推,相同长度的后一个串等于前一个串加1,而且不存在全为1的串。首先输入一个编码头 , 比如 ABCD,那么依次对应上面的01串,原创 2018-02-06 21:06:53 · 163 阅读 · 0 评论 -
The Dole Queue UVA - 133
题目: n 个人围城一个环,逆时针编号 1~n,A从 1 开始逆时针数 K 个,B从 n 顺时针数 M 个,被选中的 1 或 2 个人一次领救济金,输出顺序。。思路:用数组模拟,为了避免人走之后数组元素移动,用0表示离开队伍的人。也可以用循环链表实现。。。。。题目链接:The Dole Queue UVA - 133#include#include#include#in原创 2018-02-06 17:39:04 · 181 阅读 · 0 评论 -
Educational Codeforces Round 45 990 E. Post Lamps [ 思维 + 贪心 ]
E. Post Lampstime limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard outputAdilbek's house is located on a street which can be represented as the OX axis. T...原创 2018-06-12 10:31:38 · 719 阅读 · 3 评论 -
Periodic Strings UVA - 455
A character string is said to have period k if it can be formed by concatenating one or more repetitions of another string of length k . For example, the string ” abcabcabcabc ” has period 3, since it原创 2018-02-04 12:49:19 · 115 阅读 · 0 评论 -
Digit Counting UVA - 1225
Trung is bored with his mathematics homeworks. He takes a piece of chalk and starts writing a sequence of consecutive integers starting with 1 to N (1 <N< 10000). After that, he counts the number of t原创 2018-02-04 11:25:52 · 129 阅读 · 0 评论 -
牛客网练习赛15__沃老师学生的成绩
沃老师学生的成绩题目描述 第一次期中考终于结束啦!沃老师是个语文老师,他在评学生的作文成绩时,给每位学生的分数都是一个小于10的非负小数。Amy 8.999999999999999999999999999999999999999990000Bob 8.9999999999999999999999999999999999999999800Cat 8.9999999999999999999999999...原创 2018-04-13 22:14:28 · 215 阅读 · 0 评论 -
Codeforces Round #487 (Div. 2) C. A Mist of Florescence [思维+构造矩阵]
C. A Mist of Florescencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs the boat drifts down the river, a wood full of blossoms shows up on the ...原创 2018-06-12 19:50:14 · 165 阅读 · 0 评论 -
Codeforces Round #487 (Div. 2) A. A Blend of Springtime [思维题]
A. A Blend of Springtimetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputWhen the curtains are opened, a canvas unfolds outside. Kanno marvels at al...原创 2018-06-12 20:00:09 · 186 阅读 · 0 评论 -
Codeforces 987 B. High School: Become Human [思维]
B. High School: Become Humantime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYear 2118. Androids are in mass production for decades now, and they do...原创 2018-05-30 09:04:43 · 532 阅读 · 2 评论 -
2018 ccpc湘潭邀请赛 F -Sorting [思维+排序]
SortingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 415 Accepted Submission(s): 114Problem DescriptionBobo has n tuples (a1,b1,c1),(a2,b2,...原创 2018-06-01 11:29:32 · 740 阅读 · 0 评论 -
2018 ccpc湘潭邀请赛 A. Easy h-index [思维]
Easy h-index Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) ...原创 2018-06-01 11:34:23 · 732 阅读 · 2 评论 -
牛客网暑期ACM多校训练营(第二场)D money [思维题]
D money题意:从1-n一次经过,可以buy或者sell a[i]这样的商品,问交易最少的次数能获得的最大的利润。题解:找最长的1 2 2 3这样的区间,最大利润就是最大的间最小的,这样的交易次数最小。代码:/**2018 nowcoder second D money*...原创 2018-08-22 18:16:11 · 229 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第二场)I car [思维题]
I car题意:一个n*n的方格,在边缘放置car,car 只能以相同的速度从一边走到一边,不能相撞,并且不能走有障碍物的一行题解:脑补一下,就是题解中的,如果n是偶数,那么就是保证每行每列只有一个就是2*n,如果是奇数,那么就是需要注意中间那个一行一列只能放一个,否则会相撞,...原创 2018-08-24 23:22:18 · 183 阅读 · 0 评论 -
“浪潮杯”第九届山东省ACM大学生程序设计竞赛 A - Anagram[思维+字符串]
题目:给两个字符串A,B通过给定的操作,A->B;感觉水题,瞎搞吧。。。代码:#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#define ll long long#define INF 1e9+7;using namespa...原创 2018-08-28 15:39:39 · 271 阅读 · 0 评论 -
“浪潮杯”第九届山东省ACM大学生程序设计竞赛 E - Sequence [最小值次小值滚动]
题目:在一个数列中,假如一个数比在它之前出现的任意一个数大,那么它是一个好数,现在必须删去一个数,使剩余的数好数最多,多个解输出最小值.解题思路:最大最小值记录一下,记录一个数所关联的good数的度,取最小的就可以啦。。。代码:#include<iostream>#include<cstdio>#include<cstring>#incl...原创 2018-08-29 09:30:45 · 382 阅读 · 0 评论 -
A Typical Homework (a.k.a Shi Xiong Bang Bang Mang) UVA - 12412
题目链接:A Typical Homework (a.k.a Shi Xiong Bang Bang Mang) UVA - 12412 思路:自顶而上,先写出框架,再写具体函数。框架:int main(){ while(1) { int choice; mmenu(); scanf("%d", &choice);原创 2018-02-07 19:19:16 · 360 阅读 · 0 评论 -
2018/2/9牛客练习赛12 A-圆圆
题目链接:牛客练习赛12 A-圆圆 题目描述 我们定义一个圆 C 为以原点 (0, 0) 为中心的单位圆(半径为 1 的圆)。给定在 C 圆周上相异的两点 A, B。请问由 A 出发,沿着圆周走到 B,是顺时针走比较近,还是逆时针走比较近呢? C 的圆周上的所有点都可以用 (cos(t), sin(t)) 来表示,其中 t 的物理意义为角度。也就是说,在圆 C 中,给定一角度 t 即可确...原创 2018-02-09 19:49:09 · 208 阅读 · 0 评论 -
Educational Codeforces Round 45 990C. Bracket Sequences Concatenation Problem [思维]
C. Bracket Sequences Concatenation Problemtime limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard outputA bracket sequence is a string containing only chara...原创 2018-06-11 15:51:43 · 350 阅读 · 0 评论 -
Gym 101606A Alien Sunset [贪心+暴力]
题意:题目很简单,就是说现在想找一个最早的时间,所有星球都在晚上,现在已经知道各个星球的自转周期,并且知道他们各自日出日落时间。。。思路:一共100*1850天,那样我直接枚举,找到第一个n个都是夜晚的天就可以了。。代码:#include<bits/stdc++.h>#include<algorithm>#define ll long longusing names...原创 2018-04-30 17:43:34 · 611 阅读 · 0 评论 -
Gym 101606D Deranging Hat [选择排序逆输出]
题意:给定一个字符串,要求把他先以字符串升序排列,在以题目中定义的排序方式排回来,分明是个选择排序嘛。。。代码:#include<bits/stdc++.h>#include<iostream>#include<cstring>#include<cstdio>#include<stack>using namespace std;...原创 2018-04-30 18:09:08 · 266 阅读 · 0 评论 -
第六届“浪潮杯”山东省ACM H Square Number
Square NumberTime Limit: 1000 ms Memory Limit: 65536 KiBSubmit Statistic DiscussProblem DescriptionIn mathematics, a square number is an integer that is the square of an integer. In other words, it is...原创 2018-05-01 16:51:59 · 168 阅读 · 0 评论 -
Codeforces Round #478 (Div. 2) A Aramic script[ 思维 + set]
AAramic script A. Aramic scripttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn Aramic language words can only represent objects.Words in Aramic ...原创 2018-05-02 13:11:48 · 126 阅读 · 0 评论 -
Codeforces Round #478 (Div. 2) B Mancala
BMancalaB. Mancalatime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMancala is a game famous in the Middle East. It is played on a board that consist...原创 2018-05-02 13:27:52 · 357 阅读 · 0 评论 -
Codeforces Round #478 (Div. 2) C. Valhalla Siege
C. Valhalla Siegetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIvar the Boneless is a great leader. He is trying to capture Kattegat from Lagert...原创 2018-05-02 13:34:28 · 192 阅读 · 0 评论 -
Codeforces Round #478 (Div. 2) 975D - Ghosts
D. Ghosts time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGhosts live in harmony and peace, they travel the space without any purpose other than s...原创 2018-05-02 17:36:40 · 173 阅读 · 0 评论 -
codeforces 962 E. Byteland, Berland and Disputed Cities
E. Byteland, Berland and Disputed Citiestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe cities of Byteland and Berland are located on the axis...原创 2018-04-28 10:14:15 · 282 阅读 · 0 评论 -
牛客练习赛16 A - 字典序最大的子序列
A字典序最大的子序列题目描述给定字符串s,s只包含小写字母,请求出字典序最大的子序列。 子序列:https://en.wikipedia.org/wiki/Subsequence 字典序:https://en.wikipedia.org/wiki/Lexicographical_order输入描述:一行一个字符串s (1 <= |s| <= 100,000)。输出描述:字典序最大的子序...原创 2018-04-28 09:27:51 · 427 阅读 · 0 评论 -
牛客练习赛16 B - 漂亮的树
B漂亮的树题目描述街上有n棵树,标号为1...n,第i棵树的高度为ai。 定义这n棵树是漂亮的,当且仅当 1. 对于所有的i,ai=an-i+1; 2. 对于1 <= i < n / 2 (不是整除),ai + 1= ai + 1; 比如说 “2 3 4 5 5 4 3 2”和“1 2 3 2 1”是漂亮的而“1 3 3 1”和“1 2 3 1”不是。 现在请问最少修改...原创 2018-04-28 09:31:01 · 237 阅读 · 0 评论 -
牛客练习赛16 E 求值
E求值题目描述 给定n个数字a1, a2, ..., an。定义f(l, r) = al | al+1| ... | ar。现在枚举(1 <= l <= r <= n),问不同的f值一共有多少个。输入描述:第一行一个整数n表示数组大小 (1 <= n <= 100,000);第二行n个整数满足0 <= ai <= 1000,000。输出描述:输出一个...原创 2018-04-29 00:42:47 · 385 阅读 · 7 评论 -
Codeforces Round #482 (Div. 2) 979B - Treasure Hunt [思维]
B. Treasure Hunttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter the big birthday party, Katie still wanted Shiro to have some more fun. Later...原创 2018-05-15 13:50:41 · 274 阅读 · 0 评论 -
猜数字游戏的提示( Master-Mind Hints UVA - 340)
MasterMind is a game for two players. One of them, Designer, selects a secret code. The other, Breaker,tries to break it. A code is no more than a row of colored dots. At the beginning of a game, the原创 2018-02-03 16:51:45 · 382 阅读 · 0 评论 -
D.Triple Nim(打表+找规律)
Triple NimTime Limit: 2000 ms Memory Limit: 65536 KiBSubmit StatisticProblem DescriptionAlice and Bob are always playing all kinds of Nim games and Alice always goes first. Here is the rule of Nim gam...原创 2018-04-27 15:53:18 · 270 阅读 · 0 评论 -
Codeforces 981 C. Useful Decomposition [思维]
C. Useful Decompositiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputRamesses knows a lot about problems involving trees (undirected connected gr...原创 2018-05-28 14:03:10 · 619 阅读 · 0 评论