NBUT 1223 Friends number 2010辽宁省赛】的更多相关文章

Time limit  1000 ms Memory limit   131072 kB Paula and Tai are couple. There are many stories between them. The day Paula left by airplane, Tai send one message to telephone 2200284, then, everything is changing… (The story in “the snow queen”). Afte…
Time limit 1000 ms Memory limit 131072 kB The life of Little A is good, and, he managed to get enough money to run a hotel. The best for him is that he need not go to work outside, just wait for the money to go into his pocket. Little A wants everyth…
Time limit 1000 ms Memory limit 131072 kB This English game is a simple English words connection game. The rules are as follows: there are N English words in a dictionary, and every word has its own weight v. There is a weight if the corresponding wo…
Time limit 1000 ms Memory limit 131072 kB It is widely known that any two strangers can get to know each other through at most six other people. Now let’s prove this. In the country Intermediary Conducts Personal Communications (ICPC), there are up t…
Time limit  1000 ms Memory limit  131072 kB Little A has became fascinated with the game Dota recently, but he is not a good player. In all the modes, the rdsp Mode is popular on online, in this mode, little A always loses games if he gets strange he…
Time limit  1000 ms Memory limit  131072 kB The National Intelligence Council of X Nation receives a piece of credible information that Nation Y will send spies to steal Nation X’s confidential paper. So the commander of The National Intelligence Cou…
Time limit 1000 ms Memory limit 131072 kB Little A gets to know a new friend, Little B, recently. One day, they realize that they are family 500 years ago. Now, Little A wants to know whether Little B is his elder, younger or brother.   Input There a…
Time limit   1000 ms Memory limit   131072 kB Digital clock use 4 digits to express time, each digit is described by 3*3 characters (including”|”,”_”and” “).now given the current time, please tell us how can it be expressed by the digital clock.   In…
Time limit  1000 ms Memory limit  32768 kB Little A is one member of ACM team. He had just won the gold in World Final. To celebrate, he decided to invite all to have one meal. As bowl, knife and other tableware is not enough in the kitchen, Little A…
Largest Rectangle in a Histogram Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 21204   Accepted: 6831 Description A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal wi…
暴力,打表. 计算出每一个数的因子之和,可以枚举$i$,让后将$i$的倍数都加上$i$.发现这样的只有$71$对,然后暴力就可以了. #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> #include<vector> #include<map> #include<string> #include<iostream> us…
#include<bits/stdc++.h>using namespace std;const int inf=0x3f3f3f3f;struct node{    int v,z,d,next;//存可以连接的点,用next存邻接表}a[10010];struct road{    int u,cnt,dis;//dis储存当前需要的钱数,即最短路算法里的权,u储存顶点,cnt储存组合数即状态压缩dp    road(int uu,int cntt,int diss)    {      …
#include<bits/stdc++.h>using namespace std;int n,x;char s[10010];char a[31010];int val[100010];int ch[100010][30];int dp[100010];int main(){    while(~scanf("%d",&n))    {        scanf("%s",s+1);        int len=strlen(s+1);  …
#include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> #include <math.h> using namespace std;   int can[1005] = {0}; int a[10005][605]= {0}; int x[6005], y[6005], t[6005]; int h1,h2; int bb, ee, xx, y…
问题 C: Repeat Number 时间限制: 1 Sec  内存限制: 128 MB [cid=1073&pid=2&langmask=0">提交][状态][论坛] 题目描写叙述 Definition: a+b = c, if all the digits of c are same ( c is more than ten).then we call a and b are Repeat Number. My question is How many Repeat …
Paula and Tai are couple. There are many stories between them. The day Paula left by airplane, Tai send one message to telephone 2200284, then, everything is changing- (The story in "the snow queen"). After a long time, Tai tells Paula, the numb…
题目描述 Recently, Miss Huang want to receive a Tree as her birthday gift! (What a interesting person!)  As a interesting person, Miss Huang likes interesting tree. The interesting tree is a tree with the Max interesting degree. The interesting degree eq…
Phone Number Time Limit: 1000MS Memory limit: 65536K 题目描述 We know that if a phone number A is another phone number B's prefix, B is not able to be called. For an example, A is 123 while B is 12345, after pressing 123, we call A, and not able to call…
好吧,神奇的题目.. 原题传送门 这道题目,神奇的字符单调栈.. 首先预处理出1~n个数(大家都会.) 然后塞进字符串里,输出答案(水~) 然后.. 我们需要将所有的字符存入单调栈中,然后乱搞,就可以输出啦. 不过注意:有的题目可能在单调栈中没有把所有的字符删完,即后面的所有字符都一样,那么此时我们需要直接把后面的多出来的位数减去即可. 还有,单调栈中如果已经减了m位之后就不能再减了 在维护单调队列时我们要尽量让排名靠前的数字被删除(贪心) 这样得到的答案才最优 (这道题我一开始做的时候没有维护…
省赛之于ACM 就是让省内的队伍互相比较而已~~~(何况弱省(本渣校  四个二等四个三等(其实是六个三道题 两个两道题,是院长后来和主办方沟通了下- - (本弱很水,但还是要吐槽:好水的省赛啊!!…
[1217] Dinner 时间限制: 1000 ms 内存限制: 32768 K 问题描写叙述 Little A is one member of ACM team. He had just won the gold in World Final. To celebrate, he decided to invite all to have one meal. As bowl, knife and other tableware is not enough in the kitchen, Li…
问题描述 Little A gets to know a new friend, Little B, recently. One day, they realize that they are family 500 years ago. Now, Little A wants to know whether Little B is his elder, younger or brother. 输入 There are multiple test cases. For each test case…
1009: Happiness Hotel 时间限制: 1 Sec  内存限制: 128 MB提交: 173  解决: 19[提交][状态][讨论版] 题目描述 The life of Little A is good, and, he managed to get enough money to run a hotel. The best for him is that he need not go to work outside, just wait for the money to go…
1006: Intermediary 时间限制: 1 Sec  内存限制: 128 MB提交: 261  解决: 25[提交][状态][讨论版] 题目描述 It is widely known that any two strangers can get to know each other through at most six other people. Now let’s prove this. In the country Intermediary Conducts Personal C…
 SET DATEFORMAT 的设置是在执行或运行时设置,而不是在分析时设置. SET DATEFORMAT 将覆盖 SET LANGUAGE 的隐式日期格式设置. 该设置仅用在将字符串转换为日期值时的解释中.它不影响日期值的显示. SET DATEFORMAT mdy SELECT DATEPART(yy, '12/09/10') AS 'Year Number' ------------------------------ Year Number 2010 ================…
To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - English. At the mean time, we encourage students by e…
链接: https://www.acwing.com/problem/content/123/ 题意: 农夫约翰希望为他的奶牛们建立一个畜栏. 这些挑剔的畜生要求畜栏必须是正方形的,而且至少要包含C单位的三叶草,来当做它们的下午茶. 畜栏的边缘必须与X,Y轴平行. 约翰的土地里一共包含N单位的三叶草,每单位三叶草位于一个1 x 1的土地区域内,区域位置由其左下角坐标表示,并且区域左下角的X,Y坐标都为整数,范围在1到10000以内. 多个单位的三叶草可能会位于同一个1 x 1的区域内,因为这个原…
实验拓扑如图所示: 公司A网络如实验拓扑所示,请根据如下需求对网络进行部署: 1) 按照拓扑所示配置OSPF多区域,另外R3与R6,R4与R6间配置RIPv2.R1,R2,R3,R4的环回接口0通告入Area 0,R5的通告入Area 1,R6的直连接口的通告入RIP中: 2) R6上的公司内部业务网段192.168.10.0/24和192.168.20.0/24通告入RIP中,R5上的公司外部业务网段172.16.10.0/24和172.16.20.0/24引入OSPF中: 3) 在R3,R4…
Phone Number Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 We know that if a phone number A is another phone number B’s prefix, B is not able to be called. For an example, A is 123 while B is 12345, after pressing 123, we call A, and not…
Mine Number Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 Every one once played the game called Mine Sweeping, here I change the rule. You are given an n*m map, every element is a '*' representing a mine, or a '.' representing any other…