QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#135116 | #6641. XOR Dice | qwerty# | WA | 2ms | 3544kb | C++14 | 727b | 2023-08-05 11:39:51 | 2023-08-05 11:39:51 |
Judging History
answer
#include <iostream>
#include <unordered_set>
using namespace std;
int main(){
int n,d;
cin >> n >> d;
int temp = d;
unordered_set<int> s;
int cnt = 0;
while(temp!=0){
if((temp & 1) == 1){
s.insert(temp);
}
temp >>= 1;
cnt++;
}
int ans[6];
for(int i=0,pow=0;i<6;pow++){
if(s.find(pow)!=s.end()){
continue;
}
ans[i] = (2<<pow);
i++;
}
for(int i=0;i<6;i++){
cout << ans[i]+d << " ";
}
cout << endl;
for(int i=1;i<n;i++){
for(int i=0;i<6;i++){
cout << ans[i] << " ";
}
cout << endl;
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3544kb
input:
3 2
output:
4 10 18 34 66 130 2 8 16 32 64 128 2 8 16 32 64 128
result:
ok Correct answer
Test #2:
score: -100
Wrong Answer
time: 2ms
memory: 3436kb
input:
100 60
output:
62 68 92 124 188 572 2 8 32 64 128 512 2 8 32 64 128 512 2 8 32 64 128 512 2 8 32 64 128 512 2 8 32 64 128 512 2 8 32 64 128 512 2 8 32 64 128 512 2 8 32 64 128 512 2 8 32 64 128 512 2 8 32 64 128 512 2 8 32 64 128 512 2 8 32 64 128 512 2 8 32 64 128 512 2 8 32 64 128 512 2 8 32 64 12...
result:
wrong answer Invalid output