/ SeriousOJ /

Record Detail

Compile Error

foo.c:33:1: error: expected identifier or '(' at end of input
   33 | }*
      | ^

Code

#include<stdio.h>
int main()
{
    int t;
    scanf("%d",&t);
    for(int i=1;i<=t;i++)
    {
        int n;
        scanf("%d",&n);
        int ar[n];
        int k=1;
        int count=0;
        for(int i=0;i<n;i++)
        {
            ar[i]=k;
            k++;
        }
        int j=1;
        for(int p=0;p<(n-1);p++)
        {
             for(int i=j;i<n;i++)
             {
                if(ar[p]+ar[i]==n)
                {
                     count++;
                }
             }
             j++;
        }
        printf("%d\n",count);
    }   
    return 0;
}*

Information

Submit By
Type
Submission
Problem
P1073 Pair Sum
Contest
Bangladesh 2.0
Language
C99 (GCC 13.2.0)
Submit At
2024-08-16 17:24:21
Judged At
2024-10-03 13:22:09
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes