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 cnt=0;
for(int i=0; i<n; i++){
for(int j=1; j<n; j++)
{
if(i<j && j<n && i+j==n){
cnt++;
}
}
}
cout << cnt << 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 16:01:27
- Judged At
- 2024-11-11 03:16:27
- Judged By
- Score
- 40
- Total Time
- ≥1022ms
- Peak Memory
- ≥536.0 KiB