Lattice's basics in digital electronics 题目链接 题目描述 LATTICE is learning Digital Electronic Technology. He is talented, so he understood all those pieces of knowledge in 10−9 second. In the next 10−9 second, he built a data decoding device that decodes…
Lattice's basics in digital electronics 44.08% 1000ms 131072K   LATTICE is learning Digital Electronic Technology. He is talented, so he understood all those pieces of knowledge in 10^{-9}10−9 second. In the next 10^{-9}10−9 second, he built a data d…
题意:https://nanti.jisuanke.com/t/31450 题解:题目很长的模拟,有点uva的感觉 分成四步 part1 16进制转为二进制string 用bitset的to_string() part2 parity check 校对,将处理结果pushback到另一个string part3 建字典树,用形如线段树的数组存 part4 遍历字典树 1A 233 #include<bitset> #include <cstdio> #include <cma…
原题链接:https://nanti.jisuanke.com/t/31450 附上队友代码:(感谢队友带飞) #include <bits/stdc++.h> using namespace std; #define ll long long #define FOR(i,a,b) for(int i=(a);i<=(b);++i) #define DOR(i,a,b) for(int i=(a);i>=(b);--i) const int maxN=2e5+5,inf=0x3f3…
https://nanti.jisuanke.com/t/31450 题意 给出一个映射(左为ascll值),然后给出一个16进制的数,要求先将16进制转化为2进制然后每9位判断,若前8位有奇数个1且第9位为0则这个子串取,若前8位有偶数个1且第9 位为1也取.取出的串在映射中进行查找,输出对应ascll值的字符 分析 用map直接模拟,细节需要注意. #include <bits/stdc++.h> using namespace std; #define ms(a, b) memset(a…
[链接] 我是链接,点我呀:) [题意] [题解] 每个单词的前缀都不同. 不能更明示了... 裸的字典树. 模拟一下.输出一下就ojbk了. [代码] #include <bits/stdc++.h> #define LL long long #define rep1(i,a,b) for (int i = a;i <= b;i++) #define rep2(i,a,b) for (int i = a;i >= b;i--) #define all(x) x.begin(),x…
Supreme Number 题目链接 题目描述 A prime number (or a prime) is a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers. Now lets define a number N as the supreme number if and only if each number made up of an non-em…
Made In Heaven 题目描述 One day in the jail, F·F invites Jolyne Kujo (JOJO in brief) to play tennis with her. However, Pucci the father somehow knows it and wants to stop her. There are N spots in the jail and M roads connecting some of the spots. JOJO f…
42.93% 1000ms 131072K LATTICE is learning Digital Electronic Technology. He is talented, so he understood all those pieces of knowledge in 10^{-9}10−9 second. In the next 10^{-9}10−9 second, he built a data decoding device that decodes data encoded w…
Chaarshanbegaan at Cafebazaar 题目链接 http://icpc.upc.edu.cn/problem.php?cid=1618&pid=1 题目描述 Chaarshanbegaan is a gathering event at Cafebazaar similar to TGIF events at Google. Some entertainment programs like pantomime, foosball, Xbox/PS4, and several…
STRENGTH 题目链接 题目描述 Strength gives you the confidence within yourself to overcome any fears, challenges or doubts. Feel the fear and do it anyway! If you have been going through a rough time and feel burnt out or stressed, the Strength card encourages…
Floating-Point Hazard 题目描述 Given the value of low, high you will have to find the value of the following expression: \(\sum_{i=low}^{high}(\sqrt[3]{(i+10^{-15})}-\sqrt[3]i)\) If you try to find the value of the above expression in a straightforward w…
Bumped! 题目描述 Peter returned from the recently held ACM ICPC World finals only to find that his return flight was overbooked and he was bumped from the flight! Well, at least he wasn't beat up by the airline and he's received a voucher for one free fl…
过分的谜题 题目描述 2060年是云南中医学院的百年校庆,于是学生会的同学们搞了一个连续猜谜活动:共有10个谜题,现在告诉所有人第一个谜题,每个谜题的答案就是下一个谜题的线索....成功破解最后一个谜题后,答案就是指向奖励的线索 在所有同学们的努力下,全校同学们获得了最后一个谜题,这个谜题有几十张纸,上面全是密密麻麻的数字以及'.' 第一页内容如下: 1,2,3,4,5,6 4,1,5,2,6,3 2,4,6,1,3,5 1,2,3,4,5,6 ---3 1,2,3,4....32 ......…
不存在的泳池 题目描述 小w是云南中医学院的同学,有一天他看到了学校的百度百科介绍: 截止到2014年5月,云南中医学院图书馆纸本藏书74.8457万册,纸质期刊388种,馆藏线装古籍图书1.8万册,电子资源总量35TB,拥有中.外文数据库25个,电子图书29.5万册(镜像).包库130万册.古籍线装图书1.8万余册,有39种列为本馆珍善本,如<彻滕八编>.<赵氏医贯>等明清版本.台湾文渊阁版本<四库全书>,按<全国古籍善本书总目>分类表(即:经·史·子·集…
黑暗意志 题目描述 在数千年前潘达利亚从卡利姆多分离之时,迷雾笼罩着这块新形成的大陆,使它不被外来者发现.迷雾同样遮蔽着这片大陆古老邪恶的要塞--雷神的雷电王座.在雷神统治时期,他的要塞就是雷电之王力量的保障.即使在他死后,强大而堕落的能量仍然在此萦绕不绝:而复活的雷电之王和赞达拉巨魔企图再次驾驭那股能量,重建昔日帝国.这就是魔兽世界5.2版本的大型团队副本"雷电王座" 雷电王座中有一个神奇的BOSS是所有玩家都会记得的,直到现在当你的人物血量比BOSS血量都高的时候,在战斗的时候都要…
闪闪发光 题目描述 一所位于云南昆明的中医药本科院校--云南中医学院. 因为报考某专业的人数骤减,正面临着停招的危机. 其中有九名少女想到一条妙计--成为偶像, 只要她们成为偶像,学校的名气便会增加,而报考的人数亦会上升. 就这样,九位个性鲜明的少女决定一起努力成为偶像. 希望可以凭借偶像的名气增加生源来挽救自己所喜爱的专业,让自己的学校闪闪发光. 她们为了成为偶像,第一步对于她们来说是减肥! 这里有n个重物,第i个重物的重量是2^{w_i}.她们每天任务要完成的重量是n个重物的重量和. 每次举…
流连人间的苏苏 题目描述 苏苏在做红尘仙的任务时,发现坐落于风景秀丽.四季如春的昆明市的云南中医学院. 没过多久,苏苏就喜欢上了这个学校.以致于苏苏忘了回涂山的时间,现在她只剩下d天的时间待在云南中医学院.由于时间紧迫,苏苏想方设法为建设更好的云南中医学院. 假设学校里某条街道有n个房子. 每天选择两个门牌号l.r,给这两个门牌号之间的所有房子的门前都栽一棵树,已经有树的不需要再种. 苏苏想知道在某天,有哪些房子前有树. 输入 每个输入文件只有一组数据 第一行包含n,d.(1 <= n,d <…
题意:在20×20方阵中从起点出发只允许向右或向下移动到达终点的路径有多少条. 思路:每次只能向右或者向下,总共 40 步,也就是 40 步中每一步都有两种选择,也就是 C (40 , 20) . 为什么能在计算分子的时候不断约分掉分母?首先,组合数是整数,也就是说到最后分子一定能整除分母.我们使用 m 记录当前还没有被约分掉的最大的数,如果分子能够整除掉 m 就进行约分并且 m 更新为下一个等待约分的值.这样做就可以避免在计算组合数中导致的数据溢出问题! /******************…
THE WORLD 题目链接 题目描述 The World can indicate world travel, particularly on a large scale. You mau be lucky enough to be embarking on a six-month overseas trip, or are working, studying or living overseas for an extended period of time. Similarly, this…
Stone Game 题目链接 题目描述 Alice and Bob are always playing game! The game today is about taking out stone from the stone piles in turn. There are n piles of stones, and the i-th pile contains A[i] stones. As the number of stones in each pile differs from…
Greatest Common Divisor 题目链接 题目描述 There is an array of length n, containing only positive numbers. Now you can add all numbers by 1 many times. Please find out the minimum times you need to perform to obtain an array whose greatest common divisor(gcd…
Bits Reverse 题目链接 题目描述 Now given two integers x and y, you can reverse every consecutive three bits in arbitrary number's binary form (any leading zero can be taken into account) using one coin. Reversing (1,2,3) means changing it into (3,2,1). Could…
Winner Winner 题目链接 题目描述 The FZU Code Carnival is a programming competetion hosted by the ACM-ICPC Training Center of Fuzhou University. The activity mainly includes the programming contest like ACM-ICPC and strive to provide participants with interes…
GCDLCM 题目链接 题目描述 In FZU ACM team, BroterJ and Silchen are good friends, and they often play some interesting games. One day they play a game about GCD and LCM. firstly BrotherJ writes an integer A and Silchen writes an integer B on the paper. Then Br…
Melody 题目描述 YellowStar is versatile. One day he writes a melody A = [A1, ..., AN ], and he has a standard melody B = [B1, ..., BN ]. YellowStar can split melody into several parts, it can be expressed as: K split position S = [S1, ..., SK], satisfy 1…
WTMGB 题目链接 题目描述 YellowStar is very happy that the FZU Code Carnival is about to begin except that he has to prepare problems for it. Because the statement of each problem is written in English! YellowStar types the statements slowly witb high error r…
As rich as Crassus 题目链接 题目描述 Crassus, the richest man in the world, invested some of his money with the Very Legitimate International Bank. The Bank offered a remarkable interest rate. They promised that given an initial investment of x, the balance…
Communication 题目描述 The Ministry of Communication has an extremely wonderful message system, designed by the President himself. For maximum efficiency, each office in the Ministry can send a message directly to some, but not necessarily all, other off…
Bus Stop 题目描述 In a rural village in Thailand, there is a long, straight, road with houses scattered along it. (We can picture the road as a long line segment, with an eastern endpoint and a western endpoint.) The Thai government is planning to set up…