Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

我晕,这样的程序都能AC

Posted by iamzhaozheng at 2006-09-13 16:48:49 on Problem 2665
输入数据竟然都没有重叠区间

program poj2665;
var
  l,a,b:longint;
  m,i:integer;
begin
  readln(l,m);
  while l<>0 do
  begin
    l:=l+1;
    for i:=1 to m do
    begin
      readln(a,b);
      l:=l-b+a-1;
    end;
    writeln(l);
    readln(l,m);
  end;
end.

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator