daily pastebin goal
91%
SHARE
TWEET

Untitled

a guest Apr 19th, 2018 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. x := 1;
  2.    Reset(File1);
  3.    While Not eof(File1) do
  4.    Begin
  5.       Read(File1, num[i]);
  6.       Inc(i)
  7.    End;
  8.    z := i;
  9.    j := z + 1;
  10.    While Not eof(File1) do
  11.    Begin
  12.       Read(File1, num[j]);
  13.       Inc(j)
  14.    End;
  15.    y := j;
  16.    If j > i Then a := 1 Else If j = i Then
  17.    Begin
  18.       While z <> x do
  19.       Begin
  20.          If  Ord(num[j]) > Ord(num[i]) Then a := 1 Else If Ord(num[j]) < Ord(num[i]) Then a := 0;
  21.          Dec(j);
  22.          Dec(i)
  23.       End;
  24.    End Else a := 0;
  25.    If a = 1 Then
  26.    Begin
  27.       x := z+1;
  28.       z := y
  29.    End;
  30.    
  31. var f1,f2: text;
  32.     s,s2:string;
  33.  
  34. begin
  35.     assign(f1,'input.txt');
  36.     assign(f2,'output.txt');
  37.     reset(f1);rewrite(f2);
  38.     readln(f1,s);
  39.     readln(f1,s2);
  40.     if s=s2 then writeln(0);
  41.     close(f1);
  42.     close(f2);
  43. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top