제출 #1257083

#제출 시각아이디문제언어결과실행 시간메모리
1257083yigit_komurcuSob (COCI19_sob)C++20
0 / 110
3 ms328 KiB
#include <bits/stdc++.h> using namespace std; int a,b; int main(){ cin>>a>>b; long long i,y; long long x=1; for (i = 1; i <b ;) i*=2; i/=2; long long t=b; t-=i; y=t-1; long long arr[a]; for (long long j = 0; j <a ; ++j) { arr[t]=b; t+=x; b++; if (t==a){ t=y; x=-1; } } for (long long j = 0; j < a; ++j) { cout<<j<<" "<<arr[j]<<endl; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...