QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#134895 | #6641. XOR Dice | whsyhyyh# | WA | 1ms | 3604kb | C++14 | 972b | 2023-08-05 09:47:41 | 2023-08-05 09:47:44 |
Judging History
answer
#pragma GCC optimize("Ofast","unroll-loops","omit-frame-pointer","inline")
#pragma GCC option("arch=native","tune=native","no-zero-upper")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2")
#pragma GCC optimize(3)
#include<bits/stdc++.h>
#define N 15
#define rep(i,l,r) for(int i=l;i<=r;i++)
#define drep(i,r,l) for(int i=r;i>=l;i--)
using namespace std;
int rd() {
int res=0,f=1;char ch=getchar();
while(ch<'0'||ch>'9') {if(ch=='-') f*=-1;ch=getchar();}
while(ch>='0'&&ch<='9') res=(res<<1)+(res<<3)+(ch^48),ch=getchar();
return res*f;
}
int n,d;
void work1() {
rep(i,1,n) {
printf("0 %d ",d);
printf("%d %d ",(d<<6),(d<<7));
printf("%d %d ",(d<<13),(d<<14));
puts("");
}
}
void work2() {
rep(i,1,n) {
printf("0 %d ",d);
printf("%d %d ",(d<<6),(d<<7)^(d<<6));
printf("%d %d ",(d<<13),(d<<14)^(d<<13));
puts("");
}
}
int main() {
n=rd(),d=rd();
if(n&1) work1();
else work2();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3600kb
input:
3 2
output:
0 2 128 256 16384 32768 0 2 128 256 16384 32768 0 2 128 256 16384 32768
result:
ok Correct answer
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3604kb
input:
100 60
output:
0 60 3840 4352 491520 557056 0 60 3840 4352 491520 557056 0 60 3840 4352 491520 557056 0 60 3840 4352 491520 557056 0 60 3840 4352 491520 557056 0 60 3840 4352 491520 557056 0 60 3840 4352 491520 557056 0 60 3840 4352 491520 557056 0 60 3840 4352 491520 557056 0 60 3840 4352 491520 557056 ...
result:
wrong answer Invalid output