/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Wrong Answer 36ms 540.0 KiB
#3 Accepted 36ms 576.0 KiB
#4 Accepted 37ms 572.0 KiB
#5 Accepted 36ms 560.0 KiB
#6 Accepted 36ms 564.0 KiB
#7 Accepted 29ms 540.0 KiB
#8 Accepted 30ms 788.0 KiB
#9 Accepted 29ms 788.0 KiB
#10 Accepted 30ms 540.0 KiB
#11 Accepted 29ms 540.0 KiB
#12 Accepted 18ms 1.277 MiB
#13 Accepted 17ms 1.316 MiB
#14 Time Exceeded ≥2098ms ≥1.277 MiB

Code

#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<set>
#define jidan ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
int main (){
    jidan;
    int a;
    cin>>a;
    while (a--){
        int t;
        cin>>t;
        int arr[t];
        for (int i=0; i<t;i++){
            cin>>arr[i];
        }
        bool b=false;
        for(int i=0;i<t;i++){
        for(int j=0;j<t;j++){
            if(arr[j] != arr[i] &&(arr[j]+arr[i]== 3 || arr[j]+arr[i]== 7 || arr[j]+arr[i]== 15)){
                b=true;
                break;            }
        }
        }
        if(b) cout<<1<<endl;
        else cout<<0<<endl;
    }

}

Information

Submit By
Type
Submission
Problem
P1175 Maximum binary product of sum pairs
Contest
Intra LU IEEE Beginner Programming Contest
Language
C++17 (G++ 13.2.0)
Submit At
2025-02-26 06:47:13
Judged At
2025-02-26 06:47:13
Judged By
Score
65
Total Time
≥2098ms
Peak Memory
≥1.316 MiB