Time Exceeded
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