QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#536150#7619. Make SYSU Great Again IFoedere0WA 0ms3640kbC++231.2kb2024-08-28 19:13:402024-08-28 19:13:40

Judging History

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

  • [2024-08-28 19:13:40]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3640kb
  • [2024-08-28 19:13:40]
  • 提交

answer

#include <bits/stdc++.h>
#define int long long
#define endl '\n'
using namespace std;
typedef pair<int, int> PII;
const int N = 1000010;
int mod = 998244353;
int n, m;
void solve()
{
    cin >> n >> m;
    int o = 1, p = 1;
    int cnt = 1;
    int k = 2 * n;
    for (int i = 1; i <= 2 * n; i++)
    {
        if (n % 2 != 0 && i == 2 * n)
        {
            cout << o + 1 << " " << p << endl;
            if (m != 2 * n)
                cout << o << " " << p + 1 << endl;
            k++;
            break;
        }
        cout << o << " " << p << endl;
        if (o == cnt && p == cnt)
        {
            p = n + 1 - cnt;
        }
        else if (o == cnt && p == n + 1 - cnt)
        {
            o = n + 1 - cnt;
        }
        else if (o == n + 1 - cnt && p == n + 1 - cnt)
        {
            p = cnt;
        }
        else if (o == n + 1 - cnt && p == cnt)
        {
            cnt++;
            o = cnt;
            p = cnt;
        }
    }
}
signed main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int T = 1;
    // cin >> T;
    while (T--)
        solve();
    return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3640kb

input:

3 6

output:

1 1
1 3
3 3
3 1
2 2
3 2

result:

wrong answer The answer is wrong: The maximum common divisor of row 2 and column 1797690496 is not the same.