fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. long long X,Y,Z;
  6. cin>>X>>Y>>Z;
  7. if(X>=Y && X>=Z)
  8. cout <<Y+Z-X;
  9. else
  10. cout<<-1;
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 5292KB
stdin
101 102 3
stdout
-1