PAT1022】的更多相关文章

1022. Digital Library (30) 时间限制 1000 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Ea…
两个坑. 一个是一直用的malloc不行了.因为malloc分配的是固定大小,之前做的题没遇到过是因为一般string都不长(malloc分配string为24个Byte),这次直接报段错误,呢们了半天. 第二个很无语,就是ID会有0,当int处理的时候把0消掉了,会有两个case不通过. #include <iostream> #include <vector> #include <sstream> #include <stdio.h> #include…
输入两个非负10进制整数A和B(<=230-1),输出A+B的D (1 < D <= 10)进制数. 输入格式: 输入在一行中依次给出3个整数A.B和D. 输出格式: 输出A+B的D进制数. 输入样例: 123 456 8 输出样例: 1103 了解进制间的转换 是 解题的关键 # include<iostream> # include<algorithm> # include<stdio.h> # include<string> usin…
A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number as its ID. Given any query from a reader, you are s…