/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 1ms 356.0 KiB
#3 Accepted 1ms 560.0 KiB
#4 Accepted 1ms 348.0 KiB
#5 Accepted 1ms 488.0 KiB
#6 Accepted 1ms 536.0 KiB

Code

#include<bits/stdc++.h>
#define faster ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
void solution ()
{
    vector<int> vec;
    for(int i=0;i<4;i++)
    {
        int x; cin >> x;
        vec.push_back(x);
    }
    int mx=vec[0],mn=vec[0];
    for(int i=0;i<4;i++)
    {
        if(mx<vec[i]) mx=vec[i];
        if(mn>vec[i]) mn=vec[i];
    }
    cout << mn << endl;
    cout << mx << endl;

}
int main()
{
    faster
    int t=1 ;
    //cin >> t ;
    while(t--)
    {
        solution();
    }
}

Information

Submit By
Type
Submission
Problem
P1022 Minmax
Contest
Brain booster - 1
Language
C++17 (G++ 13.2.0)
Submit At
2023-12-31 13:25:02
Judged At
2024-11-11 03:46:43
Judged By
Score
100
Total Time
1ms
Peak Memory
560.0 KiB