QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#277852#5572. Gridlandiaucup-team859WA 1ms3444kbC++171.3kb2023-12-06 23:59:572023-12-06 23:59:57

Judging History

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

  • [2023-12-06 23:59:57]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3444kb
  • [2023-12-06 23:59:57]
  • 提交

answer

#include <bits/stdc++.h>

#define lsb(x) (x & (-x))

using ull = unsigned long long;
using ll = long long;

using namespace std;



int main() {
#ifdef HOME
    ifstream cin("input.in");
    ofstream cout("output.out");
#endif
    ios::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);

    int n;
    cin >> n;

    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
            if (i == 1) {
                if (j == 1) {
                    cout << "L";
                } else if (j == 2) {
                    cout << "U";
                } else {
                    cout << "R";
                }
            } else if (i == 2) {
                if (j == 1) {
                    cout << "D";
                } else if (j == 2) {
                    cout << "R";
                } else {
                    if (j % 2 == 1) {
                        cout << ".";
                    } else {
                        cout << "D";
                    }
                }
            } else {
                if (j % 2 == 1) {
                    cout << "D";
                } else {
                    cout << ".";
                }
            }
        }
        cout << "\n";
    }

    return 0;
}

详细

Test #1:

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

input:

1

output:

L

result:

ok answer = 1

Test #2:

score: 0
Accepted
time: 0ms
memory: 3444kb

input:

2

output:

LU
DR

result:

ok answer = 4

Test #3:

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

input:

3

output:

LUR
DR.
D.D

result:

wrong answer jury has the better answer: jans = 8, pans = 7