一道杭电ACM的测试题,我运行的没问题,但是提交却是WA,Problem DescriptionJack and Jill have decided to sell some of their Compact Discs,while they still have some value.They have decided to sell one of each of the CD titles that they

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/07 11:09:00
一道杭电ACM的测试题,我运行的没问题,但是提交却是WA,Problem DescriptionJack and Jill have decided to sell some of their Compact Discs,while they still have some value.They have decided to sell one of each of the CD titles that they

一道杭电ACM的测试题,我运行的没问题,但是提交却是WA,Problem DescriptionJack and Jill have decided to sell some of their Compact Discs,while they still have some value.They have decided to sell one of each of the CD titles that they
一道杭电ACM的测试题,我运行的没问题,但是提交却是WA,
Problem Description
Jack and Jill have decided to sell some of their Compact Discs,while they still have some value.They have decided to sell one of each of the CD titles that they both own.How many CDs can Jack and Jill sell?
Neither Jack nor Jill owns more than one copy of each CD.
Input
The input consists of a sequence of test cases.The first line of each test case contains two non-negative integers N and M,each at most one million,specifying the number of CDs owned by Jack and by Jill,respectively.This line is followed by N lines listing the catalog numbers of the CDs owned by Jack in increasing order,and M more lines listing the catalog numbers of the CDs owned by Jill in increasing order.Each catalog number is a positive integer no greater than one billion.The input is terminated by a line containing two zeros.This last line is not a test case and should not be processed.
Output
For each test case,output a line containing one integer,the number of CDs that Jack and Jill both own.
Sample Input
3 3
1
2
3
1
2
4
0 0
Sample Output
2

一道杭电ACM的测试题,我运行的没问题,但是提交却是WA,Problem DescriptionJack and Jill have decided to sell some of their Compact Discs,while they still have some value.They have decided to sell one of each of the CD titles that they
.这不是半程测试的.
我AC了.马上给你敲代码.
敲好了.
用G++提交.
#include
#include
using namespace std;
int a[2000008];
int main()
{
int n,m;
int i;
int count;
while(scanf("%d%d",&n,&m),n||m)
{
for(i=0;i

一道杭电ACM的测试题,我运行的没问题,但是提交却是WA,Problem DescriptionJack and Jill have decided to sell some of their Compact Discs,while they still have some value.They have decided to sell one of each of the CD titles that they 杭电acm的一道题,不知道自己错在哪,求助Input输入数据包含多个测试实例,每个测试实例占一行,每行的开始是一个整数n(3 杭电acm 1008 题我的为什么是wrong answer 杭电acm第3809题的详细思路 杭电acm 2035 题的算法是怎样的,杭电acm 2035 题的算法是怎样的,我要算法分析,不要代码!Problem Description求A^B的最后三位数表示的整数.说明:A^B的含义是“A的B次方”Input输入数据包含多个测试实 我的杭电ACM2028哪里错了程序自己运行了几个例子都没问题,但是在杭电里用C语言提交上去就是WA…… 高手帮看下哪里出问题了…… 题目是 求n个数的最小公倍数. 输入包含多个测试实例,每个 杭电ACM 3809的详细解题思路是什么 杭电acm怎么查看自己ac过的代码 杭电ACM 1099题 题意是什么啊?看不懂.晕,我说的就是那道题.但是它的英文描述我看不懂…… 为什么杭电acm 1013结果就是mod9的余数,这道题我的思路就是很土很土的办法,; 一道acm的排序题Snow_storm有n(0 杭电acmd 字打错了,是 杭电acm的超时是什么意思 acm的一道c语言问题 求助一道ACM题一道很简单的ACM题目,题在这里我写的代码如下:#include using namespace std;int main(){int n,m[30];cin>>n;for(int i=0;i=0;j--){cout 杭电ACM题1114.把并代码写一下给我,最好再写一下解决的方法说明.我懒得写.貌似挺简单的,帮个忙,谢了Problem DescriptionBefore ACM can do anything, a budget must be prepared and the necessary financial support obtained 杭电ACM第2136题Largest prime factor, 阶乘所得结果的位数怎么算?这是一道acm编程题. 杭电ACM 2026输入一个英文句子,将每个单词的第一个字母改成大写字母.Input输入数据包含多个测试实例,每个测试实例是一个长度不超过100的英文句子,占一行.Output请输出按照要求改写后的英文