Codeforces Round #421 (Div. 2), problem: (C) Mister B and Boring Game Solution In JAVA

By |2017-08-05T22:03:27+00:00August 5th, 2017|Categories: Java, Programming|Tags: , , , |

import java.util.Scanner; public class C { public static void main(String[] args) { // TODO Auto-generated method stub Scanner in = new Scanner(System.in); int a=in.nextInt(); int b=in.nextInt(); int l=in.nextInt(); int r=in.nextInt(); System.out.println(fun(a,b,l,r)); } static int fun(int a,int b,int l,int r){ if ((r-l+1)>2*(a+b)) if (a<=b) return [...]