QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#239188#7637. Exactly Three Neighborsucup-team859#WA 1ms3396kbC++17710b2023-11-04 19:05:372023-11-04 19:05:39

Judging History

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

  • [2023-11-04 19:05:39]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3396kb
  • [2023-11-04 19:05:37]
  • 提交

answer

#include <bits/stdc++.h>
#include <time.h>

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

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

using namespace std;

int main() {
#ifdef LOCAL
    ifstream cin("test.in");
    ofstream cout("test.out");
#endif
    int x, y;
    cin >> x >> y;
    if (x == 0) {
        cout << "1 1\n.\n";
    }
    else {
        if (x == y || (2 * y) % x != 0) {
            cout << "-1 -1\n";
        }
        else {
            int t = 2 * y / x;
            cout << "1 " << t << '\n';
            cout << "##";
            for (int i = 2; i < t; i++) {
                cout << '.';
            }
            cout << '\n';
        }
    }
    return 0;
}

详细

Test #1:

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

input:

2 3

output:

1 3
##.

result:

ok good solution

Test #2:

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

input:

1 1

output:

-1 -1

result:

ok no solution

Test #3:

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

input:

3 4

output:

-1 -1

result:

wrong answer you didn't find a solution but jury did