public class MyComparer : IComparer< int>
{
public int ? LowerBound;
public void Reset( )
{
LowerBound = null ;
}
public int Compare( int x, int y)
{
if ( y >= x)
{
if ( LowerBound == null || LowerBound > y)
{
LowerBound = y;
}
}
return ( x < y ? - 1 : x == y ? 0 : 1 ) ;
}
}
cHVibGljIGNsYXNzIE15Q29tcGFyZXIgOiBJQ29tcGFyZXI8aW50Pgp7CglwdWJsaWMgaW50PyBMb3dlckJvdW5kOwoJcHVibGljIHZvaWQgUmVzZXQoKQoJewoJCUxvd2VyQm91bmQgPSBudWxsOwoJfQoJcHVibGljIGludCBDb21wYXJlKGludCB4LCBpbnQgeSkKCXsKCQlpZiAoeSA+PSB4KQoJCXsKCQkJaWYgKExvd2VyQm91bmQgPT0gbnVsbCB8fExvd2VyQm91bmQgPiB5KQoJCQl7CgkJCQlMb3dlckJvdW5kID0geTsKCQkJfQoJCX0KCQlyZXR1cm4gKHggPCB5ID8gLTEgOiB4ID09IHkgPyAwIDogMSk7Cgl9Cn0=
compilation info
prog.cs(1,27): error CS0246: The type or namespace name `IComparer' could not be found. Are you missing a using directive or an assembly reference?
Compilation failed: 1 error(s), 0 warnings
stdout