Submission #2236267


Source Code Expand

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

#define is_uruu leapyear
#define ll long long
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define ROF(i,a,b) for(int i=(a);i>(b);--i)
#define REP(i,a) for(int i=0;i<(a);++i)


 
int main()
{
	int n, a, to, A[200005];
	cin >> n;
	
	FOR(i, 0, n){
		scanf("%d", &a);
		if(i%2 == n%2){
			to = n/2+(i+1)/2;
		} 
		else {
			to = n/2-(i+1)/2;
		}
		A[to] = a;
	}
	
	FOR(i, 0, n){
		printf("%d%c", A[i], i==n-1?'\n':' ');
	}
	
	return 0;
}

Submission Info

Submission Time
Task C - pushpush
User calll
Language C++14 (GCC 5.4.1)
Score 300
Code Size 512 Byte
Status AC
Exec Time 45 ms
Memory 2944 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:18:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d", &a);
                  ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 4
AC × 12
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 AC 44 ms 2944 KB
even_1.txt AC 44 ms 2944 KB
even_2.txt AC 45 ms 2944 KB
even_3.txt AC 44 ms 2944 KB
odd_0.txt AC 45 ms 2944 KB
odd_1.txt AC 44 ms 2944 KB
odd_2.txt AC 44 ms 2944 KB
odd_3.txt AC 44 ms 2944 KB
sample1.txt AC 1 ms 256 KB
sample2.txt AC 1 ms 256 KB
sample3.txt AC 1 ms 256 KB
sample4.txt AC 1 ms 256 KB