QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#581011#9381. 502 Bad GatewayjakerWA 115ms3944kbC++20461b2024-09-22 03:04:452024-09-22 03:04:45

Judging History

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

  • [2024-09-24 14:55:37]
  • hack成功,自动添加数据
  • (/hack/886)
  • [2024-09-22 03:04:45]
  • 评测
  • 测评结果:WA
  • 用时:115ms
  • 内存:3944kb
  • [2024-09-22 03:04:45]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,k) for(int i = j;i <= k;++i)
#define repp(i,j,k) for(int i = j;i >= k;--i)
#define MAXN 100100
#define fr first
#define se second
#define mp make_pair
#define pb push_back
#define ll long long
int n;
int main() {
    int T; scanf("%d",&T);
    while(T--) {
        scanf("%d",&n);
        if( n&1 ) printf("%d 1\n",(n+1)/2);
        else printf("%d 2\n",n+1);
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
1
2
3

output:

1 1
3 2
2 1

result:

ok 3 lines

Test #2:

score: -100
Wrong Answer
time: 115ms
memory: 3944kb

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'