### pku oj的1002题 [问题点数：100分，结帖人wzw_0827]

2011年9月 C/C++大版内专家分月排行榜第一
2010年8月 C/C++大版内专家分月排行榜第一
2009年11月 C/C++大版内专家分月排行榜第一

2011年9月 Linux/Unix社区大版内专家分月排行榜第二

2011年8月 C/C++大版内专家分月排行榜第三
2011年8月 Linux/Unix社区大版内专家分月排行榜第三
2010年4月 C/C++大版内专家分月排行榜第三

2018PKU校内赛A题

POJ 部分题解 解题报告
PKU OJ上的部分解题报告和源程序 分享一下
ACM北大题库和答案 源代码

#include&amp;lt;iostream&amp;gt;n#include&amp;lt;string&amp;gt;nnusing namespace std;nvoid main(){n char ca[1001],cb[1001];n int t;n int ia[1001]={0},ib[1001]={0};n size_t t1,t2;n n while(cin&amp;gt;&amp;gt...
zzuli oj 1002: 简单多项式求值
Descriptionnn对用户输入的任一整数，输出以下多项式的值。ny=2x2+x+8nnnnInputnn输入整数x的值。nnOutputnn输出一个整数，即多项式的值。nnSample Inputnn1nSample Outputnn11nHINTnnnnSourcenn*nnn#include nint main()n{n i

487-3279rnTime Limit: 2000MS Memory Limit: 65536K rnTotal Submissions: 91854 Accepted: 15227 rnrnDescriptionrnrnBusinesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase. For example, you can call the University of Waterloo by dialing the memorable TUT-GLOP. Sometimes only part of the number is used to spell a word. When you get back to your hotel tonight you can order a pizza from Gino's by dialing 310-GINO. Another way to make a telephone number memorable is to group the digits in a memorable way. You could order your pizza from Pizza Hut by calling their ``three tens'' number 3-10-10-10. rnrnThe standard form of a telephone number is seven decimal digits with a hyphen between the third and fourth digits (e.g. 888-1200). The keypad of a phone supplies the mapping of letters to numbers, as follows: rnrnA, B, and C map to 2 rnD, E, and F map to 3 rnG, H, and I map to 4 rnJ, K, and L map to 5 rnM, N, and O map to 6 rnP, R, and S map to 7 rnT, U, and V map to 8 rnW, X, and Y map to 9 rnrnThere is no mapping for Q or Z. Hyphens are not dialed, and can be added and removed as necessary. The standard form of TUT-GLOP is 888-4567, the standard form of 310-GINO is 310-4466, and the standard form of 3-10-10-10 is 310-1010. rnrnTwo telephone numbers are equivalent if they have the same standard form. (They dial the same number.) rnrnYour company is compiling a directory of telephone numbers from local businesses. As part of the quality control process you want to check that no two (or more) businesses in the directory have the same telephone number. rnrnrnInputrnrnThe input will consist of one case. The first line of the input specifies the number of telephone numbers in the directory (up to 100,000) as a positive integer alone on the line. The remaining lines list the telephone numbers in the directory, with each number alone on a line. Each telephone number consists of a string composed of decimal digits, uppercase letters (excluding Q and Z) and hyphens. Exactly seven of the characters in the string will be digits or letters. rnrnOutputrnrnGenerate a line of output for each telephone number that appears more than once in any form. The line should give the telephone number in standard form, followed by a space, followed by the number of times the telephone number appears in the directory. Arrange the output lines by telephone number in ascending lexicographical order. If there are no duplicates in the input print the line: rnrnNo duplicates. rnrnSample Inputrnrn12rn4873279rnITS-EASYrn888-4567rn3-10-10-10rn888-GLOPrnTUT-GLOPrn967-11-11rn310-GINOrnF101010rn888-1200rn-4-8-7-3-2-7-9-rn487-3279rnrnSample Outputrnrn310-1010 2rn487-3279 4rn888-4567 3rnSourcernrnEast Central North America 1999rnrn********************************************************************************************************************rnrn#include rn#include rn#include rn#include rnrnusing namespace std;rnrnrninline void table(char& ch)rnrn switch(ch)rn rn case 'A': rn case 'B':rn case 'C': ch = '2'; break;rn case 'D':rn case 'E':rn case 'F': ch = '3'; break;rn case 'G': rn case 'H': rn case 'I': ch = '4'; break;rn case 'J':rn case 'K':rn case 'L': ch = '5'; break;rn case 'M':rn case 'N':rn case 'O': ch = '6'; break;rn case 'P': rn case 'R':rn case 'S': ch = '7'; break;rn case 'T':rn case 'U':rn case 'V': ch = '8'; break;rn case 'W':rn case 'X':rn case 'Y': ch = '9'; break;rn default: ch = ch;rn rnrnrnrnint main()rnrn int i,j;rn int length = 0;rn int n;rn int count = 1;rn rn string now;rn string line="1111111";rn char temp[100];rnrn string* num;rn bool flag = false;rnrn scanf("%d" ,&n);rn rnrn num = new string[n+1];rnrn while( n>0 )rn rn i = 0;rn j = 0;rn scanf("%s",temp);rn rn while( i < 7 )rn rn rn if( temp[j] == '-')rn rn j++;rn continue;rn rn elsern rn table(temp[j]);rn line[i] = temp[j];rn i++;rn j++;rn rn rn num[length] = line;rn length++;rnrn n--;rn rnrnrn sort(num,num+length);rn rn rn rn now = num[0]; rnrnrnrn for( i = 1; i < length; i++)rn rn rn if( num[i] != now )rn rn if(count > 1)rn rn for( j = 0; j < 7; j++ )rn rn printf( "%c",now[j]);rn if( j == 2)rn printf( "-");rn rn printf(" %d\n",count);rn rn count = 1;rn now = num[i];rn rn elsern rn flag = true;rn count++;rn rn rn rn if(!flag)rn cout << "No duplicates." << endl;rnrn rn rn return 0;rn
pku acm 1002 487-3279代码
<em>pku</em> acm <em>1002</em> 487-3279代码 二叉查找数实现解题报告请访问：http://blog.csdn.net/china8848
【ACM】杭电OJ 1002

NEUQ OJ题解合集（一）1002-1005
<em>1002</em>: A+B（基本输入输出2）rnrnrnrnrnrnrnrn题目描述：rnrnrnrn输入两个数A,B，输出A+B的值。rnrnrnrn输入：rnrnrnrn第一行是数据的组数N，从第二行开始是N组由两个整数（a和b）构成的数据，a和b之间用空格隔开，每组输入单独占一行rnrnrnrn输出：rnrnrnrn每组的两个整数（a和b）求和并输出，每组的求和结果独占一行rnrnrnrnrnrnr
PAT考试乙级1002(C语言实现)
#includen#include n#include nusing namespace std;void num_to_string(int n){n switch(n){n case 0:printf("ling");break; n case 1:printf("yi");break;

C语言PAT乙级试题答案1002

PAT乙级1002. 写出这个数 C++

PAT程序设计练习——甲级1002（两个多项式的解析与合并）
PAT程序设计能力测试n题目原文链接：点击打开链接n翻译题目要求：n程序输入为两行：均为一个多项式，按 K nN1 An1 N2 An2n......Nk Ank，K代表的是多项式的非零项数，范围闭区间是[1,10]，N1到Nk的范围区间是 1nNk是指数，Ank是系数，遇到相同的指数，系数进行累加，从而合并成一个多项式。nnn例子输入：n2 1 2.4 0 3.2n2 2 1.5 n1 0.5
pku程序打包
<em>pku</em>做过的题都在这里了

oj1002
#include&amp;lt;iostream&amp;gt;nusing namespace std;nint main ()n{n int n;n long unsigned int a,b,c;n cin&amp;gt;&amp;gt;n;n cout&amp;lt;&amp;lt;endl;n cin&amp;gt;&amp;gt;a&amp;gt;&amp;gt;b;n c=a+b;n cout&amp;lt;&amp;lt;a&amp;lt;&amp;

<em>pku</em> 一道动态规划的经典题

<em>oj</em>系统安装过程，所有命令需要手打，发出来仅仅是为了大家一起讨论，一起进步，如有侵权，请及时通知我，我会立刻将文件删除，敬请谅解，！
1002 写出这个数

zzuli OJ 1002: 简单多项式求值
Descriptionrnrn对用户输入的任一整数，输出以下多项式的值。rny=2x2+x+8rnrnrnrnInputrnrn输入整数x的值。rnrnOutputrnrn输出一个整数，即多项式的值。rnrnSample Inputrnrn1rnrnSample Outputrnrn11rnrnHINTrnrnrnrnSourcern#includernrnrnint main(void)rn{r

pku acm 动态规划题1179解题报告
<em>pku</em> acm 动态规划题1179解题报告
PAT——乙级1002（字符串）
n#include&amp;lt;cstdio&amp;gt;n#include&amp;lt;cstring&amp;gt;n#include&amp;lt;algorithm&amp;gt;nusing namespace std;nchar ch[15][5]={&quot;ling&quot;,&quot;yi&quot;,&quot;er&quot;,&quot;san&quot;,&quot;si&quot;,&quot;wu&quot;,&quot;liu&quot;,&quot;qi&quo
HDU 1002 (高精度加法运算）
A + B ProblemIInTime Limit: 2000/1000 MS(Java/Others)    Memory Limit: 65536/32768 K (Java/Others)nTotal Submission(s): 317773    Accepted Submission(s):61748nnnnProblem DescriptionnI have a ve

ACM——hdu1002（高精度加法）
Problem Description nI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.nnInput nThe first line of the input contains an integer T(1&amp;amp;lt;=T&amp;amp;lt;=...

PKU源码。。。。。
PKU，POJ共301题源代码。1001 <em>1002</em> 1003 1004 1005 1006 1007 1008 1011 1012 1013 1014 1015 1017 1018 1019 1028 1032 1042 1046 1050 1061 1065

Peking OJ 1001题 附有测试数据

[noip2015]斗地主 题解

OJ刷题小技巧
1.一般用C语言节约空间，要用C++库函数或STL时才用C++;ncout、cin和printf、scanf最好不要混用。nn大数据输入输出时最好不要用cin、cout，防止超时。nnn nn2.有时候int型不够用，可以用long long或__int64型(两个下划线__)。nn值类型表示值介于 -2^63 ( -9,223,372,036,854,775,808)n到2^63-1(+9,22

ACM培训资料
scu <em>oj</em> 姜边解题报告 杭电 <em>oj</em> 结题报告 各种算法的思路 题目分类 基础训练题
OJ编程题输入数据的处理
OJ编程题输入数据的处理n一、scanf表达式的值nnscanf(…)表达式的值为int，表示成功读入的变量个数。nnscanf(…)值为EOF（即-1）则说明输入数据已经结束nnnnn二、cin表达式的值nncin &amp;amp;amp;gt;&amp;amp;amp;gt; m &amp;amp;amp;gt;&amp;amp;amp;gt; n … 表达式的值，在成功读入所有变量时为true，否则为falsennn三、处理无结束标记的OJ题目输入nnn或nn三、用freopen重定...
1000注意EOF，1001、1002题大数的相加
I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.Input rnThe first line of the input contains an integer T(1<=20) which means the number of

C++几个适合的OJ刷题网站
RQNOJ,VIJOS 这两个还比较基本，题目也是中文的n对于准备NOI或者省选的话，BZOJ是不错的nACM什么的，最好就做POJ，SGU，Codeforces等题库，这些都是英文的
poj1002（map水题 ）

ACMoi蓝桥杯刷题网站推荐
ACM oi 蓝桥杯 刷题网站推荐n刷题的<em>oj</em>越来越多 肯定都有他们自己的特点n今天给各位朋友推荐一下一些网站
PAT甲级1002解题报告及疑惑
<em>1002</em> A+B for PolynomialsInput Specification:Output Specification:Sample Input:Sample Output:My Code疑惑nThis time, you are supposed to find A+B where A and B are two polynomials.nInput Specification:nEa...
【OJ题集】简单选择排序简单介绍

pku sgu 经典图论题解答
<em>pku</em> sgu 经典图论题解答， 多种方法解答经典图论题， 附源代码
OJ编程题教训

pku（poj）--2494--Acid Text--java代码

ASCII码排序nnProblem Descriptionnn输入三个字符后，按各字符的ASCII码从小到大的顺序输出这三个字符。nn Inputnn输入数据有多组，每组占一行，有三个字符组成，之间无空格。nn Outputnn对于每组输入数据，输出一行，字符中间用一个空格分开。nn Sample Inputnnqw...

n n n S0. PAT真题分类nn柳神博客整理(附链接)：PAT甲级真题分类nnnS1. 图论nn网友整理(无链接版)图论500题nnn1.1 最小生成树n1.1.1 kruskal算法：nn洛谷P1546n洛谷P2330n洛谷P1991nn1.1.2 prime算法：nn洛谷P1265nn1.2 最短路nn洛谷P1346n洛谷P1339n洛谷P1144nn1.3...

#include &amp;lt;iostream&amp;gt;n#include &amp;lt;string&amp;gt;nusing namespace std;nint main()n{n int n;n cin &amp;gt;&amp;gt; n;n for (int i = 0; i &amp;lt; n; i++)n {n string a, b;n cin &amp;gt;&amp;gt; a &amp;gt;&amp;gt; b;n cout &amp;lt;&amp;...

HDU1000nn原题翻译：nn问题描述：计算A+Bnn输入：每一行包含两个整数A和B，（输入）直到文件末尾。nn输入：对于每一种（输入）情况，在一行输出A+B的值。nn输入举例：1 1nn输出举例：2nnAC源代码：（调试环境：VS2017 Community）nnn#include &quot;iostream&quot;nnint main()n{n using namespace std;n int a, b...

﻿﻿rnrn二分总结rnrn一．rnrn二分从做过的题来说应该可以分为三类：查找类（<em>oj</em>上所有二分题）和网上说的排序类（可以用sort水过）以及合并类（目前没有遇到过）。rnrn主要思路：1.先确定要查找的对象。2.再确定while循环的左右以及停止条件。rnrn下面以几道<em>oj</em>的题来总结一下二分。rnrn二．例题rnrn1.“01:查找最接近的元素”rnrn此题比较水，但还是做的时候想用暴力结果超

oj进阶之路】各大oj题目分类，集合整理，各处转载

nntitle: 用python爬hdu题库 ndate: 2018-05-07 01:39:09 ntags: n - python3 n - 爬虫 ncategories: python3nnnndescription: 爬取杭电所有题目，杭电最近不太稳定，为了方便刷题，特地将题目爬取下来。nn这里涉及到很多的点，比如python利用正则表达式爬下来之后怎么把html标签去除，还有...
[C/C++] 1002 写出这个数 (20)（20 分）
nn nn nnn#include&amp;lt;stdio.h&amp;gt; n#include&amp;lt;string.h&amp;gt;nint main()n{ n char a[100];n char ref[10][5] ={&quot;ling&quot;,&quot;yi&quot;,&quot;er&quot;,&quot;san&quot;,&quot;si&quot;,&quot;wu&quot;,&quot;liu&quot;,&quot;qi&quot;,&q
swust-数据结构OJ题库

<em>1002</em> A+B Problem IIrnProblem Descriptionrn I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.rnInputrnThe first line of the input contains an inte...

A + B Problem IIProblem Description：I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.Input：The first line of the input contains an integer T(1

HDU oj 自动交题爬虫

HDU杭电OJ经典100题2000-2099_Java版详细题解(持续更新)

java实现的，华为OJ试题汇总，包括一些等差序列求和，数组查找等函数实现

PTA乙级1002【写出这个数】思路及代码（C语言）

zjut acm 浙工大 OJ 355题 AC代码 by C++

ACM杭电入门训练题
ACM刷题模式~进入状态~ 杭州电子科技大学OJ

Cognos的安装与配置(参考)下载

NV GT330M和ATI HD5650测评下载

HideWizard 9.09 破解版（去除修改主页限制）下载