QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#754209#9381. 502 Bad GatewayYipChip#WA 131ms3604kbC++23526b2024-11-16 14:30:132024-11-16 14:30:14

Judging History

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

  • [2024-11-16 14:30:14]
  • 评测
  • 测评结果:WA
  • 用时:131ms
  • 内存:3604kb
  • [2024-11-16 14:30:13]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
typedef long long ll;
typedef pair<ll, ll> PII;

bool cmp(PII x, PII y)
{
    return x.first * y.second > x.second * y.first;
}

void solve()
{
    int n;
    cin >> n;
    if (n & 1) cout << (n + 1) / 2 << ' ' << 1 << "\n";
    else cout << n + 1 << " " << 2 << "\n";
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr), cout.tie(nullptr);
    int T = 1;
    cin >> T;
    while (T -- ) solve();
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3588kb

input:

3
1
2
3

output:

1 1
3 2
2 1

result:

ok 3 lines

Test #2:

score: -100
Wrong Answer
time: 131ms
memory: 3604kb

input:

1000000
1
1000000000
1
1
1000000000
1
1000000000
1
1
1
1000000000
1
1
1000000000
1
1000000000
1000000000
1
1000000000
1
1
1000000000
1
1000000000
1000000000
1
1000000000
1000000000
1000000000
1000000000
1000000000
1000000000
1
1
1000000000
1
1000000000
1000000000
1000000000
1000000000
1
1
1
10000000...

output:

1 1
1000000001 2
1 1
1 1
1000000001 2
1 1
1000000001 2
1 1
1 1
1 1
1000000001 2
1 1
1 1
1000000001 2
1 1
1000000001 2
1000000001 2
1 1
1000000001 2
1 1
1 1
1000000001 2
1 1
1000000001 2
1000000001 2
1 1
1000000001 2
1000000001 2
1000000001 2
1000000001 2
1000000001 2
1000000001 2
1 1
1 1
1000000001 ...

result:

wrong answer 2nd lines differ - expected: '1999961560 44721', found: '1000000001 2'