QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#536063#7619. Make SYSU Great Again IFoedere0WA 0ms3636kbC++231004b2024-08-28 18:10:332024-08-28 18:10:33

Judging History

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

  • [2024-08-28 18:10:33]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3636kb
  • [2024-08-28 18:10:33]
  • 提交

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;
    for (int i = 1; i <= 2 * n; i++)
    {
        cout << o << " " << p << endl;
        if (i % 2 == 0)
            o++;
        if (i % 2 != 0)
            p = n + 1 - p;
    }
    o = 1, p = 2;
    bool st = 0;
    for (int i = 2 * n + 1; i <= m; i++)
    {
        if (o == n + 1)
        {
            o = n;
            p++;
            st = 1;
        }
        if (o == 0)
        {
            o = 1;
            p++;
            st = 0;
        }
        cout << o << " " << p << endl;
        if (!st)
            o++;
        else
            o--;
    }
}
signed main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int T = 1;
    // cin >> T;
    while (T--)
        solve();
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 6

output:

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

result:

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