fork download
  1. public class MyComparer : IComparer<int>
  2. {
  3. public int? LowerBound;
  4. public void Reset()
  5. {
  6. LowerBound = null;
  7. }
  8. public int Compare(int x, int y)
  9. {
  10. if (y >= x)
  11. {
  12. if (LowerBound == null ||LowerBound > y)
  13. {
  14. LowerBound = y;
  15. }
  16. }
  17. return (x < y ? -1 : x == y ? 0 : 1);
  18. }
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
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
Standard output is empty