/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Wrong Answer 43ms 580.0 KiB
#3 Accepted 43ms 532.0 KiB
#4 Accepted 44ms 576.0 KiB
#5 Accepted 71ms 532.0 KiB
#6 Accepted 58ms 576.0 KiB
#7 Accepted 36ms 532.0 KiB
#8 Accepted 34ms 532.0 KiB
#9 Accepted 36ms 572.0 KiB
#10 Accepted 35ms 532.0 KiB
#11 Accepted 36ms 568.0 KiB
#12 Accepted 16ms 1.27 MiB
#13 Accepted 16ms 1.27 MiB
#14 Time Exceeded ≥2099ms ≥1.27 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++){
            if(arr[i]%2==0){
                for(int j=0;j<t;j++){
                    if (arr[j]%2 !=0 && (arr[i]+arr[j]==3 || arr[i]+arr[j]==7 || arr[i]+arr[j]==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 07:18:25
Judged At
2025-02-26 07:18:25
Judged By
Score
65
Total Time
≥2099ms
Peak Memory
≥1.27 MiB