Borrowers UVA - 230】的更多相关文章

  I mean your borrowers of books - those mutilators of collections, spoilers of the symmetry of shelves, and creators of odd volumes. – (Charles Lamb, Essays of Elia (1823) 'The Two Races of Men')   Like Mr. Lamb, librarians have their problems with…
I mean your borrowers of books--those mutilators of collections, spoilers of the symmetry of shelves, and creators of odd volumes. --Charles Lamb, Essays of Elia (1823) 'The Two Races of Men' Like Mr. Lamb, librarians have their problems with borrowe…
I mean your borrowers of books - those mutilators of collections, spoilers of the symmetry of shelves, and creators of odd volumes. - (Charles Lamb, Essays of Elia (1823) `The Two Races of Men')Like Mr. Lamb, librarians have their problems with borro…
AC代码: #include <iostream> #include <cstdio> #include <cstdlib> #include <cctype> #include <cstring> #include <string> #include <sstream> #include <vector> #include <set> #include <map> #include &…
题意: 输入若干书籍和作者名字,然后先按作者名字升序排列,再按标题升序排列,然后会有3种指令,BORROW,RETURN, SHELVE. BORROW 和 RETURN 都会带有一个书名在后面,如: BORROW "The Canterbury Tales"RETURN "The Canterbury Tales" 当遇到SHELVE指令,输出已还但没上架的书排序后(规则同上)依次插入书架的序列. 用例: 输入: "The Canterbury Tale…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 用map+set写个模拟就好. 3个区域 书架.桌子.别人的手上. 其中前两个区域的书都能借出去. [代码] #include <bits/stdc++.h> using namespace std; set <pair<string, string> > mset1,mset2,mset3; map<string, string> author; string s1,s2,s3; int…
题意: 统计[a, b]或[b, a]中0~9这些数字各出现多少次. 分析: 这道题可以和UVa 11361比较来看. 同样是利用这样一个“模板”,进行区间的分块,加速运算. 因为这里没有前导0,所以分块的时候要多分几种情况. 以2345为例,这是一个四位数,首先要计算一下所有的一位数.两位数以及三位数各个数字出现的个数. 对应的模板分别为n,n*,n**,其中n代表非零数字,*代表任意数字. 考虑这样一个长为l的模板****(l个*),这样的数共10l个,而且各个数字都是等频率出现,所以每个数…
:W Problem A: Football (aka Soccer)  The Problem Football the most popular sport in the world (americans insist to call it "Soccer",but we will call it "Football"). As everyone knows, Brasil is the country that have mostWorld Cup title…
链接: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4515 题意: 给出整数a.b,统计a和b(包含a和b)之间的整数中,数字0,1,2,3,4,5,6,7,8,9分别出现了多少次.1≤a,b≤1e8. 分析: 解决这类题目的第一步一般都是:令f(n,d)表示0-n中数字d出现的次数,则所求的就是f(b,d)-f(a-1,d).例如,…
UVA 11992 - Fast Matrix Operations 给定一个r*c(r<=20,r*c<=1e6)的矩阵,其元素都是0,现在对其子矩阵进行操作. 1 x1 y1 x2 y2 val 表示将(x1,y1,x2,y2)(x1<=x2,y1<=y2)子矩阵中的所有元素add上val: 2 x1 y1 x2 y2 val 表示将(x1,y1,x2,y2)(x1<=x2,y1<=y2)子矩阵中的所有元素set为val: 3 x1 y1 x2 y2 val 表示输…