Submission #2669584


Source Code Expand

#include<stdio.h>

int main(){
  int i,n,j;
  long a[100000],b[100000];
  scanf("%d",&n);
  for(i=0;i<n;i++)
    scanf("%ld",&a[i]);
  j=0;
  for(i=n-1;i>=0;i--){
    if(j%2==0){
      b[j/2]=a[i];
    }
    else{
      b[n-1-(j/2)]=a[i];
    }
    j++;
  }
  for(i=0;i<n;i++)
    printf("%ld ",b[i]);
}

Submission Info

Submission Time
Task C - pushpush
User AC961009
Language C (GCC 5.4.1)
Score 0
Code Size 323 Byte
Status RE
Exec Time 120 ms
Memory 1664 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:6:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d",&n);
   ^
./Main.c:8:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%ld",&a[i]);
     ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 4
AC × 4
RE × 8
Set Name Test Cases
Sample sample1.txt, sample2.txt, sample3.txt, sample4.txt
All even_0.txt, even_1.txt, even_2.txt, even_3.txt, odd_0.txt, odd_1.txt, odd_2.txt, odd_3.txt, sample1.txt, sample2.txt, sample3.txt, sample4.txt
Case Name Status Exec Time Memory
even_0.txt RE 119 ms 1664 KB
even_1.txt RE 118 ms 1664 KB
even_2.txt RE 118 ms 1664 KB
even_3.txt RE 120 ms 1664 KB
odd_0.txt RE 118 ms 1664 KB
odd_1.txt RE 118 ms 1664 KB
odd_2.txt RE 120 ms 1664 KB
odd_3.txt RE 119 ms 1664 KB
sample1.txt AC 1 ms 128 KB
sample2.txt AC 1 ms 128 KB
sample3.txt AC 1 ms 128 KB
sample4.txt AC 1 ms 128 KB