fork download
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. ios::sync_with_stdio(false);
  7. cin.tie(0);
  8.  
  9. int y,c,p;
  10. cin>>y>>c>>p;
  11.  
  12. cout << ((y < c / 2 ? y : c / 2) < p ? (y < c / 2 ? y : c / 2) : p);
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5320KB
stdin
5 4 3
stdout
2