QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#277333#6677. Puzzle: Sashiganeucup-team191#WA 1ms3548kbC++141.0kb2023-12-06 17:49:362023-12-06 17:49:36

Judging History

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

  • [2023-12-06 17:49:36]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3548kb
  • [2023-12-06 17:49:36]
  • 提交

answer

#include<bits/stdc++.h>

using namespace std;

typedef pair <int, int> pi;

int n, cx, cy;
vector <pair <pi, pi> > sol;

int main () {
    cin >> n >> cx >> cy;
    int len = 1;
    while (cx < n && cy > 1) {
        cx++; cy--; len++;
        sol.push_back({{cx, cy}, {-len, len}});
    }
    if (cx == n) {
        while (cy > 1) {
            cy--; len++;
            sol.push_back({{n + 1 - len, cy}, {len, len}});
        }
    } else if (cy == 1) {
        while (cx < n) {
            cx++; len++;
            sol.push_back({{cx, len}, {-len, -len}});
        }
    }
    while (len < n) {
        len++;
        sol.push_back({{n + 1 - len, len}, {len, -len}});
    }
    cout << "Yes\n";
    cout << sol.size() << '\n';
    for (int i = 0; i < sol.size(); i++) {
        int x = sol[i].first.first;
        int y = sol[i].first.second;
        int h = sol[i].second.first;
        int w = sol[i].second.second;
        cout << x << " " << y << " " << h << " " << w << '\n';
    }
    return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3548kb

input:

5 3 4

output:

Yes
4
4 3 -2 2
5 2 -3 3
2 1 4 4
1 5 5 -5

result:

wrong answer L shape #3 out of bounds. (test case 1)