/ SeriousOJ /

Record Detail

Runtime Error


  
# Status Time Cost Memory Cost
#1 Runtime Error *** stack smashing detected ***: terminated 1ms 552.0 KiB
#2 Runtime Error *** stack smashing detected ***: terminated 1ms 512.0 KiB

Code

#include <bits/stdc++.h>
using namespace std;
int main()
{ 
   


    int a[3];
    for(int i=0;i<=3;i++)
    {
        cin>>a[i];
    }
    int mx=a[0];
    int mn=a[0];
    for(int i =0;i<=3;i++)
    {
        if (a[i]>mx)
        {
            mx=a[i];
        }
       
        else if(a[i]<mn)
        {
            mn=a[i];
        }
       


    }
    cout<<mn<<endl<<mx;
}

Information

Submit By
Type
Submission
Problem
P1022 Minmax
Contest
Brain booster - 1
Language
C++17 (G++ 13.2.0)
Submit At
2023-12-31 15:02:39
Judged At
2024-11-11 03:46:01
Judged By
Score
0
Total Time
1ms
Peak Memory
552.0 KiB