# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
420675 | Pyqe | MalnaRISC (COI21_malnarisc) | C++14 | 1 ms | 224 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
long long n,nn;
void ad(long long x,long long w)
{
if(x+(1ll<<w)<n)
{
printf(" R%lld R%lld",x+1,x+(1ll<<w)+1);
}
}
int main()
{
long long i,j,r,c=0;
scanf("%lld",&n);
for(nn=1;nn<n;nn*=2,c++);
printf("%lld\n",c*(c+1)/2);
for(i=1;1ll<<i<=nn;i++)
{
printf("CMPSWP");
for(j=0;j<nn;j++)
{
if(!(j>>i-1&1))
{
ad(j,i-1);
}
}
printf("\n");
for(j=i-2;j+1;j--)
{
printf("CMPSWP");
for(r=0;r<nn;r++)
{
if(!((r^r+(1ll<<j))>>i&1)&&(r>>j&1))
{
ad(r,j);
}
}
printf("\n");
}
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |