B. Processing Queries 题目连接: http://www.codeforces.com/contest/644/problem/B Description In this problem you have to simulate the workflow of one-thread server. There are n queries to process, the i-th will be received at moment ti and needs to be pro…
In this problem you have to simulate the workflow of one-thread server. There are n queries to process, the i-th will be received at moment ti and needs to be processed for di units of time. All ti are guaranteed to be distinct. When a query appears…
C. Hostname Aliases 题目连接: http://www.codeforces.com/contest/644/problem/C Description There are some websites that are accessible through several different addresses. For example, for a long time Codeforces was accessible with two hostnames codeforce…
Schlumberger Petrel 2016.3 地震解释 油藏模拟世界上顶尖的三维地质建模软件,软件为用户提供的工具可以用于地震解释.地质建模.油藏数 值模拟等方面的使用,清晰的地质模型可以描述各种地质问题,方便地质学家.地球物理学家. 油藏工程人员使用.像平常钻井的时候,工程师都要先对地层进行一个勘测,针对地质情况进行 井轨的设计,降低钻井时出现的风险,而使用petrel 2016破解版可以降低在勘测过程中的误差, 特别是专业人士还可以通过模型的描述看出这片区域的油藏的情况.新版本的pe…
B. Processing Queries time limit per test5 seconds memory limit per test256 megabytes inputstandard input outputstandard output In this problem you have to simulate the workflow of one-thread server. There are n queries to process, the i-th will be r…
D. Robot Rapping Results Report 题目连接: http://www.codeforces.com/contest/655/problem/D Description While Farmer John rebuilds his farm in an unfamiliar portion of Bovinia, Bessie is out trying some alternative jobs. In her new gig as a reporter, Bessi…
实验四  B2B模拟实验 [实验目的] ⑴.掌握B2B中供应商的供求信息发布.阿里商铺开设和订单交易等过程. ⑵.掌握B2B中采购商的采购信息的发布.交易洽谈.网上支付和收货等过程. [实验条件] ⑴.个人计算机一台 ⑵.计算机通过局域网形式接入互联网. (3).奥派电子商务应用软件 [知识准备] 本实验要的理论知识:B2B电子商务模式.网络银行和物流管理.重点是B2B双方的交易流程,难点是供应商阿里商铺的管理. [实验内容与步骤] 进入奥派电子商务应用软件http://218.193.237.…
实验三 B2C模拟实验 [实验目的] 掌握网上购物的基本流程和B2C平台的运营 [实验条件] ⑴.个人计算机一台 ⑵.计算机通过局域网形式接入互联网. (3).奥派电子商务应用软件 [知识准备] 本实验需要的理论知识:B2C电子商务的内涵.B2C网络零售流程和网店的管理. [实验内容与步骤] 进入奥派电子商务应用软件http://218.193.237.45/AllPassEB/,大家的登录名是:(B1513班是dshsan+学号,B1514是dshsi+学号),密码1,选择学生身份登录. 为了…
题意:有一个一维的书架,\(L\)表示在最左端放一本书,\(R\)表示在最右端放一本书,\(?\)表示从左数或从右数,最少数多少次才能得到要找的书. 题解:我们开一个稍微大一点的数组,从它的中间开始模拟,\(L\)就--\(l\)放进去,\(R\)就++\(r\)放进去,然后每次更新某一本书的最新位置,因为后放的肯定离最左侧或最右侧最近,然后两端求差弄个最小值就行. 代码: int q; char c; int idx; int ans; int mp[2*N],now[2*N]; int ma…
题目+数据:链接:http://pan.baidu.com/s/1hssN8GG 密码:bjw8总结: 总分:300分,仅仅拿了120份. 这次所犯的失误:对于2,3题目,我刚刚看就想到了正确思路,急于敲正确思路,而没有去骗基础得分. 结果第二题DP打残了,第三题排列组合漏了一个小点没考虑到,都是仅仅拿了10分. T1: /* 第一题比较容易,注意一些细节就可以了. 比如删除前导0不能删没了等等. */ #define N 1500 #include<iostream> using names…
C. Binary Table 题目连接: http://codeforces.com/problemset/problem/662/C Description You are given a table consisting of n rows and m columns. Each cell of the table contains either 0 or 1. In one move, you are allowed to pick any row or any column and i…
题目链接: http://www.codeforces.com/contest/655/problem/D 题意: 题目是要求前k个场次就能确定唯一的拓扑序,求满足条件的最小k. 题解: 二分k的取值,做拓扑排序的时候只要每次只有一个元素没有前驱就可以唯一了. #include<iostream> #include<cstring> #include<cstdio> #include<vector> #include<queue> #includ…
题目链接:http://codeforces.com/contest/655/problem/E 大意是Bessie只会英文字母表中的前k种字母,现在有一个长度为m+n的字母序列,Bessie已经知道了前m个字符,问如何填充剩下的n个字符,使得整个序列的不同子序列数目最大.当然所有字母都得是Bessie会的前k个字母. 两个月前比赛的时候做的,是一道不错的题. 关于子序列个数的计算 令dp[i]表示前i个数字组成的序列中子序列的个数, 则对于第i个数字a[i]来说,dp[i]来源于两种情况的转化…
题目链接:http://codeforces.com/contest/655/problem/D 大意是给若干对偏序,问最少需要前多少对关系,可以确定所有的大小关系. 解法是二分答案,利用拓扑排序看是否所有关系被唯一确定.即任意一次只能有1个元素入度为0入队. #include <iostream> #include <vector> #include <algorithm> #include <string> #include <string.h&g…
今天在codeforces上面做到一道题:http://codeforces.com/contest/638/problem/B 题目大意是:给定n个字符串,找到最短的字符串S使得n个字符串都是这个字符串S的子串. 题目里有一个限制条件是每个字母都最多出现一次,所以可以用下面的方法来解决: http://codeforces.com/contest/638/submission/16900955 然后我想到如果问题没有“每个字母最多只出现一次”这个限制的话应该怎么解决. 暂时还在想………
F - Cowslip Collections http://codeforces.com/blog/entry/43868 这个题解讲的很好... #include<bits/stdc++.h> #define LL long long #define fi first #define se second #define mk make_pair #define PII pair<int, int> #define PLI pair<LL, int> #define…
E - Intellectual Inquiry 思路:我自己YY了一个算本质不同子序列的方法, 发现和网上都不一样. 我们从每个点出发向其后面第一个a, b, c, d ...连一条边,那么总的不同子序列就是从0号点出发能走出多少条 不同点的路径. dp[ i ]表示是到 i 这个点的不同路径数, 构成的图显然是个DAG,把这个dp出来就好啦.最后补 n个就是贪贪心. 网上的另外两种方法. dp[ i ] 表示[1, i] 的字符串有多少不同子序列. dp[ i ] = dp[i - 1] *…
D. Three-dimensional Turtle Super Computer 题目连接: http://www.codeforces.com/contest/638/problem/D Description A super computer has been built in the Turtle Academy of Sciences. The computer consists of n·m·k CPUs. The architecture was the paralellepip…
C. Road Improvement 题目连接: http://www.codeforces.com/contest/638/problem/C Description In Berland there are n cities and n - 1 bidirectional roads. Each road connects some pair of cities, from any city you can get to any other one using only the given…
B. Making Genome in Berland 题目连接: http://www.codeforces.com/contest/638/problem/B Description Berland scientists face a very important task - given the parts of short DNA fragments, restore the dinosaur DNA! The genome of a berland dinosaur has notin…
A. Home Numbers 题目连接: http://www.codeforces.com/contest/638/problem/A Description The main street of Berland is a straight line with n houses built along it (n is an even number). The houses are located at both sides of the street. The houses with od…
E. Intellectual Inquiry 题目连接: http://www.codeforces.com/contest/655/problem/E Description After getting kicked out of her reporting job for not knowing the alphabet, Bessie has decided to attend school at the Fillet and Eggs Eater Academy. She has be…
C. Enduring Exodus 题目连接: http://www.codeforces.com/contest/655/problem/C Description In an attempt to escape the Mischievous Mess Makers' antics, Farmer John has abandoned his farm and is traveling to the other side of Bovinia. During the journey, he…
B. Mischievous Mess Makers 题目连接: http://www.codeforces.com/contest/655/problem/B Description It is a balmy spring afternoon, and Farmer John's n cows are ruminating about link-cut cacti in their stalls. The cows, labeled 1 through n, are arranged so…
A. Amity Assessment 题目连接: http://www.codeforces.com/contest/655/problem/A Description Bessie the cow and her best friend Elsie each received a sliding puzzle on Pi Day. Their puzzles consist of a 2 × 2 grid and three tiles labeled 'A', 'B', and 'C'.…
D. Running with Obstacles 题目连接: http://www.codeforces.com/contest/637/problem/D Description A sportsman starts from point xstart = 0 and runs to point with coordinate xfinish = m (on a straight line). Also, the sportsman can jump - to jump, he should…
C. Promocodes with Mistakes 题目连接: http://www.codeforces.com/contest/637/problem/C Description During a New Year special offer the "Sudislavl Bars" offered n promo codes. Each promo code consists of exactly six digits and gives right to one free…
B. Chat Order 题目连接: http://www.codeforces.com/contest/637/problem/B Description Polycarp is a big lover of killing time in social networks. A page with a chatlist in his favourite network is made so that when a message is sent to some friend, his fri…
A. Voting for Photos 题目连接: http://www.codeforces.com/contest/637/problem/A Description After celebrating the midcourse the students of one of the faculties of the Berland State University decided to conduct a vote for the best photo. They published t…
http://codeforces.com/contest/725/problem/C Each English letter occurs at least once in s. 注意到题目有这样一句话,那么就是说S中只有一个重复的字母.一定要看到这句话,不然做不了. 然后就找到pos1和pos2分别代表那两个字母的位置,把他们中间的所有字母对折一下,放在最右边就可以了.因为这样才能用上同一个位置. 只有连续两个相同的字母才会impossible,同样是因为只有两个相同的字母. #includ…