• [1288] Eating Sweets

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • When in Hangzhou, TT and Mr. Cai buy so many sweets. At night, they compete to compare who can eat much more sweets.
    But Mr. Cai do not want to let TT be sad, so he decides to lose the game, is means Mr. Cai will eat less than TT.


  • 输入
  • Input until EOF.
    Each test only contains four integers a, b, c and d in one line.
    a means TT only have a number of sweets.
    b means Mr. Cai only have b number of sweets.
    c means TT have eaten c number of sweets now.
    d means Mr. Cai have eaten d number of sweets now.
    Every integer will be less than 10000.
    c will be less than a.
    d will be less than b.
  • 输出
  • Print the number of all situations that Mr. Cai will lose in one line.
  • 样例输入
  • 4 2 1 1
    2 4 2 2
  • 样例输出
  • 5
    0
  • 提示
  • 来源
  • Hungar
  • 操作

显示春菜