/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 348.0 KiB
#2 Accepted 5ms 324.0 KiB
#3 Time Exceeded ≥1082ms ≥536.0 KiB
#4 Time Exceeded ≥1093ms ≥396.0 KiB

Code

#include <bits/stdc++.h>
using namespace std;

/// complete sliding window and two pointer

///A. Codeforces Checking

int main()
{
    long long t;
    cin >> t;
    while(t--){
        long long int n;
        int cnt=0;
        cin >> n;
        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:12:31
Judged At
2024-11-11 03:15:39
Judged By
Score
40
Total Time
≥1093ms
Peak Memory
≥536.0 KiB