F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

֣����ϵ�й��¡����ű�����

Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)
Total Submission(s): 5495    Accepted Submission(s): 1822


Problem Description
����֣��������������
����Ҳ���Ǹ�����
�����������Ͳ��dz���
������ʵ��
�������Ǵ������̵��ų�

����һ�죬֣�����������ľ���������һ��n*m��ƽԭ׼������
��������������ս�����飬ÿ��ʿ�����Թ���������ֻ�ܹ�������֮�����پ���Ϊ2��λ���Լ�ʿ���������ڵ�λ�á���Ȼ��һ��ʿ������վ������һ��ʿ�����ܹ�������λ�ã�ͬʱ��Ϊ���ε�ԭ��ƽԭ��Ҳ����ÿһ��λ�ö����԰���ʿ����
�������ڣ���֪n,m �Լ�ƽԭ��صľ�����Σ��������֣������������,����ܰ��Ŷ��ٸ�ʿ����
 

Input
�����������������ݣ�
ÿ�����ݵĵ�һ�а���2������n��m (n <= 100, m <= 10 )��֮���ÿո������
��������n�У�ÿ��m��������ʾn*m�ľ�����أ�����1��ʾ��λ�ÿ��԰���ʿ����0��ʾ�õ��β���������ʿ����
 

Output
��Ϊÿ�����ݼ��㲢�������ܰ��ŵ�ʿ��������ÿ���������һ�С�
 

Sample Input
6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 

Sample Output
2
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.001000(s) query 1, Server time : 2025-08-10 10:52:45, Gzip enabled