/ SeriousOJ /

Record Detail

Runtime Error


  
# Status Time Cost Memory Cost
#1 Runtime Error *** stack smashing detected ***: terminated 1ms 536.0 KiB
#2 Runtime Error *** stack smashing detected ***: terminated 1ms 580.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 max=a[0];
    int min=a[0];
    for(int i =0;i<=3;i++)
    {
        if (a[i]>max)
        {
            max=a[i];
        }
       
        else if(a[i]<min)
        {
            min=a[i];
        }
       


    }
    cout<<min<<endl<<max;
}

Information

Submit By
Type
Submission
Problem
P1022 Minmax
Contest
Brain booster - 1
Language
C++20 (G++ 13.2.0)
Submit At
2023-12-31 14:52:01
Judged At
2024-11-11 03:46:07
Judged By
Score
0
Total Time
1ms
Peak Memory
580.0 KiB