Submission #1519454
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
#define SPEED ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define fileio freopen("in.in", "r", stdin),freopen("out.out", "w", stdout);
#define ll long long int
#define FF first
#define SS second
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
#define pll pair<long long int,long long int>
#define sd(x) scanf("%d",&x)
#define slld(x) scanf("%lld",&x)
#define pd(x) printf("%d\n",x)
#define plld(x) printf("%lld\n",x)
#define pss printf
#define MOD 1000000007
#define INF 1e18
#define eps 0.00001
#define endl '\n'
#define debug(n1) cout<<n1<<endl
ll n,a[200005],b[200005];
int main() {
slld(n);
ll x=n/2+1;
for(int i=1;i<=n;i++)
{
slld(a[i]);
if(i%2!=n%2)
b[x+i/2]=a[i];
else
b[x-i/2]=a[i];
}
for(int i=1;i<=n;i++)
pss("%lld ",b[i]);
pss("\n");
return 0;
}
Submission Info
Submission Time
2017-08-19 06:33:32+0900
Task
C - pushpush
User
spj_29
Language
C++14 (GCC 5.4.1)
Score
300
Code Size
922 Byte
Status
AC
Exec Time
44 ms
Memory
5248 KB
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:26:8: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
slld(n);
^
./Main.cpp:30:15: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
slld(a[i]);
^
Judge Result
Set Name
Sample
All
Score / Max Score
0 / 0
300 / 300
Status
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
5248 KB
even_1.txt
AC
44 ms
5248 KB
even_2.txt
AC
44 ms
5248 KB
even_3.txt
AC
44 ms
5248 KB
odd_0.txt
AC
44 ms
5248 KB
odd_1.txt
AC
44 ms
5248 KB
odd_2.txt
AC
44 ms
5248 KB
odd_3.txt
AC
44 ms
5248 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