Time Exceeded
Code
#include <bits/stdc++.h>
using namespace std;
/// complete sliding window and two pointer
///A. Codeforces Checking
int main()
{
long long t,n;
cin >> t;
while(t--){
cin >> n;
int counter = 1;
for(int i=1; i<n-1; i++){
for(int j=1; j<n-1; j++){
if(i<j && i+j==n){
counter++;
}
}
}
cout << counter <<endl;
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1073 Pair Sum
- Contest
- Bangladesh 2.0
- Language
- C++20 (G++ 13.2.0)
- Submit At
- 2024-08-16 15:55:14
- Judged At
- 2024-10-03 13:29:30
- Judged By
- Score
- 10
- Total Time
- ≥1097ms
- Peak Memory
- ≥532.0 KiB