/ SeriousOJ /

Record Detail

Compile Error

foo.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.

Code

#include<bits/stdc++.h>
using namespace std;
int main(){
    int t;
    cin>>t;
    int s[t];
    int i;
    for(i=0;i<t;i++){
        int a,b,c,op=0,d;
        cin>>a>>b>>c;
        if(a==b && a==c && b==c){s[i]=op;continue;}
        else if(a==b && a!=c){
            if(a>c){d=a-c;c+=d;op++;}
            else{
               d=c-a;c-=d;op++;
            }
        }
        else if(b==c && b!=a){
            if(b>a){d=b-a;a+=d;op++;}
            else{
               d=a-b;a-=d;op++;
            }
        }

        else if(a==c && a!=b){
            if(a>b){d=a-b;b+=d;op++;}
            else{
               d=b-a;b-=d;op++;
            }
        }

        else if(a!=b && a!=c && b!=c){
            op+=2;
        }
    
    s[i]=op;
      

}

for(i=0;i<t;i++)cout<<s[i]<<endl;

}

Information

Submit By
Type
Submission
Problem
P1061 Bring equality
Contest
Brain Booster #4
Language
C99 (GCC 13.2.0)
Submit At
2024-07-14 16:35:03
Judged At
2024-11-11 03:23:59
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes