/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 540.0 KiB
#2 Accepted 7ms 328.0 KiB
#3 Time Exceeded ≥1023ms ≥540.0 KiB
#4 Time Exceeded ≥1036ms ≥540.0 KiB

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-10-03 13:29:03
Judged By
Score
40
Total Time
≥1036ms
Peak Memory
≥540.0 KiB