fork download
  1. /*input
  2. 5
  3. 1 2 3 4 5
  4. */
  5. #include<bits/stdc++.h>
  6. using namespace std;
  7. void solve()
  8. {
  9. int n;
  10. cin>>n;vector<int> vals;
  11. for(int i=1;i<=n;i++)
  12. {
  13. int temp;cin>>temp;vals.push_back(temp);
  14. }
  15. sort(vals.begin(), vals.end());cout<<vals[0]<<endl;
  16.  
  17. }
  18. int main()
  19. {
  20. ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
  21. int t;cin>>t;
  22. while(t--) solve();
  23. }
Runtime error #stdin #stdout 0s 4240KB
stdin
Standard input is empty
stdout
Standard output is empty