QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#130354#6641. XOR DiceRobeZH#WA 1ms3428kbC++14692b2023-07-23 21:46:092023-07-23 21:46:10

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-23 21:46:10]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3428kb
  • [2023-07-23 21:46:09]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define subnb true
#define Lnb true
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    int n, d;
    cin >> n >> d;
    rep(i, 0, n) {
        int mul = 1 << 8;
        rep(mask, 0, 6) {
            cout << ((mask >> 2 & 1) * mul * mul + (mask >> 1 & 1) * mul + (mask & 1)) * d << " ";
        }
        cout << '\n';
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3428kb

input:

3 2

output:

0 2 512 514 131072 131074 
0 2 512 514 131072 131074 
0 2 512 514 131072 131074 

result:

ok Correct answer

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3424kb

input:

100 60

output:

0 60 15360 15420 3932160 3932220 
0 60 15360 15420 3932160 3932220 
0 60 15360 15420 3932160 3932220 
0 60 15360 15420 3932160 3932220 
0 60 15360 15420 3932160 3932220 
0 60 15360 15420 3932160 3932220 
0 60 15360 15420 3932160 3932220 
0 60 15360 15420 3932160 3932220 
0 60 15360 15420 3932160 393...

result:

wrong answer Integer parameter [name=dice] equals to 3932160, violates the range [0, 1000000]