QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#754209 | #9381. 502 Bad Gateway | YipChip# | WA | 131ms | 3604kb | C++23 | 526b | 2024-11-16 14:30:13 | 2024-11-16 14:30:14 |
Judging History
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;
}
Details
Tip: Click on the bar to expand more detailed information
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'